Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
It can sometimes be hard to get the exact formatting you want in math content regardless of the application or the method you use to set equations, and iBooks Author is no exception to this rule. Whether you use LaTeX, MathML, or MathType you're probably going to have to come up with some workarounds to get your math looking the way you want it to. So let's look at some of the limitations of MathType setting in iBooks Author and a way to get around one of them. Here are the first four examples that came in with my Microsoft Word document; these fractions and, as you can see they're sitting right at the same baseline as the numbers here, and actually if I switch over to the Microsoft Word document I can see the proper alignment where the fraction bar is centered right on the type there.
This is a kind of alignment that I want to see in iBooks Author. But unfortunately when I bring equations in from Microsoft Word they're no longer actually equations. If I look up in the Metrics Inspector, I can see that this equation is actually just a placed PDF file, and up in the Format bar, I can see that it's an in-line item. So this is basically just a picture of the equation it's not a live equation itself; if I double-click on it nothing happens; I can't edit it in any way. Now let's take a look at some other ways to add math content besides bringing them in from Word and what happens when we do.
First I'll check my iBooks Author Preferences and in General Preferences, if you have the application MathType installed, you have the option to use that to insert your equations. I'll select that and we'll add a MathType equation of the same fraction right here in iBooks Author. I'll choose Insert>Equation. I'll create a fraction. And notice that, down here, it says the fraction is going to be 17 points and it's currently set in Helvetica.
When I close the MathType window I get the 17 points but I don't get the Helvetica. Currently MathType equations set in iBooks Author will take on default formatting and you can't pick up the font from the paragraph style. You can however pick up the size and the color. So if this paragraph used large purple text when I set that MathType equation it would come in large and purple. I'll delete that equation, go back to my Preferences, and I'll turn off MathType and we'll insert the same fraction using LaTeX.
So I'll press the keyboard shortcut cmd + opt + e, that brings up the Edit Equation dialog box, and I'll just type in the code for a fraction 26/26, I can see the preview, and click Insert. And again, I get the proper vertical alignment, but I don't pick up the Helvetica font either. There are of course, things you can add to your LaTeX code to control the formatting in terms of font size, font color, and style. And if you want to learn more about the supported options for math type-setting, go to the Apple support page for iBooks Author: About LaTeX and MathML support.
This will tell you supported commands, elements, and attributes as well show you a bunch of sample equations, and you can actually select this text and copy it right into your iBooks Author editing window to practice. I'll delete that equation. So let's go about fixing this alignment problem. Since these fractions are an in-line item, I can treat them as a regular piece of text and for that I can move them up and down with the Baseline Shift command I can get in the Text Inspector.
So what I'll do is select the fraction and apply a baseline shift. I'll apply negative 12 points and in this case that centers the fraction bar right on the example number. Now I'd hate to have to do this manually for every single fraction. One way I can streamline that process is to create a character style that applies the baseline shift for me and that's what I'm going to do. I'll go down to the bottom of the Styles panel and choose Create New Character Style from Selection.
I'll show all the character attributes deselect them all, because I want this character style to only apply a baseline shift. I'll select that. I'll give it a name of Fraction, and click OK. Now let's apply it to the other examples. One thing you'll notice, if I select just a Fraction, and I try to apply my new character style, I can't apply it, nothing happens. iBooks Author won't just recognize this equation object; it actually needs another piece of text, another character to select.
So in this case I can just type a space and select both the space and the fraction, and now I can apply the character style. I'll repeat the process for the other two fractions. So in this movie, we stuck our toe in the deep ocean that is math type-setting. We saw a couple of limitations that iBooks Author has in terms of formatting math, and devised a little workaround for fixing the alignment problem that comes with MathType equations in placed Word documents.
Get unlimited access to all courses for just $25/month.Become a member
119 Video lessons · 47314 Viewers
117 Video lessons · 34263 Viewers
113 Video lessons · 80255 Viewers
116 Video lessons · 70179 Viewers