2

When I have superscripts in body text that there is some extra blank space between that line and the line above it. How do I make it stop doing that? Lowering the superscripts, for example, or making them smaller?

Edit: I bet the problem isn't the superscripts in this case, which I found playing around with the MWE once I removed the \footnotesize. I bet it is the interaction of the superscripts and my titlesec commands. Both work fine on their own, but in this case something happens when they are together. There is a ...\glue(\lineskip) 1.0 in my log file.

MWE:

\documentclass[12pt,letterpaper]{article}

%Font stuff here
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tgtermes,newtxmath}

%Chemistry stuff
\usepackage[language=british]{chemmacros}
 \usepackage[]{titlesec}    %makes section headers smaller
    \titleformat{\subsection}[runin]{\normalsize\it}{\thesubsection}{0.5em}{}[:]

        \titlespacing\subsection{0pt}{0.2ex plus -1ex minus -.5ex}{-\parskip}
        \titlespacing{\subsection}{0.5ex plus -1ex minus -.3ex}{*2}{2\wordsep}

\showoutput

\begin{document}

\subsection{Actinide Coordination Polymers}
 The most common ionic uranium species in atmospheric conditions is uranyl, {\ch{[UO2]^{ 2+}}}, a uranium(VI) (\textit{d}\textsuperscript{0}\textit{f}\textsuperscript{0}) species.
    The two oxo ligands are double-bonded in the axial positions, restricting other ligands to the equatorial plane.
    The uranyl ion is Lewis acidic, and very ``hard'' on the Lewis acid-base hardness scale, causing it to be oxophilic.

\end{document}
  • \glue (\baselineskip) with any value means baseline spacing is preserved, it is the lines with glue (\lineskip) that you need to avoid. – David Carlisle Dec 5 '15 at 20:22
  • I think you should undo the edit really as there is no problem with the edited example, which means the answers don't make sense. – David Carlisle Dec 5 '15 at 20:28
  • @DavidCarlisle Good point. The problem is in my full document with the \footnotesize removed I still get ....\glue(\lineskip) 1.0, and I can't figure out why. Give me a minute to fiddle with my MWE and try and reproduce it. – Canageek Dec 5 '15 at 20:31
  • THERE. Managed to reproduce the problem from my main file in the MWE. – Canageek Dec 5 '15 at 20:49
  • See updated answer – David Carlisle Dec 5 '15 at 21:42
3

If you add \showoutput to your preamble you see in the log the dreaded

...\glue(\lineskip) 1.0

which means that TeX could not maintain normal baselinespace so inserted lineskip glue to ensure the lines don't touch.

You have forced the superscripts to be large with \footnotesize but to avoid this you need to make them smaller, or subscripts drop down less superscripts raised less, or increase the baselineskip in general. All are possible, your choice...

If you use the default superscript size, the superscripts fit in the baseline spacing:

\documentclass[12pt,letterpaper]{article}

%Font stuff here
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tgtermes,newtxmath}

%Chemistry stuff
\usepackage[language=british]{chemmacros}

%\usepackage[]{siunitx}
\showoutput

\begin{document}

    The most common ionic uranium species in atmospheric conditions is uranyl, { \ch{[UO2]^{2+}}}, a uranium(VI) (\textit{d}\textsuperscript{0}\textit{f}\textsuperscript{0}) species.
    The two oxo ligands are axial, restricting other ligands to the equatorial plane.
    The uranyl ion is Lewis acidic, and very ``hard'' on the Lewis acid-base hardness scale, causing it to be oxophilic.
    It is phosphorescent, with multiple emission bands in the 450--600 nm range, giving it bright green emission, as shown in Figure.

\end{document}

In the edited question the problem is that the heading as inserted by titlesec has an strut (for 15pt baselineskip) with depth 4.35pt, which means there is hardly any room for descenders. I can't see why a runin heading should have a strut at all (the standard definition wouldn't have one) rather that delve too far into the package I'd just locally zap the strut with:

\titleformat{\subsection}[runin]{%
  \let\strut\relax
  \normalsize\it}{\thesubsection}{0.5em}{}[:]
  • I was trying to make them smaller with \footnotesize. Opps. How do I make them smaller? – Canageek Dec 5 '15 at 20:15
  • @Canageek they would be smaller (more or less \scriptsize) anyway, \footnotesize is larger than \scriptsize – David Carlisle Dec 5 '15 at 20:17
  • @Canageek if you just use \textsuperscript{0} it would fit in the normal space, but the \ch spacing already has a high2+ I'd need to see how that can be configured not sure if it is a normal math superscript in that package – David Carlisle Dec 5 '15 at 20:19
  • I updated the question to remove the \footnotesize. – Canageek Dec 5 '15 at 20:21
  • @Canageek Oh I has only removed 2 of the three \footnotesize if you remove them all the problem goes. – David Carlisle Dec 5 '15 at 20:25
0

Indeed the difference between the lineskips is 1.1pt as far as I can measure it. You also can slightly increase the value of \linespread: with \linespread{1.05} the difference is only 0.1pt, and there's no difference with \linespread{1.07}.

  • I updated the question to remove the \footnotesize. – Canageek Dec 5 '15 at 20:21
  • That would also make my entire document longer, which is the opposite of what I want. I'm writing to a page limit, and don't like the idea of throwing away space like that. – Canageek Dec 5 '15 at 20:22
  • Well, setting linespread to 1.05 doesn't change much the number of pages – if any. It is impeceptible, but can increase legibility. Anyway, if you remove \footnotesize in superscripts, I can measure no difference. – Bernard Dec 5 '15 at 20:35
  • Managed to reproduce the problem. It only happens when I have the superscripts following a subtitle. MWE updated. – Canageek Dec 5 '15 at 20:49

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.