3

I'm attempting to underline section headings in a document, and the behavior of particular letters (like "Q" and "q") as small caps makes the underlining match with the bottom of the lowest part of a letter (the tail in the Q) instead of the base of the letter. This creates an inconsistent look:

enter image description here

Here's a minimal example:

    \documentclass{article}

    \begin{document}
    The problem with ``Q'' is:

    \underline{{\sc This is small caps text.}} \underline{{\sc This is quite weird underlining.}} \underline{{\sc Quite weird.}}

    {\sc \underline{What if we change the order of operations, eh Q?}}
    \end{document}

2 Answers2

3

Any letter with a descender pushes the underline lower. You can get rid of this descender by using \smash (similar to \raisebox{0pt}[0pt][0pt]):

enter image description here

\documentclass{article}

\begin{document}

The problem with ``Q'' is:

\scshape
\underline{This is small caps text.}

\underline{This is \smash{q}uite weird underlining.}

\underline{\smash{Q}uite weird.}

\underline{What if we change the order of operations\smash{,} eh \raisebox{0pt}[0pt][0pt]{Q}?}

\end{document}

Other packages may provide more consistency:

enter image description here

\documentclass{article}

\usepackage{ulem}

\begin{document}

The problem with ``Q'' is:

\scshape
\uline{This is small caps text.}

\uline{This is quite weird underlining.}

\uline{Quite weird.}

\uline{What if we change the order of operations, eh Q?}

\end{document}

Similar output is obtained with a more uniform, lower underline under ulem and soul's \ul without having to resort to \smashing. Moreover, they allow for underlining with line-breaking.

Werner
  • 603,163
1

Thanks to Werner for the answer -- I was using the antiquated two letter command "\sc" instead of the more robust "\scshape" which allows for the "\smash" command:

    \underline{\scshape Homework, \smash{Q}uizzes, ...}