4

If used in the denominator, the \prime symbols are lower than in the numerator. This becomes even more pronounced (and annoying) if Libertine/Libertinus Math is used.

Why is that? Can this somehow be corrected?

Example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{libertine}
\usepackage{libertinust1math}

\begin{document}

  \begin{equation}
    \frac{h^{\prime\prime}-h^{\prime}}{h^{\prime\prime}-h^{\prime}}
  \end{equation}

\end{document}

Default CM:

enter image description here

libertinust1math:

enter image description here

  • 2
    For a one-shot-only solution you can just add \textstyle in the denominator. Or do you want to avoid cramped styles altogether? That's tough, cramped styles are hard coded in TeX... – campa Aug 28 '17 at 12:57
  • Could you give an example? I wonder why this isn't handled correctly in a math-centred typesetting software like TeX. – AlexG Aug 28 '17 at 13:02
  • 1
    Well, it is handled correctly from TeX's point of view. See this questions and its answers. (This might actually be a dupe.) – campa Aug 28 '17 at 13:05
  • I would expect whatever styles TeX provides, the same ones to be used in the numerator as in the denominator. Could you please briefly summarize what the reason is behind this weirdness? (I have no The TeX Book.) – AlexG Aug 28 '17 at 13:18
  • 1
    That will have very bad side effects. All fractions in text mode will be broken, as well as fractions in numerators/denominators of other fractions. – campa Aug 28 '17 at 14:00
3

The amount superscripts are raised is determined by the fontdimen parameters of the font specified for fam2. In the case of the denominator it's mostly fontdimen15.

Here I set 13,14,and 15 to a rather large value and you see the numerator and denominator then match

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{libertine}
\usepackage{libertinust1math}

\begin{document}
$a$
\fontdimen13 \textfont2 =7pt
\fontdimen14 \textfont2 =7pt
\fontdimen15 \textfont2 =7pt
  \begin{equation}
    \frac{h^{\prime\prime}-h^{\prime}}{h^{\prime\prime}-h^{\prime}}
  \end{equation}

\end{document}
| improve this answer | |
2

You seem to not want the cramped style in the denominator:

\documentclass{article}
\usepackage{amsmath}
\usepackage{libertine}
\usepackage{libertinust1math}

\newcommand{\ncfrac}[2]{\frac{#1}{\mathpalette\notcramped{#2}}}
\newcommand{\notcramped}[2]{#1#2}

\begin{document}

\begin{equation}
\ncfrac{h''-h'}{h''-h'}
\end{equation}
\begin{equation}
\frac{h''-h'}{h''-h'}
\end{equation}

\end{document}

enter image description here

| improve this answer | |
  • I don't seem to understand your code. Where, in the first \newcommand, is the second argument to be passed to \notcramped? – AlexG Aug 28 '17 at 19:46
  • @AlexG \mathpallete executes the command four times supplying the "missing" argument in each case as #1 (\displaystyle, then \textstyle, then scriptstyle and \scriptscriptstyle) – David Carlisle Aug 28 '17 at 20:05

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.