LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Wed, 10 Sep 2008 22:37:54 +0100
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Joseph Wright <[log in to unmask]>
Parts/Attachments: text/plain (49 lines)
Frank Mittelbach wrote:
> Joseph,
> 
>  > I've been trying to work out if the current expl3 has anything like
>  > \patchcmd from etoolbox.  
> 
> the current expl3 doesn't have something comparible to \patchcmd, not on that
> level of complexity / generality
> 
> 
>  > Will suggested looking at the various \tlp_
>  > ... macros.  However, even a simple two-part test in this way fails:
>  > 
>  > \documentclass{article}
>  > \usepackage{expl3}
>  > \CodeStart
>  > \cs_if_really_exist:cT{thanks}{
>  >   \tlp_if_in:NnT\thanks{\footnotemark}{
>  >     % Do something
>  >   }
>  >   \tlp_if_in:NnT\thanks{\footnotetext}{
>  >     % Also do something
>  >   }
>  > }
>  > \CodeStop
>  > \begin{document}
>  > \end{document}
>  > 
>  > I guess I'm abusing the functions.  So have I missed something obvious?
> 
> well, one thing obvious is \thanks is not a "tlp" variable is it?

No.  The original context of the suggestion was that I couldn't see a
replacement for \g@addto@macro (I may of course have missed it).  Here,
using one of the \tlp_put functions does work.  So I was extrapolating!
I'm guessing that something like \g@addto@macro will be needed, in the end.

 > The \patchcmd does detokenization (loosing catcodes) and then
rebuilds the
> code using "current" catcodes, so it is kind of dangerous in situations

At least in the context I was thinking of, this would not be an issue.
I'd imagine that stuff with funny catcodes wouldn't typically be where a
simple find-and-replace would apply.

I'll stick with redefining \thanks for the moment, then.
-- 
Joseph Wright

ATOM RSS1 RSS2