This processor supports MathML equations.
Suppose that you need to change the font of MathML equations from the documentation, and also
add some padding. The MathML fragments are wrapped in elements that have the class
equation-d/equation-block or equation-d/equation-inline,
so you can match them with:
*[class ~="equation-d/equation-block"],
*[class ~="equation-d/equation-inline"]{
font-family:"courier new";
font-size:1.5em;
padding:1em;
}
By default, both <fig> and
<equation-figure> elements are numbered as figures. To use a
different type of numbering for equations, use the following rules in your customization CSS:
*[class ~= "equation-d/equation-figure"]:has(*[class ~= "topic/title"]) {
counter-increment: equationcount;
}
*[class ~= "topic/fig"] .fig--title-label {
content: "Figure";
}
*[class ~= "equation-d/equation-figure"] .fig--title-label {
content: "Equation";
}
/* Shallow and Deep Numbering. */
*[class ~= "topic/fig"] .fig--title-label:after {
content: " " counter(figcount) ". ";
}
*[class ~= "equation-d/equation-figure"] .fig--title-label:after {
content: " " counter(equationcount) ". ";
}
/* Deep Chapter Scope and Deep Chapter Scope No Page Reset Numbering. */
*[class ~= "map/map"][numbering ^= 'deep-chapter-scope'] *[class ~= "topic/fig"] > figcaption > .fig--title-label:after {
content: " " counter(chapter) "-" counter(figcount) " ";
}
*[class ~= "map/map"][numbering ^= 'deep-chapter-scope'] *[class ~= "equation-d/equation-figure"] > figcaption > .fig--title-label:after {
content: " " counter(chapter) "-" counter(equationcount) " ";
}
If there are links to these figures/equations, the following rules must also be added:
/* Shallow and Deep Numbering. */
*[class ~= "topic/xref"][href][type = "equation-figure"] {
content: "Equation " target-counter(attr(href), equationcount);
}
*[class ~= "topic/xref"][href][type = "fig"] {
content: "Figure " target-counter(attr(href), figcount);
}
/* Deep Chapter Scope and Deep Chapter Scope No Page Reset Numbering. */
*[class ~= "map/map"][numbering ^= 'deep-chapter-scope'] *[class ~= "topic/xref"][href][type = "equation-figure"] {
content: "Equation " target-counter(attr(href), chapter) "-" target-counter(attr(href), equationcount);
}
*[class ~= "map/map"][numbering ^= 'deep-chapter-scope'] *[class ~= "topic/xref"][href][type = "fig"] {
content: "Figure " target-counter(attr(href), chapter) "-" target-counter(attr(href), figcount);
}