LaTeX and MathML equations come to iWork, as well as iBooks Author

Every June we suffer from upgrade overload. Not only is there a WWDC and new version of macOS to contend with, but every other software house is busy pushing out the last updates and upgrades before going on vacation.

A couple of days ago, the App Store delivered updates to Apple’s iWork apps, Pages, Numbers and Keynote. Among the new features supported are LaTeX and MathML mathematical expressions and equations, which have apparently also been supported in iBooks Author for some time. This got me excited, so here’s a brief look at what they can, and cannot, do.

The three apps have a new menu item, towards the bottom of the Insert menu: Equation… Simply position the cursor where you want to add your expression/equation, and select that command. This drops down the LaTeX/MathML equation editor, into which you type the code to be rendered into the document.

There are limits to what can be handled. Apple provides quite a detailed account of these here, and here is the explanation of how to use this on iOS devices too.

iworklatex1

My test LaTeX for this is an old demo which contains Stephen R Addison’s paper on the Euler and Gibbs-Duhem equations, which starts gently and gets progressively more fiendish. Apple’s additions to iWork got about half-way through that paper before giving up on me. Unfortunately, when they do, they simply report this as an “Invalid Equation”, leaving you to figure out what it’s taking exception to. There’s no helpful carat to identify where you have strayed beyond its limits.

iworklatex2

What it handles, it does well: it looks good, thanks to its use of the blahtex engine. It does, of course, fall far short of the sort of thing you’d get from a real LaTeX typesetting app, such as Karl Traunmüller’s superb Compositor, but remind yourself that this is still an iWork app.

Where it gets more irritating is switching between apps. You can copy and paste one of its expressions/equations within the same app, but try copying one from Pages and pasting it into Keynote and it won’t play. The results in Pages fit very neatly into its system of styles and controls, and Pages benefits greatly from this feature. I was less happy with its integration into Keynote though: expressions appear as standalone items on a slide, and can’t, for example, be embedded into a bullet point, as far as I can see.

iworklatex3

Each of these apps is significantly enhanced by this, but Apple needs to finish the job off properly. Being unable to copy and paste between two different apps in the iWorks suite is a fairly basic feature which needs fixing. For any serious use, the equation editor needs to identify where your code is causing a problem, otherwise users will just give up trying to use the feature.