Skip to content

Commit 0327785

Browse files
use wrapper for the block math content
The class `equation-wrapper` should have the attribute `overflow-x: auto;` so that the equation would have a scroll bar. Note that this only works for a block equation.
1 parent 288c6b8 commit 0327785

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

Guidelines/Nordic MathML Guidelines 2024-1.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -617,31 +617,35 @@ Notice that `columnspan` is written this way, because of backwards compatability
617617

618618
It is common to label equations and then reference these equations later on in mathematical text.
619619

620-
Example markup for a equation with a label:
620+
Example markup for a block equation with a label:
621621

622622
```html
623-
<math id="eq-1-3">
624-
<mo>(</mo>
625-
<mi>a</mi>
626-
<mo>∘<!----></mo>
627-
<mi>b</mi>
628-
<mo>)</mo>
629-
<mo>∘<!----></mo>
630-
<mi>c</mi>
631-
<mo>=</mo>
632-
<mi>a</mi>
633-
<mo>∘<!----></mo>
634-
<mo>(</mo>
635-
<mi>b</mi>
636-
<mo>∘<!----></mo>
637-
<mi>c</mi>
638-
<mo>)</mo>
639-
<mspace width="5em">
640-
<mtext>(1.3)</mtext>
641-
</math>
623+
<div class="equation-wrapper">
624+
<math display="block" id="eq-1-3">
625+
<mo>(</mo>
626+
<mi>a</mi>
627+
<mo>∘<!----></mo>
628+
<mi>b</mi>
629+
<mo>)</mo>
630+
<mo>∘<!----></mo>
631+
<mi>c</mi>
632+
<mo>=</mo>
633+
<mi>a</mi>
634+
<mo>∘<!----></mo>
635+
<mo>(</mo>
636+
<mi>b</mi>
637+
<mo>∘<!----></mo>
638+
<mi>c</mi>
639+
<mo>)</mo>
640+
<mspace width="5em">
641+
<mtext>(1.3)</mtext>
642+
</math>
643+
</div>
642644
```
643645

644646
It is required that a labeled equation has
647+
- a `<div>` wrapper with the class `equation-wrapper`
648+
- the `<math>` has the attribute `display="block"`
645649
- an ID based on the `<mtext>` label and the ID is in the `<math>` element
646650
- `<mspace>` for spacing before the label
647651
- label in `<mtext>`.

0 commit comments

Comments
 (0)