Feeds:
Posts

## Maths Symbols, And Why They Matter

Several of my posts on html have contained passing mentions of writing with screen-readers for the visually impaired in mind. This one's a bit more directly aimed at that subject, although using the right symbols for the right job is, I think, a good thing in its own right. Think of it, if you will, as something of a mildly consciousness-raising piece, coupled with a simple "how to" guide.

It's not, I hasten to add, aimed at people who write regularly about maths. They probably know all this already, for starters, and are most likely writing really complicated brainy-boffinology stuff that needs a specialist brainy-boffinologists' language like LaTeX, anyway. No, it's aimed at users like myself, who aren't mathematologists, but might occasionally drop the odd equation, simple sum or fraction into a piece of writing. And there are no styles involved either (screen readers don't render styles), so it's as applicable to commenters as to those who write the OP.

***

I've only ever talked (knowingly, at least) to one person who had a visual impairment bad enough that she needed to use a screen-reader. It was only a matter of a few swapped comments, but she gave me two related pieces of advice regarding the presentation of text on t'internet so that screen-readers might render them properly. I paraphrase from memory:

• Computers are dumb and very literal-minded.
• If in doubt about how such software will render your work, assume the worst and try to make provision on that basis.

Bearing that in mind, Gentle Reader, I'd like you to read the following aloud. (Oh, go on! Please!)

4 x 3/4 = 6 – x

Now, as I'd been wittering on about maths and arithmetic prior to dropping that little gem on you, you might assume that I meant "four times three-quarters equals six minus ex." What I'm hoping you read it as, given the large clue I led into it with, is "four ex three-slash-four equals six hyphen ex."

If the latter, literal, version was read out to you, either by a piece of screen-reading software or a person, would you be able to solve for 'ex' in anywhere near the time it took you using the assumed reading? And that's just one simple, stand-alone equation. I know that I would purely hate to have to try to follow even a short series of them, if I had to try to decipher them all from literal readings like that one.

Without wanting to belabour the "why this matters" point too much, I'd say that, for the reason above, using the correct symbols is more important for those of us who are just inserting the occasional fraction or whatever. In a post devoted entirely to mathematics or arithmetic, the visually impaired user will at least be expecting arithmetical expressions. On the other hand, coming across the term "three-slash-four" in the middle of a prose sentence in a non-mathematical essay (regardless of the ugliness of using numerals in prose) and having to attempt a "translation" with no forewarning, would, I should think, throw most of us off our reading rhythm, visually impaired or not. Plus, of course, we might read it as meaning "three or four," and not even realise, until half a sentence later, that it needed reading as "three-quarters." Bad enough for sighted folk, but for a visually impaired person, backing up to the beginning of a sentence or paragraph and re-reading it in light of the new interpretation takes a little more effort than a twitch of the eyeballs.

One more thing, before I get to the "how to" part. This is purely anecdotal, but in my own experience, you're better off using html entities than ascii codes ('Alt + number,' on Windows machines) in a web page. Non-standard characters (i.e., those not found on your keyboard) typed "raw" in ascii format tend to be more prone, from what I've seen, to being rendered as a "character not recognised" symbol. You can't win 'em all—I've seen the occasional such fubar with obscure-ish html entities too, but not anywhere near as often. Again, purely from my observation, if the "Alt+" number is different from the number in the decimal html entity, then it stands a good chance of either not producing the symbol it's supposed to, or of not displaying properly in a web browser.

Oops! One more thing before etc. Readers who blog on WordPress but are fairly new to the platform might not realise that they even can edit the html. Instead of using the new, stripped down and bloody-awful "New Post" screen which is accessed from the page containing your stats, reader and so on, you'll need to compose on the old one, accessed from the dashboard, the direct url for which will be:

http://YourUserName.wordpress.com/wp-admin/post-new.php

…or the same but with https at the front. To edit the html, select the Text tab. (Personally, I prefer to compose in M/S Word, add the html using find/replace operations I've recorded as macros, and paste the whole lot into WP when I'm done.)

And so ("Finally!" I hear you cry) to the instructiony bit.

Of the five or six usual symbols you'll want, only two are available on a standard keyboard (gawd knows why—you'd think they'd have been an obviously useful set of characters); the plus and equals signs. Just for the sake of completion, though, their html codes are &plus; and &equals; (including the semi-colons). Oh, and the "not equal to" sign (≠) is &ne;.

Multiplication is also easy: &times; to produce ×.

Division isn't difficult, but you have more choices, because it can be presented "inline" or as a fraction. Your basic division sign is simple enough; &divide; to produce ÷.

Some fractions—half, thirds, quarters, fifths, sixths and eighths—can be rendered directly as html entities.

 Fractions Symbol Name html Code Alt+ ½ Half ½ 0189 ⅓ One third ⅓ — ⅔ Two thirds ⅔ — ¼ One quarter ¼ 0188 ¾ Three quarters ¾ 0190 ⅕ One Fifth ⅕ — ⅖ Two fifths ⅖ — ⅗ Three fifths ⅗ — ⅘ Four fifths ⅘ — ⅙ One sixth ⅙ — ⅚ Five sixths ⅚ — ⅛ One eighth ⅛ — ⅜ Three eighths ⅜ — ⅝ Five eighths ⅝ — ⅞ Seven eighths ⅞ —

For other fractions, you'll need the fraction-slash: &frasl;. If I place a normal forward-slash to the right of one, you'll immediately spot the difference: ⁄/. And so, for instance, 29&frasl;35 produces 29⁄35.

(A note on style. I've seen guides which encourage you to produce a nicer-looking fraction by placing the figures in superscript and subscript tags, like this: <sup>29</sup>&frasl;<sub>35</sub> to produce 2935. I'm personally very unhappy with that idea though. Sup and sub tags aren't mere style indicators; they convey meaning, especially in mathematics and the sciences. While a sighted reader will certainly see them as nicely formatted fractions, visually impaired people will perceive… well, I'm not quite sure what. Mathematical gobbledygook, I suspect. It's possible, though less straightforward than you might imagine, to produce super- and subscript effects using style only, but I can't remember how. I'll be glad to try to sort that out, if anyone's interested.)

And now for that nasty little bugger (because it's never done right), the minus sign.

The only dash available on your keyboard is a hyphen. Yes, including the one on the number pad that really ought to produce a minus sign. Including that, there are three dashes in common use, out there on the intertubes. The other two being the endash, – and emdash, — (&ndash; and &mdash;). Of the three, only the endash has a vaguely mathematical use, in that it should be used to indicate a range, as in "Suitable for ages 3–5."

The code for the minus sign (you've probably guessed by now) is &minus; but I just want to quickly place it in a row with the others, so you can see the difference:

– – — −

All going well (he said, praying that the vagaries of font-differences won't make a liar of him) you should see that the minus sign (the furthest to the right) is just a smidgen longer than the endash, but sits slightly higher.

And that's just about it. I'll leave you with that equation I used as an example, rendered correctly:

4 × ¾ = 6 − x

Daz

P.S. Kind of related: the "number" symbol, №, is produced by &#x2116;. (And good luck finding a mnemonic for that!)

P.P.S. A thought springs to mind. Does anyone know how screen-readers render the dot/full-stop/period when it's used as a decimal point, as in 3.14159? And if they don't render it as "point," does anyone know if there's a way to let them know that they should? My (rather cursory) Google search turned up nowt on either question.

You may use these HTML tags in comments
<a href="" title=""></a> <abbr title=""></abbr> <acronym title=""></acronym> <blockquote></blockquote> <del></del>* <strike></strike>† <em></em>* <i></i>† <strong></strong>* <b></b>†* is generally preferred over †

### 3 Responses

1. Latex, wordpress style, actually works in comments. Or, at least, I think it does. It works when I test it with my blog.

Let’s try this:

$1 + e^{i\pi} = 0$

I’m not sure what that does to a screen reader. I think WordPress is actually putting the symbols in a small graphic that might cause problems for screen readers.

I use the wordpress latex for incidental math. If I wanted to post something with a lot of math, my inclination would be to put that in a pdf file, and have the post provide only an outline and a link to the pdf.

2. Yep, it is an image. If you look at the page-source, though, the maths is rendered in the alt-description, which the screen-reader will read:

<img src="http://s0.wp.com/latex.php?latex=1+%2B+e%5E%7Bi%5Cpi%7D+%3D+0&bg=ffffff&fg=333333&s=0” alt="1 + e^{i\pi} = 0" title="1 + e^{i\pi} = 0" class="latex">

3. HTML has all these provisions for the visually impaired. Is there something for an impaired mind?