Module Superbol_free_lib.Command_texi2rst
and block =
| EMPTY_LINE
| LINE of line
| NODE of string
| BLOCK of string * blocks
| LEVEL of int * string option * line * blocks
| ITEMS of string * string * (line * blocks) list
| INDEX of string
| DIAGRAM of string * blocks
type document = {
basename : string;
title : line option;
subtitle : line option;
authors : line list;
content : blocks;
}
val string_of_line : line -> string
val split_command : string -> string * string
type block_kind =
| RawBlock
| Level of int * string option * line
| Items of string * line option * (line * blocks) list
type closer =
| EOL
| BRACE
| QUOTE
val read : path:string list -> string -> document
val spaces : int -> string
val print_blocks : Stdlib.out_channel -> blocks -> unit
val print_doc : ?dir:string -> document -> unit
val label_of_title : string -> string
type verbatim =
| Block
| LiteralBlock
| ParsedLiteral
type ctx = {
doc : document;
mutable math : bool list;
mutable verbatim : verbatim list;
mutable line : int;
line_indexes : (int, string) Stdlib.Hashtbl.t;
new_line_indexes : (int, string) Stdlib.Hashtbl.t;
line_anchors : (int, string) Stdlib.Hashtbl.t;
new_line_anchors : (int, string) Stdlib.Hashtbl.t;
refs_external : (string * string) EzCompat.StringMap.t;
refs_allowed : EzCompat.StringSet.t option;
mutable files : string list;
mutable unknown_macros : LOCATION.t EzCompat.StringMap.t;
mutable refs_created : EzCompat.StringSet.t;
mutable anchors_created : EzCompat.StringSet.t;
mutable index_created : EzCompat.StringSet.t;
mutable refs_used : LOCATION.t EzCompat.StringMap.t;
}
val add_index : ctx -> EzCompat.StringSet.elt -> unit
val add_anchor : ctx -> string -> unit
val place_for_indexes : ctx -> OUTPUT.t -> string -> unit
val rst_escape : string -> string
val rst_trim : string -> string
val add_ref :
ctx ->
LOCATION.t ->
EzCompat.StringSet.elt ->
EzCompat.StringSet.elt
val parse_args : ctx -> line -> EzCompat.StringSet.elt list
val rst_of_line0 : ctx -> line -> EzCompat.StringSet.elt
val rst_of_line : ctx -> line -> EzCompat.StringSet.elt
val output_level : ctx -> OUTPUT.t -> int -> ?number:string -> line -> unit
val action :
path:string list ->
filename:string ->
?target:string ->
unit ->
unit
val cmd : Ezcmd.V2.EZCMD.TYPES.sub