3

When using an accented capital letter in a subscript, LaTeX lowers the subscript box:

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

$A_\textup{foo}$ $A_\textup{Cech}$ $A_\textup{Čech}$

\end{document}

Subscripts not vertically aligned

The first two subscripts are vertically aligned, while the last one is lowered because it contains a Č as part of a proper name. In my opinion, this is undesirable if both subscripts appear on the same line.

I know that I can lower the non-accented subscript boxes by using

A_\text{\vphantom{Č}foo}

However, this stretches out the line too much, and it means a lot of work and ugly code to add a \vphantom to all the subscripts.

Rather, I would like to tell LaTeX to put the Čech-subscript box on the same height as the other ones. Since I'm using a macro for \textup{Čech} anyway, I'm hoping to replace it by something which does the job.

5

You can use \smash:

\documentclass[border = 5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

$A_\textup{foo}$ $A_\textup{Cech}$ $A_\textup{\smash{Čech}}$

\end{document} 

enter image description here

  • 1
    better to smash the whole word, so you don't lose inter-letter kerning – David Carlisle Jan 3 '18 at 18:42
  • 1
    @DavidCarlisle: I didn't know kerning is lost in smashing. I've just tested, and indeed, for this pair, the difference is 0.1 pt, but I can imagine that it will be more for other pairs. – Bernard Jan 3 '18 at 19:45
  • 2
    the \smash alone works here, but i'd be tempted to add a \vphantom{C} for insurance. (i tend toward overkill.) – barbara beeton Jan 3 '18 at 20:19

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.