##// END OF EJS Templates
Changed name option from slider to reveal
Changed name option from slider to reveal

File last commit:

r9761:1bef0408
r9762:387781ec
Show More
latex_sphinx_base.tplx
162 lines | 5.5 KiB | text/plain | TextLexer
/ templates / tex / latex_sphinx_base.tplx
Jonathan Frederic
Added document level description and cleaned template up....
r9735 ((============================================================================
NBConvert Sphinx-Latex Template
Purpose: Allow export of PDF friendly Latex inspired by Sphinx. Most of the
template is derived directly from Sphinx source.
Inheritance: null>display_priority>latex_base
==========================================================================))
Jonathan Frederic
Added basic Sphinx template....
r9734 ((*- extends 'latex_base.tplx' -*))
((* block header *))
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751 % Header, overrides base
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746
% Make sure that the sphinx doc style knows who it inherits from.
\def\sphinxdocclass{(((parentdocumentclass)))}
% Declare the document class
Jonathan Frederic
Removed full path names for latex dependencies, relative...
r9748 \documentclass[letterpaper,10pt,english]{sphinx(((documentclass)))}
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746
% Imports
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00A0}{\\nobreakspace}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{times}
\usepackage{import}
Jonathan Frederic
Removed full path names for latex dependencies, relative...
r9748 \usepackage[Bjarne]{fncychap}
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 \usepackage{longtable}
Jonathan Frederic
Removed full path names for latex dependencies, relative...
r9748 \usepackage{sphinx}
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 \usepackage{multirow}
% Document level variables
\title{((( nb.metadata.name )))}
\date{\today}
\release{}
\author{Unknown Author}
\newcommand{\sphinxlogo}{}
\renewcommand{\releasename}{Release}
\makeindex
((* block sphinxheader *))((* endblock sphinxheader *))
Jonathan Frederic
Added document level description and cleaned template up....
r9735
Jonathan Frederic
Made significant improvements to the Sphinx-Latex export...
r9736 ((* endblock header *))
Jonathan Frederic
Added basic Sphinx template....
r9734
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 ((* block bodyBegin *))
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751 % Body
Jonathan Frederic
Got pdflatex to work on this empty sphinx styled template.
r9740
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 % Start of the document
\begin{document}
\maketitle
\tableofcontents
Jonathan Frederic
Added basic Sphinx template....
r9734
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* endblock bodyBegin *))((* block bodyEnd *))
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746
\renewcommand{\indexname}{Index}
\printindex
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751
% End of document
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 \end{document}
((* endblock bodyEnd *))
% Footer
Jonathan Frederic
Made significant improvements to the Sphinx-Latex export...
r9736 ((* block footer *))
((* endblock footer *))
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751 ((* block headingcell -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 \
Jonathan Frederic
Process header cells....
r9749 ((*- if cell.level == 1 -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block h1 -*))part((* endblock h1 -*))
Jonathan Frederic
Process header cells....
r9749 ((*- elif cell.level == 2 -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block h2 -*))chapter((* endblock h2 -*))
Jonathan Frederic
Process header cells....
r9749 ((*- elif cell.level == 3 -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block h3 -*))section((* endblock h3 -*))
Jonathan Frederic
Process header cells....
r9749 ((*- elif cell.level == 4 -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block h4 -*))subsection((* endblock h4 -*))
Jonathan Frederic
Process header cells....
r9749 ((*- elif cell.level == 5 -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block h5 -*))subsubsection((* endblock h5 -*))
Jonathan Frederic
Process header cells....
r9749 ((*- elif cell.level == 6 -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block h6 -*))paragraph((* endblock h6 -*))
Jonathan Frederic
Added markdown support to headers (temporary)
r9759 ((*- endif -*)){((( cell.source | markdown2latex )))}
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751 ((*- endblock headingcell *))
Jonathan Frederic
Process header cells....
r9749
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* block unknowncell scoped*))
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751
% Unsupported cell type, no formatting
((( filterOutLatex(cell.source) )))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((* endblock unknowncell *))
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751
Jonathan Frederic
Enabled markdown blocks.
r9757 ((*- block markdowncell scoped-*))
((( super() )))
((*- endblock markdowncell -*))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 ((= Raw text cells allow the user to manually inject document code that will
not get touched by the templating system. =))
((*- block rawcell *))
((( cell.source )))
((* endblock rawcell -*))
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751 ((* macro filterOutLatex(text) -*))
((*- set text = text|replace("\\","\\backslash") -*))
((*- set text = text|replace("{","\\{") -*))
((*- set text = text|replace("}","\\}") -*))
((*- set text = text|replace("|","\\vert") -*))
((( text )))
((*- endmacro *))
Jonathan Frederic
Moved header definitions into individual sphinx doc types....
r9761 % Useful to block TODO: Remove/move this block below
\setbox0\vbox{
\begin{minipage}{0.95\linewidth}
\end{minipage}}
\begin{center}\setlength{\fboxsep}{5pt}
\shadowbox{\box0}\end{center}
Jonathan Frederic
Moved latex comments in to Jinja blocks so they show in the...
r9751 ((========================================================================
EVERYTHING BELOW HERE STILL NEEDS TO BE FILLED IN!
========================================================================))
Jonathan Frederic
Process header cells....
r9749 ((*- 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 -*))
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 ((*- endif -*))
Jonathan Frederic
Process header cells....
r9749 ((*- 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 -*))
Jonathan Frederic
Got both of the main template formats from sphinx rendering....
r9746 ((*- endfor -*))
Jonathan Frederic
Process header cells....
r9749 ((*- endblock pyerr -*))
((*- endif -*))
((*- endfor -*))
((*- endblock outputs -*))
((*- endblock output_group -*))
((*- endif -*))
((*- endblock codecell -*))