Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Dec 2009 14:23:24 +0100 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id nB3DNPV0027161 for ; Thu, 3 Dec 2009 14:23:25 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id nB3DIwqr011041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Dec 2009 14:18:59 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id nB3C0u4A025664; Thu, 3 Dec 2009 14:18:47 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 360303 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 3 Dec 2009 14:18:47 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id nB3D8lXD006445 for ; Thu, 3 Dec 2009 14:08:47 +0100 Received: from smtp.ampere.inpg.fr (smtp.ampere.inpg.fr [147.171.64.83]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id nB3D8aUY025988 for ; Thu, 3 Dec 2009 14:08:40 +0100 Received: from localhost (localhost [127.0.0.1]) by smtp.ampere.inpg.fr (Postfix) with ESMTP id 63263981B0 for ; Thu, 3 Dec 2009 14:08:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ampere.inpg.fr Received: from smtp.ampere.inpg.fr ([127.0.0.1]) by localhost (smtp.ampere.grenoble-inp.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bsY3tHL+xOvi for ; Thu, 3 Dec 2009 14:08:36 +0100 (CET) Received: from [193.55.48.234] (client-vpnP234.inpg.fr [193.55.48.234]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.ampere.inpg.fr (Postfix) with ESMTPSA id 46751980A0 for ; Thu, 3 Dec 2009 14:08:36 +0100 (CET) User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4B17B855.90608@free.fr> Date: Thu, 3 Dec 2009 14:08:37 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: "Julien RIVAUD (_FrnchFrgg_)" Subject: Rescanning an argument with a special catcode for the colon To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 03 Dec 2009 13:23:24.0337 (UTC) FILETIME=[CA795A10:01CA741B] Status: R X-Status: X-Keywords: X-UID: 6192 Hi, I'm not sure this ML is the right place to be asking my question, so please redirect me if needed. I consider myself rather intimate with TeX (for instance I once reimplemented a key-val interface because the keyval package gobbled to much braces, and because I wanted more unknown key/unknown value facilities; nowadays I just use l3kv or l3keys), and I have been playing with expl3 for half a year. I really like the approach you have taken, and have begun the process to rewrite my custom (ad-hoc) packages to take advantage of expl3; I could get rid of a lot of my packages since the functionnality is now directly included (probably better done than I could ever do myself), so thanks a lot for that. The transision to expl3 is smooth until now, but I have one package that I have difficulty in translating: In my thesis, I use a kind of thing whose textual representation is some circles and squares intertwinned with integers. To type that, I like to use for instance `.8:3.9:5.9:0.' where a dot would be replaced by a circle and a colon by a square. I currently have a macro \chemin which typesets its argument in a new catcode regime where . is essentially \bullet and : is \square. \chemin is defined like this: \begingroup \catcode`\:=13\catcode`\.=13\relax \gdef\chemin#1{% \begingroup \catcode`\:=13\catcode`\.=13\relax \let.\cheminsommet \let:\cheminface \endlinechar=-1\everyeof{}% \scantokens{#1}% \endgroup } \endgroup I'm sure there is a way to define this in a beautiful expl3 manner, but I didn't find any satisfying definition. Of course I can basically use expl3 names and functions like \char_make_active:N, and using \cs_set_eq:NN to cheat and alias the functions I need to names without a colon, but that's hardly good looking. Can you be of some help ? Or is there no beautiful way to solve this ? In which case, should there be an expl3 function akin to \tl_rescan_with_active_char:nn { =, =, ...}{ } where the s in the first arg wouldn't be rescanned so that I could say \tl_rescan_with_active_char:nn { :=\module_do_something:n, .=\module_do_another: } { #1 } and it wouldn't complain about a non existent macro \module_do_something I tried to play with \tl_[set_]rescan and didn't succeed in writing such a \tl_rescan_with_active_char:nn Cheers, Julien RIVAUD