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_msectionreceives the following arguments:cmd_args:['Foo']elem:panflute.base.Element
-
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_jhtmlhinweiseingabefunktionen(cmd_args, elem)[source]¶ Handle
\jHTMLHinweisEingabeFunktionencommand.
-
handle_jhtmlhinweiseingabefunktionenexp(cmd_args, elem)[source]¶ Handle
\jHTMLHinweisEingabeFunktionenExpcommand.
-
handle_mdeclaresiteuxid(cmd_args, elem)[source]¶ Handle
\MDeclareSiteUXIDcommand.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
\MDeclareSiteUXIDby an element that is found by the parent process using functioninnoconv.utils.extract_identifier().
-
handle_mdirectrouletteexercises(cmd_args, elem)[source]¶ Handle
\MDirectRouletteExercisescommand.Remember points for next question.
-
handle_mentry(cmd_args, elem)[source]¶ Handle
\MEntrycommand.This command creates an entry for the index.
-
handle_mextlink(cmd_args, elem)[source]¶ Handle
\MExtLinkcommand.This command inserts an external link.
-
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
\MGroupButtoncommand.Render empty as this button is displayed automatically in clients.
-
handle_mindex(cmd_args, elem)[source]¶ Handle
\MIndexcommand.This command creates an invisible entry for the index.
-
handle_mlabel(cmd_args, elem)[source]¶ Handle
\MLabelcommand.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_mlfunctionquestion(cmd_args, elem)[source]¶ Handle questions defined by
\MLFunctionQuestioncommand
-
handle_mlintervalquestion(cmd_args, elem)[source]¶ Handle questions defined by
\MLIntervalQuestioncommand
-
handle_mlparsedquestion(cmd_args, elem)[source]¶ Handle questions defined by
\MLParsedQuestioncommand
-
handle_mlsimplifyquestion(cmd_args, elem)[source]¶ Handle questions defined by
\MLSimplifyQuestioncommand
-
handle_mlspecialquestion(cmd_args, elem)[source]¶ Handle questions defined by
\MLSpecialquestioncommand
-
handle_mmodstartbox(cmd_args, elem)[source]¶ Handle
\MModStartBoxcommand.This command displays a table of content for the current chapter. This is handled elswhere and becomes a no-op.
-
handle_mpragma(cmd_args, elem)[source]¶ Handle
\MPragmacommand.This command was used to embed build time flags for mintmod. It becomes a no-op.
-
handle_mprintindex(cmd_args, elem)[source]¶ Handle
\MPrintIndexcommand.Index will be printed automatically. It becomes a no-op.
-
handle_msetpoints(cmd_args, elem)[source]¶ Handle
\MSetPointscommand.Remember points for next question.
-
handle_msetsectionid(cmd_args, elem)[source]¶ Handle
\MSetSectionIDcommand.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
\MSRefcommand.This command inserts a fragment-style link.
-
handle_msubject(cmd_args, elem)[source]¶ Handle
\MSubject{title}command.Command defines the document title.
-
handle_msubsubsectionx(cmd_args, elem)[source]¶ Handle
\MSubsubsectionxcommand. Which will generate a level 4 header.
-
handle_msubsubsubsectionx(cmd_args, elem)[source]¶ Handle
\MSubsubsubsectionxcommand. 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
\MTikzAutocommand.Create a
CodeBlockwith TikZ code.
-
handle_mtitle(cmd_args, elem)[source]¶ Handle
\MTitlecommand.This is an equivalent to
\subsubsection
-
handle_mugraphicssolo(cmd_args, elem)[source]¶ Handle
\MUGraphicsSolo.Embed an image without title.
-
handle_mzahl(cmd_args, elem)[source]¶ Handle
\MZahlcommand.This is a math command but in fact occurs also in text.
-
handle_mzxyzhltrennzeichen(cmd_args, elem)[source]¶ Handle
\MZXYZhltrennzeichencommand.It is transformed to a
\decmarkercommand 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_newpage(cmd_args, elem)[source]¶ Handle
\newpagecommand.A display related command. It becomes a no-op.