Fix typo/bug with page breaks after section headings

This commit is contained in:
RunasSudo 2019-12-15 14:08:05 +11:00
parent f83e9cca55
commit e08f43001a
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -133,7 +133,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
# Section # Section
heading_last, self.heading_last = self.heading_last, False heading_last, self.heading_last = self.heading_last, False
return format(r'{<pagebreak>\par<hyperlink>\leftskip=\quotemargin\bfseries\makebox[<lmarg>][l]{<label>}<content>\phantomsection\addcontentsline{toc}{subsubsection}{\protect\numberline{<label>} <content>}\nopagebreak\par}', return format(r'{<pagebreak>\par<hyperlink>\leftskip=\quotemargin\bfseries\makebox[<lmarg>][l]{<label>}<content>\phantomsection\addcontentsline{toc}{subsubsection}{\protect\numberline{<label>} <content>}\nopagebreak\par}',
pagebreak=r'\pagebreak[3]' if not self.heading_last else '', pagebreak=r'\pagebreak[3]' if not heading_last else '',
hyperlink=hyperlink, hyperlink=hyperlink,
label=token.label, label=token.label,
content=self.render_inner(token) content=self.render_inner(token)