Math Formatting and Placement Considerations
Once you create accessible math code, the next step is placing it correctly within the page's context. This page has some examples showing math code that uses words or phrases as variables, math code with punctuation (commas), in a list, and in a table, and a link to a more comprehensive resource. You are always welcome to speak to a consultant if you have questions.
Using Words or Phases as Variables
Often words or phrases are used as variables. For example:
crude birth rate=number of birthsmidyear population×100
When this is the case, make sure the variables are coded correctly. You can use the EquatIO screenshot reader to generate the math code, or handtype it into the WIRIS editor. Either way, proofread the code before using it, making sure the text variables are coded as text. Using the example above, "crude birth rate" would be <mtext>crude birth rate</mtext>
(the editor uses   for spaces). You may need to highlight the text portion and edit the code using the T icon in the formatting menu of the editor, as shown in Figure 13.
Using Math Code With Punctuation
Sentence punctuation should not be included in the math code because a comma in a math equation has a different meaning than a comma in a sentence, which is why sentence punctuation should be outside the math tags.
If P(E)=14 , P(F)=13 , and P(E∩F)=16
For Example:
<p>If <math></math>, <math></math>, and <math></math>.</p>
Using Math in Lists and Tables
Math code can be formatted inside HTML tags such as in a list or a table.
List Example
- P(E)=14
- P(F)=13
- P(E∩F)=16
Expand to see the list code
<ul>
<li><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi> P </mi>
<mrow>
<mo> ( </mo>
<mi> E </mi>
<mo> ) </mo>
</mrow>
<mo> = </mo>
<mfrac>
<mn> 1 </mn>
<mn> 4 </mn>
</mfrac>
</mrow>
</math></li>
<li><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi> P </mi>
<mrow>
<mo> ( </mo>
<mi> F </mi>
<mo> ) </mo>
</mrow>
<mo> = </mo>
<mfrac>
<mn> 1 </mn>
<mn> 3 </mn>
</mfrac>
</mrow>
</math></li>
<li><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi> P </mi>
<mrow>
<mo> ( </mo>
<mrow>
<mi> E </mi>
<mo> ∩ </mo>
<mi> F </mi>
</mrow>
<mo> ) </mo>
</mrow>
<mo> = </mo>
<mfrac>
<mn> 1 </mn>
<mn> 6</mn>
</mfrac>
</mrow>
</math></li>
</ul>
Table Example
p |
q |
p∨q |
p⇔(p∨q) |
---|---|---|---|
T |
T |
T |
T |
T |
F |
T |
T |
F |
T |
T |
T |
F |
F |
F |
T |
Expand to see the table code
<table border="1" cellpadding="10" cellspacing="0" width="60%">
<thead>
<tr>
<th scope="col">
<p><strong><em>p</em></strong>
</p>
</th>
<th scope="col">
<p><strong><em>q</em></strong>
</p>
</th>
<th scope="col">
<p>
<math>
</math>
</p>
</th>
<th scope="col">
<p>
<math>
</math>
</p>
</th>
</tr>
</thead>
<caption>Truth Table
</caption>
<tbody>
<tr>
<td>
<p>T
</p>
</td>
<td>
<p>T
</p>
</td>
<td>
<p>T
</p>
</td>
<td>
<p><strong>T</strong>
</p>
</td>
</tr>
<tr>
<td>
<p>T
</p>
</td>
<td>
<p>F
</p>
</td>
<td>
<p>T
</p>
</td>
<td>
<p><strong>T</strong>
</p>
</td>
</tr>
<tr>
<td>
<p>F
</p>
</td>
<td>
<p>T
</p>
</td>
<td>
<p>T
</p>
</td>
<td>
<p><strong>T</strong>
</p>
</td>
</tr>
<tr>
<td>
<p>F
</p>
</td>
<td>
<p>F
</p>
</td>
<td>
<p>F
</p>
</td>
<td>
<p><strong>T</strong>
</p>
</td>
</tr>
</tbody>
</table>