The IndexFormula

Formula

One LaTeX formula in. Back come the words a screen reader says for it, the text it copies out as, and its MathML, from the same reading that makes our documents.

Open now · no key

One formula in, three readings out The LaTeX \frac{1}{2}mv^2 goes in. One answer comes back with its speech, one half m v squared; its copy text, 1/2 m v squared; and its MathML. YOU SEND \frac{1}{2}mv^2 BACK, IN ONE ANSWER SPEECH one half m v squared COPY 1/2 m v² MATHML <math alttext="one half…">
A real answer, from the formula \frac{1}{2}mv^2: it says "one half m v squared" and copies out as "1/2 m v²".

What it is for

  • Alt text for an equation in a slide, a course page or an email, worded the way a screen reader would say it.
  • Hearing what a student with a screen reader will hear, before the lecture rather than after it.
  • An agent that writes mathematics for people, and needs each formula to read correctly aloud.

Price

Free without a key: thirty formulas every ten minutes from one network. With a key, a dollar for a thousand formulas, up to six hundred every ten minutes: send it as Authorization: Bearer YOUR_KEY, and the Intex-Credit-Cents header says what is left. The key is the same one the other services take.

Documentation

GET https://app.intex.university/api/formula?tex=FORMULA

Or POST to the same address, with the formula as tex in a JSON body or a form. Any website may call it from the browser: it answers every origin.

The request

FieldWhat goes in it
texOne formula as LaTeX, as you would write it between dollar signs, without them. One line, at most 1,000 characters.

The response

JSON, with five fields:

FieldWhat it holds
formulaThe formula as it was read.
reads_asIts grouping, with every bracket the notation leaves unwritten written out, so you can see what binds to what.
speechWhat a screen reader says for it.
copyThe text it should copy out as when someone selects it.
mathmlMathML, with the speech as its alt text and the LaTeX as an annotation.

An example

curl -G https://app.intex.university/api/formula \
     --data-urlencode 'tex=\frac{1}{2}mv^2'
{
  "formula": "\\frac{1}{2}mv^2",
  "reads_as": "(1/2)·m·(v^2)",
  "speech": "one half m v squared",
  "copy": "1/2 m v²",
  "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"inline\" alttext=\"one half m v squared\">…</math>"
}

The MathML is shortened here; the rest is the answer exactly as it came back.

Errors

StatusWhen, and what comes back
422The formula could not be read. error is a sentence that names the column, for example Column 9: this '{' is never closed.
429Too many formulas in a few minutes. Wait the seconds in Retry-After, then try again.

Related