this repo has no description
at main 100 lines 1.8 kB view raw
1(** Raw latex primitives: 2 - macro and environment definitions 3 - text escaping *) 4 5type pr = Format.formatter -> unit 6(** {1 Helper types} *) 7 8type 'a with_options = ?options:pr list -> 'a 9 10type ('a, 'b) tr = 'a Fmt.t -> 'b Fmt.t 11 12type 'a t = ('a, 'a) tr 13 14(** {1 Helper functions} *) 15module Escape : sig 16 val text : code_hyphenation:bool -> string -> string 17 18 val ref : string Fmt.t 19end 20 21val break : Types.break_hierarchy Fmt.t 22 23val rightarrow : pr 24 25val label : string Fmt.t 26 27val verbatim : string Fmt.t 28 29val pageref_star : string Fmt.t 30 31val hyperref : string -> 'a t 32 33val href : string -> 'a t 34 35val ref : string Fmt.t 36 37val url : string Fmt.t 38 39val footnote : string Fmt.t 40 41val emph : 'a t 42 43val bold : 'a t 44 45val subscript : 'a t 46 47val superscript : 'a t 48 49val section : 'a t 50 51val subsection : 'a t 52 53val subsubsection : 'a t 54 55val paragraph : 'a t 56 57val enumerate : 'a t 58 59val itemize : 'a t 60 61val description : ('a, ('a * 'a) list) tr 62 63val item : 'a t with_options 64 65val small_table : ('a, Types.alignment list option * 'a list list) tr 66 67val input : Fpath.t Fmt.t 68 69val includegraphics : 'a t 70 71(** {1 Required OCaml-specific primitives} 72 All the macro should be implemented as "ocaml"-suffixed macro in the latex 73 preamble *) 74 75val inline_code : 'a t 76(** {2 Code block customization} *) 77 78val code_fragment : 'a t 79 80val code_block : 'a t 81 82(** {2 Package-dependent primitives}*) 83 84val indent : 'a t 85(** expected to be implemented with changepage/adjustwidth*) 86 87val ocamltabular : column_desc:pr -> 'a t 88(** Any tabular implementation that works well with at most 10 rows *) 89 90(** {2 Tags} *) 91 92val ocamltag : string -> 'a t 93(** tag (e.g keyword, type-var, ...) are rendered to 94 {v \ocamltag{tagname}{content} v} *) 95 96(** {2 Math mode} *) 97 98val math : string Fmt.t 99 100val equation : string Fmt.t