1

This inline formula increases the line height. How to prevent?

% !TEX TS-program = lualatex

\documentclass[12pt]{scrreprt}

\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{blindtext}

\setmainfont[Numbers=Lining, Ligatures={Common,TeX}]{Libertinus Serif}

\setsansfont[Numbers=Lining, Ligatures={Common,TeX}]{Libertinus Sans}

\setmathfont{Libertinus Math}

\begin{document}
\blindtext $\text{get}_{gst}$ \blindtext
\end{document}

enter image description here

4
  • 2
    You can either \smash{} the math or else use the setspace package to slightly increase the line spacing. Sep 25 '18 at 13:42
  • 3
    get\textsubscript{\textit{gst}} . It doesn't make much sense to enter math only to quit it again. Sep 25 '18 at 14:00
  • You can do \text{gst}{}_{gst}, but there's something hairy going on.
    – egreg
    Sep 25 '18 at 15:04
  • @egreg Reported: tug.org/pipermail/luatex/2018-September/006938.html Sep 27 '18 at 5:24
2

LuaTeX takes the subscript drop parameter from the font and it turns out that this is much too large. Luckily you can override it. Here I set it to 0.5pt, which is the value used by pdfTeX.

\documentclass[12pt]{scrreprt}

\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{blindtext}

\setmainfont[Numbers=Lining, Ligatures={Common,TeX}]{Libertinus Serif}

\setsansfont[Numbers=Lining, Ligatures={Common,TeX}]{Libertinus Sans}

\setmathfont{Libertinus Math}
\AtBeginDocument{$\global\Umathsubshiftdrop\textstyle=.5pt$}

\begin{document}
\blindtext $\text{get}_{gst}$ \blindtext
\end{document}

enter image description here

1
  • @KhaledHosny This should be the actual answer to the question. Thanks for your effort! Oct 16 '18 at 5:46

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.