Received: by nummer-3.proteosys id <01C19442.D43C015C@nummer-3.proteosys>; Thu, 3 Jan 2002 11:38:49 +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_01C19442.D43C015C" X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: forwarded mesage Date: Mon, 8 Oct 1990 21:33:11 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: Sender: "LaTeX-L Mailing list" To: "Rainer Schoepf" Reply-To: "LaTeX-L Mailing list" Status: R X-Status: X-Keywords: X-UID: 237 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19442.D43C015C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm forwarding this for Victor Eijkhout. Rainer or Frank: could one of you PLEASE change his network address so that Victor can continue participating in the discussion? Nico .................................................. Hello, a week ago Frank repeated a message of mine regarding the possibility (and desirability!) of having verbatim text in macro arguments. Frank was quite right that my solution would not be good enough for section headings if these would have to be written to a table of contents. I found that out for myself. His suggestion of using \meaning doesn't seem right to me: it would work only if the verbatim object is a control sequence. Or have I misunderstood something? I can suggest another possibility, and this time I'll be honest about the limitations. It should be possible to absorb the macro argument one token, or rather: one undelimited macro argument, at a time. Whenever the token is \verb (test by \ifx, this will work even if the user has \let something to \verb), verbatim mode is switched on, and character tokens are produced for every character in the verbatim string. There are some fun parts to this: a space can never be an undelimited macro argument, so probably the catcode of space will have to be changed to \active beforehand, and the recognition of such an active space should then prompt removal of all subsequent spaces. Something like that. Other fun part: macros can scoop up whole groups, and you have to recognize that you have got hold of a group instead of a token, if that is the case you have to reinsert the braces (I programmed something like this a while ago. How do you generate a single brace: \iftrue{\else}\fi. Ho hum.) because presumably there is a macro in front of the group. This will only lose braces around single tokens, but I don't think that matters. Catching the result in a token list will then give the input that can *really* be absorbed by the \section command. All of this is not particularly fast, and the one case where it goes wrong is if the user has the verbatim text inside a group. ............................................................ Victor Eijkhout phone: +1 217 244-0047 Center for Supercomputing Research and Development University of Illinois at Urbana-Champaign 305 Talbot laboratory 104 South Wright street Urbana, Illinois 61801-2932, USA home: 2503 W. Springfield Av, Apt. K-4, Champaign 61821, USA ------_=_NextPart_001_01C19442.D43C015C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable forwarded mesage

I'm forwarding this for Victor Eijkhout. Rainer or = Frank: could
one of you PLEASE change his network address so that = Victor can
continue participating in the discussion?

Nico
..................................................

Hello,

a week ago Frank repeated a message of mine regarding = the
possibility (and desirability!) of having verbatim = text
in macro arguments.

Frank was quite right that my solution would not be = good
enough for section headings if these would have to be = written
to a table of contents. I found that out for = myself.

His suggestion of using \meaning doesn't seem right to = me:
it would work only if the verbatim object is a = control sequence.
Or have I misunderstood something?

I can suggest another possibility, and this time I'll = be
honest about the limitations.

It should be possible to absorb the macro = argument
one token, or rather: one undelimited macro = argument,
at a time. Whenever the token is \verb (test by = \ifx,
this will work even if the user has \let something = to
\verb), verbatim mode is switched on, and character = tokens are
produced for every character in the verbatim = string.

There are some fun parts to this: a space can never be = an
undelimited macro argument, so probably the = catcode
of space will have to be changed to \active = beforehand,
and the recognition of such an active space should = then prompt
removal of all subsequent spaces. Something like = that.

Other fun part: macros can scoop up whole groups, = and
you have to recognize that you have got hold of a = group
instead of a token, if that is the case you have = to
reinsert the braces (I programmed something like = this
a while ago. How do you generate a single = brace:
\iftrue{\else}\fi. Ho hum.) because presumably there = is
a macro in front of the group. This will only lose = braces
around single tokens, but I don't think that = matters.

Catching the result in a token list will then give = the
input that can *really* be absorbed by the = \section
command.

All of this is not particularly fast, and the one case = where
it goes wrong is if the user has the verbatim = text
inside a group.

............................................................

Victor = Eijkhout           = ;          phone: +1 217 = 244-0047
 Center for Supercomputing Research and = Development
 University of Illinois at = Urbana-Champaign
 305 Talbot laboratory
 104 South Wright street
 Urbana, Illinois 61801-2932, USA

home: 2503 W. Springfield Av, Apt. K-4, Champaign = 61821, USA

------_=_NextPart_001_01C19442.D43C015C--