LaTeX only: Prefer clean page breaks
This commit is contained in:
parent
2b21860dd0
commit
2bf8cbb8d7
@ -132,7 +132,8 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
|
|||||||
if token.level == 3:
|
if token.level == 3:
|
||||||
# Section
|
# Section
|
||||||
heading_last, self.heading_last = self.heading_last, False
|
heading_last, self.heading_last = self.heading_last, False
|
||||||
return format(r'{\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 '',
|
||||||
hyperlink=hyperlink,
|
hyperlink=hyperlink,
|
||||||
label=token.label,
|
label=token.label,
|
||||||
content=self.render_inner(token)
|
content=self.render_inner(token)
|
||||||
|
Loading…
Reference in New Issue
Block a user