diff options
Diffstat (limited to 'sphinx/templates/latex')
-rw-r--r-- | sphinx/templates/latex/latex.tex_t | 108 | ||||
-rw-r--r-- | sphinx/templates/latex/longtable.tex_t | 74 | ||||
-rw-r--r-- | sphinx/templates/latex/sphinxmessages.sty_t | 21 | ||||
-rw-r--r-- | sphinx/templates/latex/tabular.tex_t | 54 | ||||
-rw-r--r-- | sphinx/templates/latex/tabulary.tex_t | 54 |
5 files changed, 311 insertions, 0 deletions
diff --git a/sphinx/templates/latex/latex.tex_t b/sphinx/templates/latex/latex.tex_t new file mode 100644 index 0000000..deb0305 --- /dev/null +++ b/sphinx/templates/latex/latex.tex_t @@ -0,0 +1,108 @@ +%% Generated by Sphinx. +\def\sphinxdocclass{<%= docclass %>} +<% if latex_engine == 'lualatex' -%> +\IfFileExists{luatex85.sty} + {\RequirePackage{luatex85}} + {\ifdefined\luatexversion\ifnum\luatexversion>84\relax + \PackageError{sphinx} + {** With this LuaTeX (\the\luatexversion),Sphinx requires luatex85.sty **} + {** Add the LaTeX package luatex85 to your TeX installation, and try again **} + \endinput\fi\fi} +<% endif -%> +\documentclass[<%= papersize %>,<%= pointsize %><%= classoptions %>]{<%= wrapperclass %>} +\ifdefined\pdfpxdimen + \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen +\fi \sphinxpxdimen=<%= pxunit %>\relax +\ifdefined\pdfimageresolution + \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax +\fi +%% let collapsible pdf bookmarks panel have high depth per default +\PassOptionsToPackage{bookmarksdepth=5}{hyperref} +<% if use_xindy -%> +%% turn off hyperref patch of \index as sphinx.xdy xindy module takes care of +%% suitable \hyperpage mark-up, working around hyperref-xindy incompatibility +\PassOptionsToPackage{hyperindex=false}{hyperref} +%% memoir class requires extra handling +\makeatletter\@ifclassloaded{memoir} +{\ifdefined\memhyperindexfalse\memhyperindexfalse\fi}{}\makeatother +<% endif %> +<% if booktabs -%> +\PassOptionsToPackage{booktabs}{sphinx} +<% endif -%> +<% if borderless -%> +\PassOptionsToPackage{borderless}{sphinx} +<% endif -%> +<% if colorrows -%> +\PassOptionsToPackage{colorrows}{sphinx} +<% endif -%> +<%= passoptionstopackages %> +\PassOptionsToPackage{warn}{textcomp} +<%= inputenc %> +<%= utf8extra %> +<%= cmappkg %> +<%= fontenc %> +<%= amsmath %> +<%= multilingual %> +<%= substitutefont %> +<%= textcyrillic %> +<%= fontpkg %> +<%= fontsubstitution %> +<%= textgreek %> +<%= fncychap %> +\usepackage<%= sphinxpkgoptions %>{sphinx} +<%= sphinxsetup %> +<%= fvset %> +<%= geometry %> +<%= extrapackages %> + +<%- for name, option in packages %> +<%- if option %> +\usepackage[<%= option %>]{<%= name %>} +<%- else %> +\usepackage{<%= name %>} +<%- endif %> +<%- endfor %> + +<%= hyperref %> +<%- for name, option in packages_after_hyperref %> +<%- if option %> +\usepackage[<%= option %>]{<%= name %>} +<%- else %> +\usepackage{<%= name %>} +<%- endif %> +<%- endfor %> + +<%= contentsname %> +\usepackage{sphinxmessages} +<%= tocdepth %> +<%= secnumdepth %> +<%= preamble %> + +\title{<%= title %>} +\date{<%= date %>} +\release{<%= release | e %>} +\author{<%= author %>} +<%- if logofilename %> +\newcommand{\sphinxlogo}{\sphinxincludegraphics{<%= logofilename %>}\par} +<%- else %> +\newcommand{\sphinxlogo}{\vbox{}} +<%- endif %> +<%- if releasename or release %> +\renewcommand{\releasename}{<%= releasename or _('Release') | e %>} +<%- else %> +\renewcommand{\releasename}{} +<%- endif %> +<%= makeindex %> +\begin{document} +<%= shorthandoff %> +\pagestyle{empty} +<%= maketitle %> +\pagestyle{plain} +<%= tableofcontents %> +\pagestyle{normal} +<%= body %> +<%= atendofbody %> +<%= indices %> +\renewcommand{\indexname}{<%= _('Index') | e %>} +<%= printindex %> +\end{document} diff --git a/sphinx/templates/latex/longtable.tex_t b/sphinx/templates/latex/longtable.tex_t new file mode 100644 index 0000000..83790f4 --- /dev/null +++ b/sphinx/templates/latex/longtable.tex_t @@ -0,0 +1,74 @@ +\begin{savenotes} +\sphinxatlongtablestart +\sphinxthistablewithglobalstyle +<% if 'booktabs' in table.styles -%> +\sphinxthistablewithbooktabsstyle +<% endif -%> +<% if 'borderless' in table.styles -%> +\sphinxthistablewithborderlessstyle +<% endif -%> +<% if 'standard' in table.styles -%> +\sphinxthistablewithstandardstyle +<% endif -%> +<% if 'vlines' in table.styles -%> +\sphinxthistablewithvlinesstyle +<% endif -%> +<% if 'novlines' in table.styles -%> +\sphinxthistablewithnovlinesstyle +<% endif -%> +<% if 'colorrows' in table.styles -%> +\sphinxthistablewithcolorrowsstyle +<% endif -%> +<% if 'nocolorrows' in table.styles -%> +\sphinxthistablewithnocolorrowsstyle +<% endif -%> +\makeatletter +<%- if table.align in ('center', 'default') %> + \LTleft \@totalleftmargin plus1fill + \LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill +<%- elif table.align == 'left' %> + \LTleft \@totalleftmargin + \LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax plus1fill +<%- elif table.align == 'right' %> + \LTleft \@totalleftmargin plus1fill + \LTright\dimexpr\columnwidth-\@totalleftmargin-\linewidth\relax +<%- endif %> +\makeatother +\begin{longtable}<%= table.get_colspec() %> +<%- if table.caption -%> +\sphinxthelongtablecaptionisattop +\caption{<%= ''.join(table.caption) %>\strut}<%= labels %>\\*[\sphinxlongtablecapskipadjust] +<% elif labels -%> +\noalign{\phantomsection<%= labels %>}% +<% endif -%> +\sphinxtoprule +<%= ''.join(table.header) -%> +<%- if table.header -%> +\sphinxmidrule +<% endif -%> +\endfirsthead + +\multicolumn{<%= table.colcount %>}{c}{\sphinxnorowcolor + \makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} <%= _('continued from previous page') %>}}% +}\\ +\sphinxtoprule +<%= ''.join(table.header) -%> +<%- if table.header -%> +\sphinxmidrule +<% endif -%> +\endhead + +\sphinxbottomrule +\multicolumn{<%= table.colcount %>}{r}{\sphinxnorowcolor + \makebox[0pt][r]{\sphinxtablecontinued{<%= _('continues on next page') %>}}% +}\\ +\endfoot + +\endlastfoot +\sphinxtableatstartofbodyhook +<%= ''.join(table.body) -%> +\sphinxbottomrule +\end{longtable} +\sphinxtableafterendhook +\sphinxatlongtableend +\end{savenotes} diff --git a/sphinx/templates/latex/sphinxmessages.sty_t b/sphinx/templates/latex/sphinxmessages.sty_t new file mode 100644 index 0000000..ef2750f --- /dev/null +++ b/sphinx/templates/latex/sphinxmessages.sty_t @@ -0,0 +1,21 @@ +% +% sphinxmessages.sty +% +% message resources for Sphinx +% +\ProvidesPackage{sphinxmessages}[2019/01/04 v2.0 Localized LaTeX macros (Sphinx team)] + +\renewcommand{\literalblockcontinuedname}{<%= _('continued from previous page') | e %>} +\renewcommand{\literalblockcontinuesname}{<%= _('continues on next page') | e %>} +\renewcommand{\sphinxnonalphabeticalgroupname}{<%= _('Non-alphabetical') | e %>} +\renewcommand{\sphinxsymbolsname}{<%= _('Symbols') | e %>} +\renewcommand{\sphinxnumbersname}{<%= _('Numbers') | e %>} +\def\pageautorefname{<%= _('page') | e %>} + +<%= addtocaptions %>{\renewcommand{\figurename}{<%= figurename[0] | e | eabbr %>}} +\def\fnum@figure{\figurename\thefigure{}<%= figurename[1] | e %>} + +<%= addtocaptions %>{\renewcommand{\tablename}{<%= tablename[0] | e | eabbr %>}} +\def\fnum@table{\tablename\thetable{}<%= tablename[1] | e %>} + +<%= addtocaptions %>{\renewcommand{\literalblockname}{<%= literalblockname[0].strip() %>}} diff --git a/sphinx/templates/latex/tabular.tex_t b/sphinx/templates/latex/tabular.tex_t new file mode 100644 index 0000000..0a9310a --- /dev/null +++ b/sphinx/templates/latex/tabular.tex_t @@ -0,0 +1,54 @@ +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +<% if 'booktabs' in table.styles -%> +\sphinxthistablewithbooktabsstyle +<% endif -%> +<% if 'borderless' in table.styles -%> +\sphinxthistablewithborderlessstyle +<% endif -%> +<% if 'standard' in table.styles -%> +\sphinxthistablewithstandardstyle +<% endif -%> +<% if 'vlines' in table.styles -%> +\sphinxthistablewithvlinesstyle +<% endif -%> +<% if 'novlines' in table.styles -%> +\sphinxthistablewithnovlinesstyle +<% endif -%> +<% if 'colorrows' in table.styles -%> +\sphinxthistablewithcolorrowsstyle +<% endif -%> +<% if 'nocolorrows' in table.styles -%> +\sphinxthistablewithnocolorrowsstyle +<% endif -%> +<% if table.align -%> + <%- if table.align in ('center', 'default') -%> + \centering + <%- elif table.align == 'left' -%> + \raggedright + <%- else -%> + \raggedleft + <%- endif %> +<%- else -%> + \centering +<%- endif %> +<% if table.caption -%> +\sphinxcapstartof{table} +\sphinxthecaptionisattop +\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %> +\sphinxaftertopcaption +<% elif labels -%> +\phantomsection<%= labels %>\nobreak +<% endif -%> +\begin{tabular}[t]<%= table.get_colspec() -%> +\sphinxtoprule +<%= ''.join(table.header) -%> +<%- if table.header -%> +\sphinxmidrule +<% endif -%> +\sphinxtableatstartofbodyhook +<%=- ''.join(table.body) -%> +\sphinxbottomrule +\end{tabular} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} diff --git a/sphinx/templates/latex/tabulary.tex_t b/sphinx/templates/latex/tabulary.tex_t new file mode 100644 index 0000000..6ebcec6 --- /dev/null +++ b/sphinx/templates/latex/tabulary.tex_t @@ -0,0 +1,54 @@ +\begin{savenotes}\sphinxattablestart +\sphinxthistablewithglobalstyle +<% if 'booktabs' in table.styles -%> +\sphinxthistablewithbooktabsstyle +<% endif -%> +<% if 'borderless' in table.styles -%> +\sphinxthistablewithborderlessstyle +<% endif -%> +<% if 'standard' in table.styles -%> +\sphinxthistablewithstandardstyle +<% endif -%> +<% if 'vlines' in table.styles -%> +\sphinxthistablewithvlinesstyle +<% endif -%> +<% if 'novlines' in table.styles -%> +\sphinxthistablewithnovlinesstyle +<% endif -%> +<% if 'colorrows' in table.styles -%> +\sphinxthistablewithcolorrowsstyle +<% endif -%> +<% if 'nocolorrows' in table.styles -%> +\sphinxthistablewithnocolorrowsstyle +<% endif -%> +<% if table.align -%> + <%- if table.align in ('center', 'default') -%> + \centering + <%- elif table.align == 'left' -%> + \raggedright + <%- else -%> + \raggedleft + <%- endif %> +<%- else -%> + \centering +<%- endif %> +<% if table.caption -%> +\sphinxcapstartof{table} +\sphinxthecaptionisattop +\sphinxcaption{<%= ''.join(table.caption) %>}<%= labels %> +\sphinxaftertopcaption +<% elif labels -%> +\phantomsection<%= labels %>\nobreak +<% endif -%> +\begin{tabulary}{\linewidth}[t]<%= table.get_colspec() -%> +\sphinxtoprule +<%= ''.join(table.header) -%> +<%- if table.header -%> +\sphinxmidrule +<% endif -%> +\sphinxtableatstartofbodyhook +<%=- ''.join(table.body) -%> +\sphinxbottomrule +\end{tabulary} +\sphinxtableafterendhook\par +\sphinxattableend\end{savenotes} |