5

I just stumbled upon a Math SE answer which used {num \over den} for fractions. This seems perfectly equivalent to \frac{num}{den}. I'm guessing the former is TeX syntax and the latter is the LaTeX kernel equivalent. Is that right?

Edit: The question as posed was basically answered by the question which was linked to the duplicate tab. However, that opened anothe question: what are \over \overwithdelims \atop \atopwithdelims \above and \abovewithdelims, and what's the difference between those?

8

The variants with \over create a fraction with the numerator and denominator separated by a bar whose thickness is the default for the current size. The \atop variants have no bar, and the \above variants have a bar whose thickness is user defined. As the name suggests, the variants that include withdelims are surrounded by delimiters.

\documentclass{article}
\begin{document}
\[
{a \over b} \quad
{c \atop d} \quad
{c \overwithdelims() d} \quad
{e \atopwithdelims() f} \quad
{g \above 2pt h}  \quad
{i \abovewithdelims() 2pt h}
\]
\end{document}

fractions

Curiously, using a wide bar moves the numerator and denominator a long way apart.

\documentclass{article}
\begin{document}
\[
{g \above 5pt h}  \quad
{i \abovewithdelims() 5pt h}
\]
\end{document}

fractions2

I have no idea why this happens, but in any case I would use \genfrac from the amsmath package in preference to any of the above.

  • 6
    the reason for the numerator and denominator moving away from the bar when the thickness of the bar is increased is a "misfeature" in the assignment of font dimensions: the same dimension register is used for both the thickness of the bar and the distance separating it from the numerator and denominator. probably knuth didn't consider it likely that anyone would increase the thickness by a large amount; besides, space was very tight when tex was developed, and saving the extra bytes in the .tfm file meant saving a whole memory block. i look forward to an enhanced otf math table. – barbara beeton Sep 24 '14 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.