mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 00:15:39 +03:00
Tweak multi-module LaTeX output
This commit is contained in:
parent
f09edf443e
commit
4ee4992b54
@ -271,18 +271,28 @@ let rec law_structure_to_latex
|
||||
file label
|
||||
| A.LawInclude (A.CatalaFile _ | A.LegislativeText _) -> ()
|
||||
| A.ModuleDef (id, extern) ->
|
||||
Format.fprintf fmt
|
||||
"\n\\textbf{This defines the \\texttt{%s} module \\texttt{%s}}"
|
||||
(if extern then "external" else "catala")
|
||||
(match language with
|
||||
| Fr ->
|
||||
Format.fprintf fmt "\n\\textbf{Ceci définit le module %s \\texttt{%s}}"
|
||||
(if extern then "externe" else "catala")
|
||||
| _ ->
|
||||
Format.fprintf fmt "\n\\textbf{This defines the %s module \\texttt{%s}}"
|
||||
(if extern then "external" else "catala"))
|
||||
(pre_latexify (Mark.remove id))
|
||||
| A.ModuleUse (id, alias) -> (
|
||||
(match language with
|
||||
| Fr ->
|
||||
Format.fprintf fmt "\n\\textbf{Ce qui suit utilise le module \\texttt{%s}"
|
||||
| _ ->
|
||||
Format.fprintf fmt
|
||||
"\n\\textbf{The following makes use of the module \\texttt{%s}"
|
||||
"\n\\textbf{The following makes use of the module \\texttt{%s}")
|
||||
(pre_latexify (Mark.remove id));
|
||||
match alias with
|
||||
| None -> Format.fprintf fmt "}"
|
||||
| Some al ->
|
||||
Format.fprintf fmt " under the name \texttt{%s}}"
|
||||
(match language with
|
||||
| Fr -> Format.fprintf fmt " sous le nom \\texttt{%s}}"
|
||||
| _ -> Format.fprintf fmt " under the name \\texttt{%s}}")
|
||||
(pre_latexify (Mark.remove al)))
|
||||
| A.LawText t -> Format.fprintf fmt "%s" (pre_latexify t)
|
||||
| A.CodeBlock (_, c, false) when not print_only_law ->
|
||||
|
@ -52,7 +52,7 @@ $ catala Interpret -s A
|
||||
```catala-test-inline
|
||||
$ catala latex
|
||||
|
||||
\textbf{This defines the \texttt{catala} module \texttt{Test\_grave\_char\_en}}
|
||||
\textbf{This defines the catala module \texttt{Test\_grave\_char\_en}}
|
||||
|
||||
\subsection{Law text should be able to contain grave accent ``'.}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user