From 00b8991648c191ecdb16d7152336291660953f10 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 22 Sep 2019 03:48:10 +1000 Subject: [PATCH] Change definition markup to specify level of indentation --- legalmd/latex_renderer.py | 5 +++-- legalmd/legal_token.py | 10 +++++++--- legalmd/rtf_renderer.py | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/legalmd/latex_renderer.py b/legalmd/latex_renderer.py index 87cafdf..7c5da61 100644 --- a/legalmd/latex_renderer.py +++ b/legalmd/latex_renderer.py @@ -153,7 +153,8 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer): def render_definition(self, token): self.heading_last = False - return format(r'\N{\par\leftskip=\dimexpr+1cm\relax\hangindent=1cm \par}\N', + return format(r'\N{\par\leftskip=\dimexpr+cm\relax\relax\hangindent=1cm \par}\N', + level=token.level, content=self.render_inner(token) ) @@ -192,7 +193,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer): def render_note(self, token): self.heading_last = False - return format(r'\N{\nopagebreak\par\footnotesize\selectfont\settowidth{\notetaglength}{\bfseries