Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

amsart - bug or feature?

24 views
Skip to first unread message

Joris Pinkse

unread,
May 23, 2012, 12:25:25 AM5/23/12
to
Why is there a period after the colon in the last subsection heading but
not after the colon in the penultimate one?


\documentclass{amsart}


\begin{document}

\subsection*{Phd}

\subsection*{PhD}

\subsection*{Phd:}

\subsection*{PhD:}


\end{document}

zappathustra

unread,
May 23, 2012, 2:39:35 AM5/23/12
to
Joris Pinkse <pin...@gmail.com> a écrit:
Technically: sectionning in amsart uses \spacefactor to check whether
the last character of the section is a punctuation mark, in which case
it doesn't add one. But the way \spacefactor is updated is a bit
peculiar:

"d:" -> \spacefactor = \sfcode of ":" (i.e. 2000)
"D:" -> \spacefactor = 1000 because the \sfcode of "D" is 999, and
\spacefactor can't jump from <1000 to >1000.

Then in the last subsection, \spacefactor looks as if there were no
punctuation mark, because it is not >1000.

The simplest but perhaps not the best solution is:

\subsection*{PhD\spacefactor1000:}

(The behavior of \spacefactor is used for dots that do not denote the
end of a graphical sentence but an abbreviation.)

Best,
Paul

Heiko Oberdiek

unread,
May 23, 2012, 3:59:27 AM5/23/12
to
Am 23.05.2012 08:39, schrieb zappathustra:

> \subsection*{PhD\spacefactor1000:}

For setting the spacefactor to 1000 LaTeX provides \@:

\subsection*{PhD\@:}

Yours sincerely
Heiko

Joris Pinkse

unread,
May 23, 2012, 8:56:38 AM5/23/12
to
Thank you Paul and Heiko. Intriguing.
0 new messages