3

Here is a MWE with two ways to write an equation at the end of a sentence:

\documentclass{article}
\begin{document}
This is a sentence ending with $V$. This is the following sentence. Lorem ipsum dolor sit amet.

This is a sentence ending with $V.$ This is the following sentence. Lorem ipsum dolor sit amet.
\end{document}

enter image description here

Neither of these versions has satisfactory spacing. In the first one, there is too much space between the 'V' and the full stop, and in the second one the extra space after the full stop has disappeared. What is the correct/typical/idiomatic way to write this kind of thing, such that the spacing will be correct?

  • Maybe ...$V.$\phantom{.} This... – Steven B. Segletes Oct 31 '19 at 11:40
  • 2
    You can manually adjust the spacefactor after the math formula: $V.$\spacefactor=3000{} This (3000 is the spacefactor after a period.) – Sergei Golovan Oct 31 '19 at 11:51
  • 1
    Putting the period after the math is the semantical correct input. The spacing you see is the italic correction. See tex.stackexchange.com/a/91373/2388 for a way to suppress it. – Ulrike Fischer Nov 2 '19 at 9:30
3

Just put the dot after the math mode, and we can reduce the spacing after the $V$ by adding a negative thin space $\!$.

\documentclass[]{article}

\begin{document}
\hbox to 10cm{This is a sentence ending with $V\!$. This}
\end{document}

enter image description here

|improve this answer|||||
  • \! is a negative thin space. Not sure what "half" would be half of. (But otherwise, I agree.) – barbara beeton Oct 31 '19 at 17:43
  • This works as a solution to this particular case, but if I change the V to an m the spacing is incorrect again - the stop overlaps the m character. While this solution is appreciated, I'd prefer it if there's a way to have LaTeX correctly handle the spacing for me, since it's generally better at it than I am. – Nathaniel Nov 1 '19 at 3:23
  • @barbarabeeton you're right, my bad :) – Skillmon likes topanswers.xyz Nov 1 '19 at 9:02
  • 1
    @Nathaniel What's wrong with $m$.? You only need to kern the few cases where the math letter is wide at the top and thin at the bottom (like the $V$) and not those where the letter is thickest at the bottom (like $m$), in which case the default spacing looks good. – Skillmon likes topanswers.xyz Nov 1 '19 at 9:04
  • @Skillmon I guess in practical terms, there's no problem at all! I'm just surprised that there isn't a 'right' way to do it, where the spacing will be correctly calculated automatically. It seems a bit sort of un-Knuthian for that to be the case. – Nathaniel Nov 1 '19 at 11:30

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.