From 263ffca94d22e1ff7ce32d8f6ba782b0fcacd0d7 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 28 Sep 2020 12:03:26 +0100 Subject: LaTeX: Add newline after itemize and enumerate environments --- src/latex.ml | 4 ++-- test/latex/candperm.commands.tex.exp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/latex.ml b/src/latex.ml index 3804d07b..381fc649 100644 --- a/src/latex.ml +++ b/src/latex.ml @@ -261,11 +261,11 @@ let latex_of_markdown str = | (Ul list | Ulp list) -> "\\begin{itemize}\n\\item " ^ Util.string_of_list "\n\\item " format list - ^ "\n\\end{itemize}" + ^ "\n\\end{itemize}\n" | (Ol list | Olp list) -> "\\begin{enumerate}\n\\item " ^ Util.string_of_list "\n\\item " format list - ^ "\n\\end{enumerate}" + ^ "\n\\end{enumerate}\n" | H1 header -> "\\section*{" ^ (format header) ^ "}\n" | H2 header -> "\\subsection*{" ^ (format header) ^ "}\n" | H3 header -> "\\subsubsection*{" ^ (format header) ^ "}\n" diff --git a/test/latex/candperm.commands.tex.exp b/test/latex/candperm.commands.tex.exp index 561975f5..14153396 100644 --- a/test/latex/candperm.commands.tex.exp +++ b/test/latex/candperm.commands.tex.exp @@ -51,7 +51,8 @@ An exception is raised if: \begin{itemize} \item \emph{cs1.tag} is not set. \item \emph{cs1} is sealed. -\end{itemize}}{\lstinputlisting[language=sail]{out/fclCAndPermMarkdownWithExceptionszexecute33a689e3a631b9b905b85461d3814943.tex}}}} +\end{itemize} +}{\lstinputlisting[language=sail]{out/fclCAndPermMarkdownWithExceptionszexecute33a689e3a631b9b905b85461d3814943.tex}}}} -- cgit v1.2.3