diff --git a/templates/tex/latex_sphinx_base.tplx b/templates/tex/latex_sphinx_base.tplx index aff280e..033906e 100644 --- a/templates/tex/latex_sphinx_base.tplx +++ b/templates/tex/latex_sphinx_base.tplx @@ -65,64 +65,72 @@ ((* block footer *)) ((* endblock footer *)) -((*- block any_cell scoped -*)) - ((( cell.source))) - ((*- if cell.type in ['code'] -*)) - - ((*- block codecell scoped -*)) - ((*- block input_group -*)) - ((*- block in_prompt -*))((*- endblock in_prompt -*)) - ((*- block input -*))((*- endblock input -*)) - ((*- endblock input_group -*)) - ((*- if cell.outputs -*)) - ((*- block output_group -*)) - ((*- block output_prompt -*))((*- endblock output_prompt -*)) - ((*- block outputs -*)) - ((*- for output in cell.outputs -*)) - ((*- if output.output_type in ['pyout'] -*)) - ((*- block pyout scoped -*))((*- endblock pyout -*)) - ((*- elif output.output_type in ['stream'] -*)) - ((*- block stream scoped -*)) - ((*- if output.stream in ['stdout'] -*)) - ((*- block stream_stdout scoped -*)) - ((*- endblock stream_stdout -*)) - ((*- elif output.stream in ['stderr'] -*)) - ((*- block stream_stderr scoped -*)) - ((*- endblock stream_stderr -*)) - ((*- endif -*)) - ((*- endblock stream -*)) - ((*- elif output.output_type in ['display_data'] -*)) - ((*- block display_data scoped -*)) - ((*- block data_priority scoped -*)) - ((*- endblock data_priority -*)) - ((*- endblock display_data -*)) - ((*- elif output.output_type in ['pyerr'] -*)) - ((*- block pyerr scoped -*)) - ((*- for line in output.traceback -*)) - ((*- block traceback_line scoped -*))((*- endblock traceback_line -*)) - ((*- endfor -*)) - ((*- endblock pyerr -*)) +((*- block headingcell-*)) + + ((*- if cell.level == 1 -*)) + \part + ((*- elif cell.level == 2 -*)) + \chapter + ((*- elif cell.level == 3 -*)) + \section + ((*- elif cell.level == 4 -*)) + \subsection + ((*- elif cell.level == 5 -*)) + \subsubsection + ((*- elif cell.level == 6 -*)) + \paragraph + ((*- endif -*)){((( cell.source )))} +((*- endblock headingcell -*)) + +((*- block codecell scoped -*)) + ((*- block input_group -*)) + ((*- block in_prompt -*))((*- endblock in_prompt -*)) + ((*- block input -*))((*- endblock input -*)) + ((*- endblock input_group -*)) + ((*- if cell.outputs -*)) + ((*- block output_group -*)) + ((*- block output_prompt -*))((*- endblock output_prompt -*)) + ((*- block outputs -*)) + ((*- for output in cell.outputs -*)) + ((*- if output.output_type in ['pyout'] -*)) + ((*- block pyout scoped -*))((*- endblock pyout -*)) + ((*- elif output.output_type in ['stream'] -*)) + ((*- block stream scoped -*)) + ((*- if output.stream in ['stdout'] -*)) + ((*- block stream_stdout scoped -*)) + ((*- endblock stream_stdout -*)) + ((*- elif output.stream in ['stderr'] -*)) + ((*- block stream_stderr scoped -*)) + ((*- endblock stream_stderr -*)) ((*- endif -*)) + ((*- endblock stream -*)) + ((*- elif output.output_type in ['display_data'] -*)) + ((*- block display_data scoped -*)) + ((*- block data_priority scoped -*)) + ((*- endblock data_priority -*)) + ((*- endblock display_data -*)) + ((*- elif output.output_type in ['pyerr'] -*)) + ((*- block pyerr scoped -*)) + ((*- for line in output.traceback -*)) + ((*- block traceback_line scoped -*))((*- endblock traceback_line -*)) ((*- endfor -*)) - ((*- endblock outputs -*)) - ((*- endblock output_group -*)) - ((*- endif -*)) - ((*- endblock codecell -*)) - ((*- elif cell.type in ['markdown'] -*)) - - ((*- block markdowncell scoped-*)) - ((*- endblock markdowncell -*)) - ((*- elif cell.type in ['heading'] -*)) - - ((*- block headingcell scoped-*)) - ((*- endblock headingcell -*)) - ((*- elif cell.type in ['raw'] -*)) - - ((*- block rawcell scoped-*)) - ((*- endblock rawcell -*)) - ((*- else -*)) - - ((*- block unknowncell scoped-*)) - ((*- endblock unknowncell -*)) - ((*- endif -*)) -((*- endblock any_cell -*)) + ((*- endblock pyerr -*)) + ((*- endif -*)) + ((*- endfor -*)) + ((*- endblock outputs -*)) + ((*- endblock output_group -*)) + ((*- endif -*)) +((*- endblock codecell -*)) + +((*- block markdowncell scoped-*)) +%TODO: Get this working! +((*- endblock markdowncell -*)) + + +((*- block rawcell scoped-*)) + +((*- endblock rawcell -*)) + +((*- block unknowncell scoped-*)) + +((*- endblock unknowncell -*))