latex writer: move ever template parts into latex.tex_t

Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
This commit is contained in:
Gabriel Laskar 2017-04-24 02:49:15 +02:00 committed by Alizée Penel
parent 75248d1ed1
commit 3691d6ca64
No known key found for this signature in database
GPG Key ID: 1C1838F4682C4EAB
2 changed files with 4 additions and 8 deletions

View File

@ -44,6 +44,10 @@
\newcommand{\sphinxlogo}{<%= logo %>}
\renewcommand{\releasename}{<%= releasename %>}
<%= makeindex %>
\begin{document}
<%= shorthandoff %>
<%= maketitle %>
<%= tableofcontents %>
<%= body %>
<%= atendofbody %>
<%= indices %>

View File

@ -47,13 +47,6 @@ if False:
logger = logging.getLogger(__name__)
BEGIN_DOC = r'''
\begin{document}
%(shorthandoff)s
%(maketitle)s
%(tableofcontents)s
'''
SHORTHANDOFF = r'''
\ifdefined\shorthandoff
\ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
@ -901,7 +894,6 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.curfilestack.append(node.get('docname', ''))
if self.first_document == 1:
# the first document is all the regular content ...
self.body.append(BEGIN_DOC % self.elements)
self.first_document = 0
elif self.first_document == 0:
# ... and all others are the appendices