If I understand correctly, (La)TeX assumes that a period after a lower-case letter ends a sentence while a period after an upper-case letter does not. Unfortunately, my documents usually contain plenty of acronyms and abbreviations. Unless I remember to use \@
, the spacing after periods is wrong:
\documentclass[convert={density=150},varwidth]{standalone}
\begin{document}
\noindent
\makebox[0.7in][l]{Incorrect:}%
Your computer needs more RAM. I can give you some.\\
\makebox[0.7in][l]{Correct:}%
Your computer needs more RAM\@. I can give you some.\\
\makebox[0.7in][l]{Incorrect:}%
Colors (red, blue, etc.) are nice.\\
\makebox[0.7in][l]{Correct:}%
Colors (red, blue, etc.\@) are nice.
\end{document}
Is it possible to declare certain strings to be acronyms or abbreviations to invert this assumption? If so, this would reduce the number of spacing errors in my documents.
For example:
\documentclass[convert={density=150},varwidth]{standalone}
\usepackage{magicalacronymhelper}
\declareacronym{RAM}
\declareabbr{etc}
\begin{document}
\noindent
\makebox[0.7in][l]{Correct:}%
Your computer needs more RAM. I can give you some.\\
\makebox[0.7in][l]{Correct:}%
Your computer needs more RAM\@. I can give you some.\\
\makebox[0.7in][l]{Correct:}%
Colors (red, blue, etc.) are nice.\\
\makebox[0.7in][l]{Correct:}%
Colors (red, blue, etc.\@) are nice.
\end{document}
ltugboat
document class has a command\acro
that corrects for the end of a sentence. (it does other things as well, such as stepping the type size down a point to de-emphasize the appearance of in-line uppercase -- we don't like how small caps look in this context --, but that's easily ignored.) you're welcome to steal the idea; look forltugboat.cls
on ctan. (it doesn't handle the "etc." case; you're on your own for that.)\@
to force it to be interpreted as a sentence-ending period. For example:I like citrus flavors: orange, lemon, lime, etc\@. They are tasty.
I rarely end sentences with an abbreviation, so inverting the default behavior of periods after abbreviations would fix more than it would break.\frenchspacing
so the issue just goes away.\@
to "etc." is that it will in any event be interpreted as ending a sentence (since it's lowercase). what you want to do is prevent it from indicating the end of a sentence in those (randomly occurring) cases where it doesn't. that's where the "slash-space" is needed. as for david's comment regarding\frenchspacing
, there are situations where this can cause confusion; i've definitely seen them, though i can't put my hands on one right now -- that may call for rewriting rather than a spacing "fix".