innoconv_mintmod.mintmod_filter.environments¶
Handle mintmod LaTeX environments.
Note
Provide a handle_ENVNAME function for handling ENVNAME environment.
You need to slugify the
environment name.
Example: handle_mxcontent method will receive the
\begin{MXContent}…\end{MXContent} environment.
-
class
innoconv_mintmod.mintmod_filter.environments.Environments[source]¶ Handlers for environments are defined here.
Given the environment:
\begin{MXContent}{Foo title long}{Foo title}{STD} Foo content \end{MXContent}
The handler method
handle_mxcontentreceives the following arguments:elem_content:'Foo content'cmd_args:['Foo title long', 'Foo title', 'STD']elem:panflute.elements.RawBlock
-
handle_itemize(elem_content, env_args, elem)[source]¶ Handle itemize environments, that were not correctly recognized by pandoc. This e.g. happens if there are
\MExerciseItemsenvironments contained in the items.
-
handle_mexercisecollection(elem_content, env_args, elem)[source]¶ Handle
\MExerciseCollectionenvironment.
-
handle_mexerciseitems(elem_content, env_args, elem)[source]¶ Handle
\MExerciseitemsenvironments by returning an ordered list containing the\items defined in the environment. This is needed on top of handle_itemize as there are also mexerciseitems environments outside itemize environments.
-
handle_mquestiongroup(elem_content, env_args, elem)[source]¶ Handle
\MQuestionGroupenvironments. That are used to group together exercises, in order to allow synchronous validation. Especially used in checkbox grids. In mintmod, a button is also rendered below the contained exercises in the group. This function just returns a div with a class, in order to leave the validation logic, to client scripts