Received: by nummer-3.proteosys id <01C19443.407F689C@nummer-3.proteosys>; Thu, 3 Jan 2002 11:41:50 +0100 Return-Path: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C19443.407F689C" x-vm-v5-data: ([nil nil nil nil nil nil nil t nil][nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: Re: RE: PUNCTUATION AFTER SECTION HEADS Date: Wed, 10 Apr 1991 08:01:00 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Don Hosek" Sender: "LaTeX-L Mailing list" To: "Rainer M. Schoepf" Reply-To: "LaTeX-L Mailing list" Status: R X-Status: X-Keywords: X-UID: 318 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19443.407F689C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable -> (2) just before reading the argument containing the section -> title, make !, ? and . active and have them set a flag in -> addition to printing the appropriate mark. If that flag is true, -> don't add a period onto the end yourself. -Active characters won't do due to the problems that TeX fixes -catcode whenever it reads arguments. The only possibiltiy I see -when such a strategy is used is to have all these chars *always* -active with a default definition that produces the non active -equiv. But this will slow down processing very much. -Anyway, something like this will be implmented to provide short -references but I think it isn't justified to use this for -punctuation in general. Frank, be a little more creative. Consider the following simple version of the above algorithim: \def\section{\catcode`\.=3D\active\xsection} \def\xsection#1{\centerline{#1\ifperiod.\fi}\periodtrue\catcode`\.=3D11\r= elax} {\catcode`\.=3D\active \gdef.{\periodfalse}} \newif\ifperiod \periodtrue (I originally wrote this sort of code to handle the dropped E problem of tex.web). Incidentally, the above code won't quite work since a period in the middle of the title will gleefully supress the final period. Perhaps an \ifnextchar sort of setting would work better. -> (3) take a look at the spacefactor. If it is 3000, we've just -> had end-of-sentence punctuation. It's not too difficult to -> justify the occasional \@ which would be necessary under these -> circumstances. -That's an interesting idea but assumes that punctuation chars -always have a \spacefactor that distinguishs them from other -characters. This means that we need to change \frenchspacing and -I'm not sure what happens then, how many applications depend -on things like this. But it looks certainly promising. All we need to do is make sure that the chapter titles are set with \nonfrenchspacing. Simple enough. In any event, \frenchspacing is really not a command that should appear in a TeX document anyway (if they need frenchspacing, chances are they'll be using a special document style anyway). -dh ------_=_NextPart_001_01C19443.407F689C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: RE: PUNCTUATION AFTER SECTION HEADS

->  (2) just before reading the argument = containing the section
->  title, make !, ? and . active and have = them set a flag in
->  addition to printing the appropriate = mark. If that flag is true,
->  don't add a period onto the end = yourself.

-Active characters won't do due to the problems that = TeX fixes
-catcode whenever it reads arguments. The only = possibiltiy I see
-when such a strategy is used is to have all these = chars *always*
-active with a default definition that produces the = non active
-equiv. But this will slow down processing very = much.
-Anyway, something like this will be implmented to = provide short
-references but I think it isn't justified to use = this for
-punctuation in general.

Frank, be a little more creative. Consider the = following simple
version of the above algorithim:

\def\section{\catcode`\.=3D\active\xsection}
\def\xsection#1{\centerline{#1\ifperiod.\fi}\periodtrue\catcode`= \.=3D11\relax}
{\catcode`\.=3D\active
 \gdef.{\periodfalse}}
\newif\ifperiod
\periodtrue

(I originally wrote this sort of code to handle the = dropped E
problem of tex.web). Incidentally, the above code = won't quite
work since a period in the middle of the title will = gleefully
supress the final period. Perhaps an \ifnextchar sort = of setting
would work better.

->  (3) take a look at the spacefactor. If it = is 3000, we've just
->  had end-of-sentence punctuation. It's not = too difficult to
->  justify the occasional \@ which would be = necessary under these
->  circumstances.

-That's an interesting idea but assumes that = punctuation chars
-always have a \spacefactor that distinguishs them = from other
-characters. This means that we need to change = \frenchspacing and
-I'm not sure what happens then, how many = applications depend
-on things like this. But it looks certainly = promising.

All we need to do is make sure that the chapter titles = are set
with \nonfrenchspacing. Simple enough. In any = event,
\frenchspacing is really not a command that should = appear in a
TeX document anyway (if they need frenchspacing, = chances are
they'll be using a special document style = anyway).

-dh

------_=_NextPart_001_01C19443.407F689C--