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: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
\jHTMLHinweisEingabeFunktionen
command.
-
handle_jhtmlhinweiseingabefunktionenexp
(cmd_args, elem)[source]¶ Handle
\jHTMLHinweisEingabeFunktionenExp
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 functioninnoconv.utils.extract_identifier()
.
-
handle_mdirectrouletteexercises
(cmd_args, elem)[source]¶ Handle
\MDirectRouletteExercises
command.Remember points for next question.
-
handle_mentry
(cmd_args, elem)[source]¶ Handle
\MEntry
command.This command creates an entry for the index.
-
handle_mextlink
(cmd_args, elem)[source]¶ Handle
\MExtLink
command.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
\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_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_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_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_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_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_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_mugraphicssolo
(cmd_args, elem)[source]¶ Handle
\MUGraphicsSolo
.Embed an image without title.
-
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_newpage
(cmd_args, elem)[source]¶ Handle
\newpage
command.A display related command. It becomes a no-op.