LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-Type:
multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-vNgRMfgbUgnKOzyY0im5"
Date:
Mon, 1 Apr 2019 12:52:35 +0200
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Benjamin Berg <[log in to unmask]>
Message-ID:
In-Reply-To:
MIME-Version:
1.0
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (1129 bytes) , signature.asc (832 bytes)
On Mon, 2019-04-01 at 09:41 +0200, David Kastrup wrote:
> Benjamin Berg <[log in to unmask]> writes:
> 
> > Hi,
> > 
> > On Sun, 2019-03-31 at 18:57 -0300, Phelype Oleinik wrote:
> > > If you can't switch the catcode of & before looking for the
> > > optional argument, as David suggests
> > 
> > David has a good point, I could handle the optional argument parsing
> > myself and ensure that the case works correctly. It may not be trivial,
> > but it should be reasonably easy.
> 
> It should be trivial.  You just use the provided mechanism exactly as
> you did before (though naming it differently) and call it last thing in
> your argumentless wrapper environment after setting up catcodes.  That
> way the argument scanning only commences once catcodes are settled.

Well, I do have an optional parameter that disables the catcode changes
(which I know realize might have been a bad idea). That said, it would
still be rather safe to make the change, parse the optional parameter
and undo the change again afterwards when desired.

Or maybe I should just bite the bullet and create two almost identical
environments for this.

Benjamin


ATOM RSS1 RSS2