pub fn def_environment(
name: String,
paramlist: Option<Parameters>,
compiled_replacement: Option<ReplacementClosure>,
options: ConstructorOptions,
)Expand description
Defines an Environment that generates a specific XML fragment.
compiled_replacement is of the same form as for DefConstructor, but will generally include
reference to the #body property.
Upon encountering a \begin{env}: the mode is switched, if needed, else a new group is opened;
then the environment name is noted; the beforeDigest hook is run.
Then the Whatsit representing the begin command (but ultimately the whole environment) is
created and the after_digest_begin hook is run.
Next, the body will be digested and collected until the balancing \end{env}.
Then, any after_digest hook is run, the environment is ended, finally the mode is ended or the
group is closed. The body and \end{env} whatsit are added to the \begin{env}’s whatsit as
body and trailer, respectively.