innoconv_mintmod.mintmod_filter.commands

Handle mintmod LaTeX commands.

Note

Provide a handle_CMDNAME function for handling CMDNAME command. You need to slugify the command name.

Example: handle_msection method will receive the command \MSection.

class innoconv_mintmod.mintmod_filter.commands.Commands[source]

Handlers for commands are defined here.

Given the command:

\MSection{Foo}

The handler method handle_msection receives the following arguments:

handle_bigskip(cmd_args, elem)[source]

Handle \bigskip command.

handle_clearpage(cmd_args, elem)[source]

Handle \clearpage command.

handle_glqq(cmd_args, elem)[source]

Handle \glqq command.

handle_grqq(cmd_args, elem)[source]

Handle \grqq command.

handle_highlight(cmd_args, elem)[source]

Handle highlight command.

This seems to be some sort of formatting command. There’s no documentation and it does nothing in the mintmod code. We just keep the information here.

handle_hspace(cmd_args, elem)[source]

Handle \hspace and \hspace* command.

handle_input(cmd_args, elem)[source]

Handle \input command.

handle_jhtmlhinweiseingabefunktionen(cmd_args, elem)[source]

Handle \jHTMLHinweisEingabeFunktionen command.

handle_jhtmlhinweiseingabefunktionenexp(cmd_args, elem)[source]

Handle \jHTMLHinweisEingabeFunktionenExp command.

handle_mblank(cmd_args, elem)[source]

Handle \MBlank command.

handle_mcontenttable(cmd_args, elem)[source]

Handle \MContentTable command.

handle_mcopyrightcollection(cmd_args, elem)[source]

Handle \MCopyrightCollection command.

handle_mcopyrightlabel(cmd_args, elem)[source]

Handle \MCopyrightLabel command.

handle_mdeclaresiteuxid(cmd_args, elem)[source]

Handle \MDeclareSiteUXID command.

The command can occur in an environment that is parsed by a subprocess. In this case there’s no last header element. The process can’t set the ID because it can’t access the doc tree. Instead it replaces the \MDeclareSiteUXID by an element that is found by the parent process using function innoconv.utils.extract_identifier().

handle_mdirectrouletteexercises(cmd_args, elem)[source]

Handle \MDirectRouletteExercises command.

Remember points for next question.

handle_medskip(cmd_args, elem)[source]

Handle \medskip command.

handle_mentry(cmd_args, elem)[source]

Handle \MEntry command.

This command creates an entry for the index.

handle_mequationitem(cmd_args, elem)[source]

Handle \MEquationItem command.

Handle \MExtLink command.

This command inserts an external link.

handle_mformelzoomhint(cmd_args, elem)[source]

Handle \MFormelZoomHint command.

handle_mglobalchaptertag(cmd_args, elem)[source]

Handle \MGlobalChapterTag command.

handle_mglobalconftag(cmd_args, elem)[source]

Handle \MGlobalConfTag command.

handle_mglobaldatatag(cmd_args, elem)[source]

Handle \MGlobalDataTag command.

handle_mglobalfavotag(cmd_args, elem)[source]

Handle \MGlobalFavoTag command.

handle_mgloballocationtag(cmd_args, elem)[source]

Handle \MGlobalLocationTag command.

handle_mgloballogintag(cmd_args, elem)[source]

Handle \MGlobalLoginTag command.

handle_mgloballogouttag(cmd_args, elem)[source]

handle \MGlobalLogoutTag command.

handle_mglobalsearchtag(cmd_args, elem)[source]

Handle \MGlobalSearchTag command.

handle_mglobalstart(cmd_args, elem)[source]

Handle \MGlobalStart command.

handle_mglobalstesttag(cmd_args, elem)[source]

Handle \MGlobalSTestTag command.

handle_mgraphics(cmd_args, elem, add_desc=True)[source]

Handle \MGraphics.

Embed an image with title.

Example: MGraphics{img.png}{scale=1}{title}

handle_mgraphicssolo(cmd_args, elem)[source]

Handle \MGraphicsSolo.

Embed an image without title. Uses filename as image title.

handle_mgroupbutton(cmd_args, elem)[source]

Handle \MGroupButton command.

Render empty as this button is displayed automatically in clients.

handle_mindex(cmd_args, elem)[source]

Handle \MIndex command.

This command creates an invisible entry for the index.

handle_minputhint(cmd_args, elem)[source]

Handle \MInputHint command.

handle_mlabel(cmd_args, elem)[source]

Handle \MLabel command.

Will search for the previous header element and update its ID to the ID defined in the command. Otherwise proceed like \MDeclareSiteUXID.

Hides identifier in fake element like (innoconv_mintmod.mintmod_filter.commands.Commands.handle_mdeclaresiteuxid()).

handle_mlcheckbox(cmd_args, elem)[source]

Handle questions defined by \MLCheckbox command

handle_mlfunctionquestion(cmd_args, elem)[source]

Handle questions defined by \MLFunctionQuestion command

handle_mlintervalquestion(cmd_args, elem)[source]

Handle questions defined by \MLIntervalQuestion command

handle_mlparsedquestion(cmd_args, elem)[source]

Handle questions defined by \MLParsedQuestion command

handle_mlquestion(cmd_args, elem)[source]

Handle questions defined by \MLQuestion command

handle_mlsimplifyquestion(cmd_args, elem)[source]

Handle questions defined by \MLSimplifyQuestion command

handle_mlspecialquestion(cmd_args, elem)[source]

Handle questions defined by \MLSpecialquestion command

handle_mmodstartbox(cmd_args, elem)[source]

Handle \MModStartBox command.

This command displays a table of content for the current chapter. This is handled elswhere and becomes a no-op.

handle_mnref(cmd_args, elem)[source]

Handle \MNRef command.

This command inserts a section link.

handle_modsemph(cmd_args, elem)[source]

Handle modsemph command.

handle_modstextbf(cmd_args, elem)[source]

Handle modstextbf command.

handle_mpragma(cmd_args, elem)[source]

Handle \MPragma command.

This command was used to embed build time flags for mintmod. It becomes a no-op.

handle_mprintindex(cmd_args, elem)[source]

Handle \MPrintIndex command.

Index will be printed automatically. It becomes a no-op.

handle_mpullsite(cmd_args, elem)[source]

Handle \MPullSite command.

handle_mref(cmd_args, elem)[source]

Handle \MRef command.

This command translates to \vref.

handle_msection(cmd_args, elem)[source]

Handle \MSection command.

handle_msetpoints(cmd_args, elem)[source]

Handle \MSetPoints command.

Remember points for next question.

handle_msetsectionid(cmd_args, elem)[source]

Handle \MSetSectionID command.

Will search for the previous header element and update its ID to the ID defined in the command.

handle_msetsubject(cmd_args, elem)[source]

Handle \MSetSubject{} command.

Command defines the category.

handle_msref(cmd_args, elem)[source]

Handle \MSRef command.

This command inserts a fragment-style link.

handle_msubject(cmd_args, elem)[source]

Handle \MSubject{title} command.

Command defines the document title.

handle_msubsection(cmd_args, elem)[source]

Handle \MSubsection

handle_msubsubsection(cmd_args, elem)[source]

Handle \MSubsubsection

handle_msubsubsectionx(cmd_args, elem)[source]

Handle \MSubsubsectionx command. Which will generate a level 4 header.

handle_msubsubsubsectionx(cmd_args, elem)[source]

Handle \MSubsubsubsectionx command. Which will generate a level 4 header.

From logical point of view this should be level 5. But from looking at the sources, level 4 is correct.

handle_mtikzauto(cmd_args, elem)[source]

Handle \MTikzAuto command.

Create a CodeBlock with TikZ code.

handle_mtitle(cmd_args, elem)[source]

Handle \MTitle command.

This is an equivalent to \subsubsection

handle_mugraphics(cmd_args, elem)[source]

Handle \MUGraphics.

Embed an image with title.

handle_mugraphicssolo(cmd_args, elem)[source]

Handle \MUGraphicsSolo.

Embed an image without title.

handle_mvideo(cmd_args, elem)[source]

Handle \MVideo.

Just return a Link Element.

handle_mwatermarksettings(cmd_args, elem)[source]

Handle \MWatermarkSettings command.

handle_myoutubevideo(cmd_args, elem)[source]

Handle \MYoutubeVideo.

Just return a Link Element.

handle_mzahl(cmd_args, elem)[source]

Handle \MZahl command.

This is a math command but in fact occurs also in text.

handle_mzxyzhltrennzeichen(cmd_args, elem)[source]

Handle \MZXYZhltrennzeichen command.

It is transformed to a \decmarker command and later substituted by MathJax. This is already in math substitions but as it occurs outside of math environments it’s defined here too.

handle_newline(cmd_args, elem)[source]

Handle newline command.

handle_newpage(cmd_args, elem)[source]

Handle \newpage command.

A display related command. It becomes a no-op.

handle_noindent(cmd_args, elem)[source]

Handle \noindent command.

handle_quad(cmd_args, elem)[source]

Handle \quad command.

handle_smallskip(cmd_args, elem)[source]

Handle \smallskip command.

handle_special(cmd_args, elem)[source]

Handle \special command.

This command is used to embed HTML in LaTeX source.

handle_vspace(cmd_args, elem)[source]

Handle \vspace command.

A display related command. It becomes a no-op.