package bracetax
Module Bracetax_transformSource
This module is the main entry point to use bracetax as a library.
The functions here are used to transform Bracetax input to the formats currently handled by the library (XHTML, LaTeX, or a bracetax table of contents).
val brtx_to_html :
writer:Bracetax_signatures.writer ->
?make_section_links:[ `always | `never | `when_labeled ] ->
?doc:bool ->
?title:string ->
?css_link:string ->
?print_comments:bool ->
?filename:string ->
?class_hook:string ->
?img_hook:(string -> string) ->
?url_hook:(string -> string) ->
input_char:(unit -> char option) ->
?separate_header:(string * string * string) ref ->
?deny_bypass:bool ->
unit ->
unitTransformation from Bracetax to HTML (actually almost XHTML). Most optional parameters correspond to command line options of brtx -html.
val brtx_to_latex :
writer:Bracetax_signatures.writer ->
?doc:bool ->
?title:string ->
?use_package:string ->
?deny_bypass:bool ->
?print_comments:bool ->
?href_is_footnote:bool ->
?img_hook:(string -> string) ->
?url_hook:(string -> string) ->
?separate_header:(string * string * string) ref ->
?table_caption_after:bool ->
?filename:string ->
input_char:(unit -> char option) ->
unit ->
unitTransform from Bracetax to LaTeX. Most parameters have the same meaning as for brtx_to_html, except the following ones.
val get_TOC :
writer:Bracetax_signatures.writer ->
?filename:string ->
?make_links:[ `always | `never | `when_labeled ] ->
?list_type:[ `enum | `item ] ->
?numbering:[ `integers | `none ] ->
input_char:(unit -> char option) ->
unit ->
unitRetrieve a table of contents from a Bracetax input. The TOC is itself in Bracetax; it is a set of lists with links.
val string_io :
string ->
Buffer.t ->
Buffer.t ->
Bracetax_signatures.writer * (unit -> char option)Create a writer and a input_char from a string and two Buffer.t. With let w, ic = (string_io input_str output_buffer error_buffer), the writer w will write to output_buffer, transform errors to strings, and output them to error_buffer; ic will take characters from input_str. w and ic can then be used with brtx_to_html and brtx_to_latex.
val str_to_html :
?make_section_links:[ `always | `never | `when_labeled ] ->
?doc:bool ->
?title:string ->
?css_link:string ->
?print_comments:bool ->
?filename:string ->
?class_hook:string ->
?img_hook:(string -> string) ->
?url_hook:(string -> string) ->
?separate_header:(string * string * string) ref ->
?deny_bypass:bool ->
string ->
string * Bracetax_error.error listThis function is a convenience replacement for brtx_to_html, to transform a string into another string together with a list of Error.errors.
val str_to_latex :
?doc:bool ->
?title:string ->
?use_package:string ->
?deny_bypass:bool ->
?print_comments:bool ->
?href_is_footnote:bool ->
?img_hook:(string -> string) ->
?url_hook:(string -> string) ->
?table_caption_after:bool ->
?separate_header:(string * string * string) ref ->
?filename:string ->
string ->
string * Bracetax_error.error listThis function is a convenience replacement for brtx_to_latex, to transform a string into another string together with a list of Error.errors.
val str_to_TOC :
?make_links:[ `always | `never | `when_labeled ] ->
?list_type:[ `enum | `item ] ->
?numbering:[ `integers | `none ] ->
?filename:string ->
string ->
string * Bracetax_error.error listThis function is a convenience replacement for get_TOC, to get the table of contents from a string into another string together with a list of Error.errors.