I'm typesetting stories where there are, among other things, a lot of non-terminal exclamation points (e.g. "No! No! No! he shouted angrily.") I know how to fix the problem manually via the special spacing commands. However, I want this done automatically the way (La)TeX already "single spaces" commas (and periods in certain special cases). In other words, I want single space to be the default for exclamation points, while retaining the usual sentence spacing defaults for periods, question marks, etc. (\frenchspacing is therefore not an option.)
Thanks!
General ⇒ Forcing LaTeX to "single space" exclamation point
-
- Posts: 1
- Joined: Sat Jun 19, 2010 1:18 am
NEW: TikZ book now 40% off at Amazon.com for a short time.

Forcing LaTeX to "single space" exclamation point
Hi,
you can use some of the features provided by the babel package to define and manage user-defined shorthands:
you can use some of the features provided by the babel package to define and manage user-defined shorthands:
Code: Select all
\documentclass[english]{article}
\usepackage{babel}
\defineshorthand{!}{!\negthinspace}% define the shorthand
\useshorthands{!}% activate the user-defined shorthand(s)
\begin{document}
No! No! No!
\shorthandoff{!}% deactivate some shorthand(s)
No! No! No!
\shorthandon{!}% activate some shorthand(s)
No! No! No!
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...