Received: by nummer-3.proteosys id <01C19443.4020A90C@nummer-3.proteosys>; Thu, 3 Jan 2002 11:41:50 +0100 MIME-Version: 1.0 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]) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C19443.4020A90C" X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: Punctuation after section heads Date: Mon, 8 Apr 1991 17:50:30 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Michael Downes" Sender: "LaTeX-L Mailing list" To: "Rainer M. Schoepf" Reply-To: "LaTeX-L Mailing list" Status: R X-Status: X-Keywords: X-UID: 313 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19443.4020A90C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable A punctuation question: If a documentstyle design calls for punctuation such as period or colon after a run-in section heading or theorem-environment heading, the punctuation can be provided fairly easily [although maybe not without changing \@sect]. But what do you do in particular cases where something else (like a ?) needs to be substituted for the default punctuation? Has anyone else faced this question and found a way to do it that doesn't require maintaining an array of macros \sectionpunct, \subsectionpunct, \subsectionpunct, ... to be called in \@sect using \csname? (And then you might need conceivably also need \theorempunct, \corollarypunct, \lemmapunct, \examplepunct, for each environment created with \newtheorem, or at least for each theoremstyle---AMS journals typically have four or five different `theorem'styles.) My first attempt at a solution has involved adding a macro \endpunct at the appropriate place in \@sect and \@begintheorem. Then \endpunct can be redefined in a document when necessary. But there are complications in scoping and ease of use; for example, this fouls up the nobreak and afterindent mechanisms: {\renewcommand{\endpunct}{?} \section{Why abandon the old technology} \label{s:who} \showthe\everypar } \showthe\everypar % lost the \@afterheading stuff Text begins here. and if we move the closing brace further to avoid losing \everypar, what rationale do we give the user? ... T}ext begins here. % try explaining this! Then there is the potential for situations like this: {\renewcommand{\endpunct}{?} \section{Why abandon the old technology} \label{s:who} \begin{itemize} \item Text begins here. ... where an environment occurs at the beginning of a section. The closing brace can't be put inside the environment without causing an error. In LaTeX a * option would be the natural way of taking off the ending punctuation but for sectioning commands the * option is already being used for something else. Any suggestions? Here's another idea: \section{Why abandon the old technology\substitutepunct{?}} with \def\substitutepunct#1{\def\protect\endpunct{#1}} I haven't tested this yet so I don't know whether there would be table of contents complications in this case. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Michael Downes mjd@math.ams.com (Internet) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D P.S. In the AMSART documentstyle distributed in the AMS-LaTeX package, where \subsection and lower level headings are run-in with ending punctuation, I ignored this issue, thinking that the need to substitute would be so rare that by the time we needed to face it, a good solution might have turned up. Naturally the first or second paper submitted to the AMS using the AMSART documentstyle had a couple of section headings ending in question marks! ------- ------_=_NextPart_001_01C19443.4020A90C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Punctuation after section heads

A punctuation question:

If a documentstyle design calls for punctuation such = as period or colon
after a run-in section heading or theorem-environment = heading, the
punctuation can be provided fairly easily [although = maybe not without
changing \@sect]. But what do you do in particular = cases where something
else (like a ?) needs to be substituted for the = default punctuation?
Has anyone else faced this question and found a way = to do it that
doesn't require maintaining an array of macros = \sectionpunct,
\subsectionpunct, \subsectionpunct, ... to be called = in \@sect
using \csname?  (And then you might need = conceivably also need
\theorempunct, \corollarypunct, \lemmapunct, = \examplepunct, for each
environment created with \newtheorem, or at least for = each
theoremstyle---AMS journals typically have four or = five different
`theorem'styles.)

My first attempt at a solution has involved adding a = macro \endpunct at
the appropriate place in \@sect and \@begintheorem. = Then \endpunct can
be redefined in a document when necessary. But there = are complications
in scoping and ease of use; for example, this fouls = up the nobreak and
afterindent mechanisms:

  {\renewcommand{\endpunct}{?}
   \section{Why abandon the old = technology}
   \label{s:who}
   \showthe\everypar
  }
   \showthe\everypar % lost the = \@afterheading stuff
   Text begins here.

and if we move the closing brace further to avoid = losing \everypar, what
rationale do we give the user?

  ...
  T}ext begins here. % try explaining = this!

Then there is the potential for situations like = this:

  {\renewcommand{\endpunct}{?}
   \section{Why abandon the old = technology}
   \label{s:who}

  \begin{itemize}
  \item Text begins here.
  ...

where an environment occurs at the beginning of a = section. The closing
brace can't be put inside the environment without = causing an error.

In LaTeX a * option would be the natural way of taking = off the ending
punctuation but for sectioning commands the * option = is already being
used for something else.

Any suggestions?

Here's another idea:

   \section{Why abandon the old = technology\substitutepunct{?}}

with

  = \def\substitutepunct#1{\def\protect\endpunct{#1}}

I haven't tested this yet so I don't know whether = there would be table
of contents complications in this case.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
Michael Downes
mjd@math.ams.com (Internet)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D

P.S. In the AMSART documentstyle distributed in the = AMS-LaTeX package,
where \subsection and lower level headings are run-in = with ending
punctuation, I ignored this issue, thinking that the = need to substitute
would be so rare that by the time we needed to face = it, a good solution
might have turned up.  Naturally the first or = second paper submitted to
the AMS using the AMSART documentstyle had a couple = of section headings
ending in question marks!
-------

------_=_NextPart_001_01C19443.4020A90C--