summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Richardson2020-09-28 12:01:04 +0100
committerAlex Richardson2020-09-28 12:01:04 +0100
commit8bd1d46961b41cc643810fc028c4127279463c36 (patch)
tree9c4b71ae23ba22c9d3f681644aafe85028377714 /src
parent882850db49cffef75e11eef8cf00364611e54e19 (diff)
Handle sectioning commands in saildoc LaTeX output
Diffstat (limited to 'src')
-rw-r--r--src/latex.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/latex.ml b/src/latex.ml
index 6d479a52..3804d07b 100644
--- a/src/latex.ml
+++ b/src/latex.ml
@@ -266,6 +266,10 @@ let latex_of_markdown str =
"\\begin{enumerate}\n\\item "
^ Util.string_of_list "\n\\item " format list
^ "\n\\end{enumerate}"
+ | H1 header -> "\\section*{" ^ (format header) ^ "}\n"
+ | H2 header -> "\\subsection*{" ^ (format header) ^ "}\n"
+ | H3 header -> "\\subsubsection*{" ^ (format header) ^ "}\n"
+ | H4 header -> "\\paragraph*{" ^ (format header) ^ "}\n"
| Br -> "\n"
| NL -> "\n"
| elem -> failwith ("Can't convert to latex: " ^ Omd_backend.sexpr_of_md [elem])