Module SlipshowSource

Sourcemodule Uri : sig ... end
Sourcemodule Frontmatter : sig ... end
Sourcemodule Compile : sig ... end
Sourcemodule Ast : sig ... end

Extensions to the Cmarkit AST

Sourcemodule Id_map : sig ... end
Sourcemodule Action_plan : sig ... end
Sourcetype starting_state = int
Sourcetype delayed

The additional string in the two functions below correspond to the warnings

Sourceval delayed_to_string : (delayed * string) -> string
Sourceval string_to_delayed : string -> (delayed * string) option
Sourcetype file_reader = Fpath.t -> (string option, [ `Msg of string ]) result

A value of type file_reader, given a path p, outputs:

  • Ok (Some content) if it could read the file. In this case, the content will be included in the output.
  • Ok None if it decided not to read the file. In this case, the file will be linked, if possible.
  • Error (`Msg m) if it decided to try to read the file, but got an error. In this case, the error is reported, and the file is linked (just as Ok None).
Sourceval delayed_from_units : ?options:Frontmatter.Global.t -> ?slipshow_js:Uri.t -> has_speaker_view:bool -> Ast.units -> delayed

This function is used to delay the decision on the starting state. It allows to run convert server-side (which is useful to get images and so on) but let the previewer decide on the starting state.

Sourceval delayed : directory:Fpath.t -> ?options:Frontmatter.Global.t -> ?slipshow_js:Uri.t -> read_file:file_reader -> has_speaker_view:bool -> embed_loc:bool -> Fpath.t -> delayed * Diagnosis.t Grace.Diagnostic.t list

This function is used to delay the decision on the starting state. It allows to run convert server-side (which is useful to get images and so on) but let the previewer decide on the starting state.

Sourceval add_starting_state : ?autofocus:bool -> delayed -> starting_state option -> string
Sourceval convert : directory:Fpath.t -> ?options:Frontmatter.Global.t -> has_speaker_view:bool -> ?autofocus:bool -> ?slipshow_js:Uri.t -> ?starting_state:starting_state -> read_file:file_reader -> embed_loc:bool -> Fpath.t -> string * Diagnosis.t Grace.Diagnostic.t list
Sourceval convert_to_md : embed_loc:bool -> read_file:file_reader -> directory:Fpath.t -> Fpath.t -> string
Sourceval set_no_engine : unit -> unit

Internal only