Module Touist.Latex

Transform any AST (at any stage of transformation) to latex.

Note that the headers are not included; if you want to compile the resulting latex text in a real latex document, you would need to add (fr example):

      \documentclass[11pt]{report}
      \usepackage{mathtools}
      \begin{document}
        % thing produced by latex_of_ast
      \end{document}

Some details on the latex code produced:

val latex_of_ast : full:bool ‑> Types.AstSet.elt ‑> string

latex_of_ast turns an AST into latex. Two latex variants are targeted:

Utility

val ast_fun : (bool ‑> Types.Ast.t ‑> bool) ‑> bool ‑> Types.Ast.t ‑> bool

ast_fun will apply f on all *formula*-related elements of the AST where cond is true. The tranversal order should not be considered. Whenever a non-formula is given, acc will be immediatly returned.

val contains_newline : Types.Ast.t ‑> bool
val is_binary_op : Types.Ast.t ‑> bool
val contains_binary_op : Types.Ast.t ‑> bool