Skip to content

Commit eef9758

Browse files
committed
Merge branch '2024-1' of https://github.com/nlbdev/mathml-guidelines into 2024-1
2 parents 767b3d3 + 2f819db commit eef9758

File tree

1 file changed

+36
-40
lines changed

1 file changed

+36
-40
lines changed

Guidelines/Nordic MathML Guidelines 2024-1.md

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -621,44 +621,46 @@ Notice that `columnspan` is written this way, because of backwards compatability
621621

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

624-
Example markup for a equation with a label:
624+
Example markup for a block equation with a label:
625625

626626
```html
627-
<math id="eq-1-3">
628-
<mo>(</mo>
629-
<mi>a</mi>
630-
<mo>∘<!----></mo>
631-
<mi>b</mi>
632-
<mo>)</mo>
633-
<mo>∘<!----></mo>
634-
<mi>c</mi>
635-
<mo>=</mo>
636-
<mi>a</mi>
637-
<mo>∘<!----></mo>
638-
<mo>(</mo>
639-
<mi>b</mi>
640-
<mo>∘<!----></mo>
641-
<mi>c</mi>
642-
<mo>)</mo>
643-
<mspace width="5em">
644-
<mtext>(1.3)</mtext>
645-
</math>
627+
<div role="region" class="equation-wrapper" tabindex="0" aria-labelledby="label-1-3" id="eq-1-3">
628+
<math display="block">
629+
<mo>(</mo>
630+
<mi>a</mi>
631+
<mo>∘<!----></mo>
632+
<mi>b</mi>
633+
<mo>)</mo>
634+
<mo>∘<!----></mo>
635+
<mi>c</mi>
636+
<mo>=</mo>
637+
<mi>a</mi>
638+
<mo>∘<!----></mo>
639+
<mo>(</mo>
640+
<mi>b</mi>
641+
<mo>∘<!----></mo>
642+
<mi>c</mi>
643+
<mo>)</mo>
644+
<mspace width="5em"/>
645+
<mtext id="label-1-3">(1.3)</mtext>
646+
</math>
647+
</div>
646648
```
647649

648-
It is required that a labeled equation has
649-
- an ID based on the `<mtext>` label and the ID is in the `<math>` element
650-
- `<mspace>` for spacing before the label
651-
- label in `<mtext>`.
650+
It is required that a labeled block equation has a `div` parent with the attributes
651+
- `class="equation-wrapper"`
652+
- `role="region"`
653+
- `tabindex="0"`
654+
- `aria-labelledby`, where referenced `id` is the `<mtext>` **label's** `id`.
655+
- `id` that is based on the `<mtext>` label
652656

653-
**Note** that the element `<mlabeledtr>` is not allowed to use for labeling.
654-
655-
<div style="border: 1px solid black">
657+
These requirements also hold for the labeled block equation:
658+
- the `<math>` element has the attribute `display="block"`
659+
- the label of the equation is in the `<mtext>` element and the `<mtext>` element has an `id` that is based on the `<mtext>` content
660+
- `<mspace>` for spacing between the equationa and the label
661+
- label is in the `<mtext>`.
656662

657-
<span style="background-color: yellow;">How to handle?</span>
658-
- MathJax doesn't reflow. Should we use a div-wrapper (compare to EPUB 2024 guidelines' table-wrapper)
659-
- Should we have standard spacing with `<mspace>`?
660-
661-
</div>
663+
**Note** that the element `<mlabeledtr>` is not allowed to use for labeling.
662664

663665
When the equation is later referenced, use the ID of the `<math>` element to link back to the equation. Example markup of referencing the equation:
664666

@@ -900,6 +902,8 @@ Example of the rendering and mark up of equation solving with commentary text:
900902

901903
### When to use images of mathematical content
902904

905+
**Open questions**: Is this optional for the ordering agencies? Which parts are optional? Shoud we just reference EPUB guidelines, or leave it ambigious?
906+
903907
There are cases when all of the mathematical content can't be captured with just MathML. Example of such notation in a study book that can't be replicated with just MathML:
904908

905909
![6 by 3 matrix with a arrow on the bottom of it pointing to the first column of the matrix with the text 'Left most nonzero column'.](images/matrix-with-notation-below.png)
@@ -918,14 +922,6 @@ Example markup:
918922

919923
Follow the Ordering agency's markup for image descriptions. The above is just an example.
920924

921-
<div style="border: 1px solid black;">
922-
923-
<span style="background-color: yellow;">How to handle?</span>
924-
925-
Is this optional for the ordering agencies? Which parts are optional? Shoud we just reference EPUB guidelines, or leave it ambigious?
926-
927-
</div>
928-
929925

930926
### Chemistry {#chemistry-in-mathml}
931927
<!-- I'm doing this ID thing wrong, aren't I? /Tim -->

0 commit comments

Comments
 (0)