Skip to content

Commit 515ae67

Browse files
write section on <mtext>
Answers #11
1 parent 22ccf9c commit 515ae67

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

Guidelines/Nordic MathML Guidelines 2024-1.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,56 @@ The `<mi>` element is used to denote variables and other identifiers. An identif
177177

178178
The ellipsis or three dots &#x2026; are also an identifier `<mi>&#x2026;</mi>`.
179179

180-
#### `<mtext>`
180+
#### Text inside math expressions `<mtext>`
181+
182+
The `<mtext>` element is used to denote text that doesn't have any explicit mathematical meaning. It could be used for notation, commentary or for examples in study books.
183+
184+
Use as little of `<mtext>` as possible. When it is possible to use plain HTML for text, use it.
185+
186+
Here is an example when `<mtext>` has been used in the wrong way:
187+
188+
```html
189+
<p>After this lemma
190+
<math>[mathematical expression]
191+
<mtext> we can see that this holds for </mtext>
192+
[more mathematical expressions]
193+
</math>
194+
and it happens so.</p>
195+
```
196+
197+
The explanatory text in between the math expressions is regular text and part of the paragraph and should instead be written like this:
198+
199+
```html
200+
<p>After this lemma
201+
<math>[mathematical expression]</math>
202+
we can see that this holds for
203+
<math>[more mathematical expression]</math>
204+
and it happens so.</p>
205+
```
206+
207+
It should only be used in places where the visual rendering requires it.
208+
209+
Examples of this are in tabular math, such as equations solving, and what is seen often in study books: $\frac{\text{numerator}}{\text{denominator}}$.
210+
211+
```html
212+
<math>
213+
<mfrac>
214+
<mtext>numerator</mtext>
215+
<mtext>denominator</mtext>
216+
</mfrac>
217+
</math>
218+
```
219+
220+
When a notation has written words, then you should use `<mtext>` as well. For example in indeces $g_{weight}$. This would be marked up as
221+
222+
```html
223+
<math>
224+
<msub>
225+
<mi>g</mi>
226+
<mtext>weight</mtext>
227+
</msub>
228+
</math>
229+
```
181230

182231
### General Layout Schemata
183232

0 commit comments

Comments
 (0)