Subsection 4.9.12 Your Macros
These go in the
<docinfo>
section, wrapped in a <macros>
element. Keep them simple—one or two arguments, and one-line definitions. This is not the place to be fancy, and not the place to try to end-run the structural aspects of PreTeXt. The idea is to define something like \adjoint{A}
for the matrix A
to be a superscript asterisk, and later you can change your mind and use a superscript dagger instead. Keep in the spirit of PreTeXt and use readable, semantic macros. For example, do not use \a{A}
for the adjoint of A
. Repeating: keep your LaTeX macros simmple, and to a single line.PreTeXt will use your macros correctly for print and for HTML, after erasing whitespace from the left margin, and stripping LaTeX comments.
The name of your macros also cannot contain any numbers, otherwise MathJax will “silently” fail and may not read any subsequent macros you might have. This is important because PreTeXt will place custom macros for you at the end of your own, defined at Subsection 4.9.4, to be used. Those would fail to be processed by MathJax if your own macros caused it to stop reading.