Guidelines for typesetting fractions

I realize that this question is to some extent subjective. However, I suspect that there are some common standards regarding how fractions ought to be typeset in mathematics. The guide Mathematical Writing by Knuth, Larrabee, and Roberts states that "One of the most common errors mathematicians make when they get their own typesetting systems is to over-use the form of fractions with the horizontal bar..." (19). Therefore, I feel that it would be useful to gather a list of recommendations on how fractions ought be typeset in various contexts.

Here is a (possibly very incomplete) list of such contexts; feel free to add additional items and expand upon existing ones.

• Inline fractions. Should one use \frac, \dfrac, or something else? How about when one is typesetting an inline derivative like dy/dx? What if one wishes to typeset an inline partial derivative like d^3 f/(dz dy dx)?
• Fractions in display math. Suppose that one wishes to typeset 1/n in display math. Should one use \frac or /? If you think that / should be used, at what point is the fraction "large enough" that one should switch to using \frac?
• Fractions in subscript and superscript (e.g. exponents).
• Fractions at the top or bottom of series and integral symbols.
• Fractions nested within \frac-style fractions.
• Continued fractions.
• Fractions in plots and diagrams.

• I generally use \frac in display math, and \sfrac in inline math and exponens, unless the expression is very long or the result is unclear. But I suspect this may be very subjective.
– You
Commented Sep 30, 2013 at 8:24
• It looks like you've already supplied the answer to most of the situational questions by quoting from the piece by Knuth, Larrabee, and Roberts: Don't overuse the \frac command, especially not in inline-math situations.
– Mico
Commented Sep 30, 2013 at 8:25
• @Mico Yes, but this still leaves a lot of room for choices in the situations I describe, whereas in good mathematical typesetting, there is not much variation in how fractions are typeset in these situations. My goal with this question was to try to get a more concrete list of guidelines that people can refer to, as I could not find any such guidelines on the internet. Commented Sep 30, 2013 at 8:37

I don't think it's possible to come up with strict, let alone unambiguous, answers to your questions. (And, I don't think you're asking for such guidelines...)

An important general aspect of what's considered to be good typography is the creation of an even amount of "color" -- or "average grayness", if you prefer -- across pages and across paragraphs within a page. There are obviously many factors -- so far unspecified -- that determine a page's "average grayness". E.g., are the paragraphs on average quite long or quite short? How tight is the interline spacing? Are successive paragraphs separated by extra whitespace? Are there lots of displayed equations? Taken together, these aspects should indicate fairly clearly when (and when not) to use \frac and friends in inline math situations.

One of these aspects is whether running text is set single-spaced or more loosely. Obviously, the larger the distance between successive lines of text, the less deleterious the effect of using \frac -- as well as exponents, subscripts and superscripts, and anything else (such as integral, sum, and product symbols!) that rises above or falls below the space defined by the baseline and the caps-line will be on the average color of the page. If the text is set single-spaced (and especially if the baseline skip is modest, say, 20% more than the font's nominal size), almost anything that rises above the capsline or falls noticeably below the baseline risks forcing the use of extra space between lines to avoid collisions -- and should thus be used sparingly at most in inline material.

Incidentally, having to increase the baseline skip for just one line is exactly what happens because of the (clearly deliberately undertaken) use of \frac in the first paragraph on p. 19 of the document you've cited in your posting: Observe that the space between the second and third line is quite a bit larger than the other spaces in the paragraph.

To sum up, publications (including working papers) that are typeset single-spaced should probably avoid having \frac (let alone \dfrac!) appear in running text. In contrast, if the working paper is set with one-and-one-half-spacing or (shudder) double-spacing, use of \frac is going to be much less problematic from the point of view of creating even typographic color. Some design purists might go as far as saying that double-spacing has already killed off any chance of creating good color. If color is already hopelessly compromised, any extra damage done by occurrences of \frac or \dfrac in double-spaced text may be minor, right?!

Well-designed publications should take into account whether there's a need to have significant amounts of inline math material. For instance, for the book Concrete Mathematics by Graham, Knuth, and Patashnik, a conscious decision was made to choose a baseline skip of 13pt rather than the more standard 12pt. This was done, in part, to accommodate the use of subscripts, superscripts, etc in the running text. If I remember correctly, a second reason for choosing a looser-than-normal baseline skip was that the font used for the book, "Concrete Roman", was felt to be a bit dark if employed at a more standard baseline skip of 12pt. Widening the baseline skip a touch was felt to bring about a better "average color" -- regardless of how much inline math material was present in a given paragraph. Clearly, whatever may constitute "optimal" color comes with a high degree of subjectivity. Equally clearly, I don't think there's anything wrong with having this degree of subjectivity.

• Thanks for the great answer. There is a lot more complexity involved in making these decisions than I initially expected. I suppose that the solution would be to have a good understanding of typographic style. Commented Oct 1, 2013 at 1:51
• I disagree with the comment about the "over-use of fractions with a horizontal bar". It can be a personal choice to only use those fractions and never use fractions with a slash. Commented Jul 27, 2016 at 13:05
• @Karlo - Of course it's a personal choice -- papers don't write themselves, do they? To rephrase my comment, then: not all personal choices are equally successful, typographically speaking.
– Mico
Commented Jul 27, 2016 at 14:24

I won't give details here, but suggest that you take a look at sections 2.4.1 and 2.52 in Ellen Swanson's Mathematics into Type, now on line. (The relevant sections start on p.17 = p.28 in the pdf file and p.27 = p.38, respectively.)

This is the guidebook used at the American Mathematical Society until author-prepared files "took over". One of the main criteria governing these practices was the goal of decreasing the number of printed pages, to minimize cost. Editorial practices have become more relaxed since then.

• It's great to know that Ellen Swanson's classic piece is now available online!
– Mico
Commented Sep 30, 2013 at 16:30

So Mico has given an excellent description of the typography, my practical take is to avoid "horizontal" fractions in running text, so here's what I do. Posting this might get my poor style and poor approach slated, but I don't mind (and in fact would like to hear what I could do better), so here we go:

I define a "running" i.e. inline fraction as follows:

\newcommand*\rfrac[2]{{}^{#1}\!/_{#2}}%running fraction with slash - requires math mode.

For example:

This is a long line of text, so we can see how the fractions look below it.

This is another line, with some fractions in it $\rfrac{1}{2}+\rfrac{A_B^C}{E_F^G}$

This is a third line, also reasonably long, but not so long it wraps.


Gives:

I felt that a simple supserscript-slash-subscript fraction was too loose, and just using 1/2 looked too big. I think it could be improved by inserting a hairspace before the slash only if there's a subscript on the numerator, as it would look more balanced.

• You should have a look at nicefrac package, which incorporates exactly this idea, but giving a user many more options. However, if you asked me, such fractions are ugly and completely against my sense of good typography.
– yo'
Commented Sep 30, 2013 at 10:57
• Thanks @tohecz I probably shouldn't have written my own. I have little or no sense of good typography, so rely on what I read seasoned with my own views on readability as applied to the content of what I'm writing. Commented Sep 30, 2013 at 11:00
• I feel a bit sorry now, since my comment sounds rude and negative. I only wanted to point out that a package for this exists, and that in general, such fractions should (IMHO) be avoided. I much more prefer $1/2$ over $\nicefrac{1}{2}$. As well, you are always sure about the meaning (I mean, try to always interpret correctly $\nicefrac{1}{2}\gamma$.
– yo'
Commented Sep 30, 2013 at 13:50
• @tohecz, not at all, it's nice to know there's a package to do it, and it has some nice options that my 1-liner doesn't. Commented Sep 30, 2013 at 14:53
• I wanted to voice my exactly opposite stance to that of yo's. That looks really nice to my eye. I believe some OTFs have the option to enable automatically producing these kinds of fractions, which look even nicer to me. Commented Aug 8, 2015 at 8:39