Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o1HEfgrn007862 for ; Wed, 17 Feb 2010 15:41:44 +0100 Received: (qmail 12243 invoked by alias); 17 Feb 2010 14:41:37 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 17 Feb 2010 14:41:36 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx103) with SMTP; 17 Feb 2010 15:41:36 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o1HEcjYP013571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Feb 2010 15:38:45 +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 o1GN12or006687; Wed, 17 Feb 2010 15:38:42 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 397082 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 17 Feb 2010 15:38:42 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o1HEcgb3024446 for ; Wed, 17 Feb 2010 15:38:42 +0100 Received: from smtp115.plus.mail.re1.yahoo.com (smtp115.plus.mail.re1.yahoo.com [69.147.102.78]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with SMTP id o1HEcUdI012041 for ; Wed, 17 Feb 2010 15:38:33 +0100 Received: (qmail 43552 invoked from network); 17 Feb 2010 14:38:29 -0000 Received: from g228063171.adsl.alicedsl.de (st_philipp@92.228.63.171 with plain) by smtp115.plus.mail.re1.yahoo.com with SMTP; 17 Feb 2010 06:38:29 -0800 PST X-Yahoo-SMTP: _jlT6bOswBCTfNEaYibKorijSw14_bs- X-YMail-OSG: jsIcaNYVM1m3lK7k.jG_bwbNAunsyM38HZ.kFNumCO7fDKUZyHh3N0VATC4jK9wspcRaaUjYmAM5piPTQKg4DVe9eM5J99XkNE.X1sHjS7JhYZ5PvMGj7g72_H7XTr5e6fJHWipQWWw1Yc.Or.42dkt3yA826o5CfEmOU3h88CmDLyn8QeeYvBF_guvl__bVr8kgzbV8ga7cxcdu3pa9bbKjsE7NvzpDfptNFt7sCpnAnFPP7A_11bb2q00ROFMV0b0i5eHCufGq2x2jAzVkuJO02xT6Mn7QvmRw.oZgeevIcEctZA.qOtfi7TTLxGqR0XZAfeIOdShEiLJk.S_KKY7f8yIY1yZnkdzrEav_gi15lJjB45EO8nz4H66Q6ByqY0MvDkOPcuNCvpPaH76TUQ-- X-Yahoo-Newman-Property: ymail-3 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Apple Message framework v1077) References: <4B727378.8060704@morningstar2.co.uk> <20100210100943.GA3759@oberdiek.my-fqdn.de> <4B7298D6.7080206@morningstar2.co.uk> <20100210145258.GA18188@oberdiek.my-fqdn.de> <4B72D339.5080104@morningstar2.co.uk> <4B7AA5D7.8010104@elzevir.fr> <4B7BEB3D.8020105@residenset.net> X-Mailer: Apple Mail (2.1077) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id o1HEcgb3024447 Message-ID: <2D995100-34EE-4B91-BDFE-9BDCCF3A6BEC@yahoo.de> Date: Wed, 17 Feb 2010 15:38:27 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Philipp Stephani Subject: Re: String module To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4B7BEB3D.8020105@residenset.net> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p6i75npGen84eVAEFK/syJmFuaL1OLtauwJ5R/kaZ9HAe8peGX1DeqJYTcon 3bvVAat2VgIIwDvGHk2iJ8SK2vcWsidNyPYmt/3qYC38eHth5J9rzKCneOvOHFTDGwVio4KF1cMC ST+og==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de X-Scanned-By: MIMEDefang 2.63 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 6297 Am 17.02.2010 um 14:12 schrieb Lars Hellström: >> – e.g. with argument specifiers like "s" and "v" in xparse. > > Not quite that compact, but the concept of "argument processors" was added to xparse in part to support this kind of thing. I have read about them, but the manual says "xparse introduces the idea of an argument processor, which is applied to an argument after it has been grabbed by the underlying system but before it is passed to ⟨code⟩." so they can't be applied here – the catcode changes must be performed before the argument is grabbed. Once it is through the input processor, things like spaces and comments are inevitably lost. I thought of something like this: \documentclass{minimal} \usepackage{expl3} \makeatletter \ExplSyntaxOn \msg_new:nnn { test } { not-outer } {syntax error \msg_line_context:} \cs_new_protected_nopar:Npn \NewVerbatimCommand #1 #2 { \cs_new_protected_nopar:Npx #1 { \exp_not:n { \group_begin: \let\do\@makeother \dospecials } \exp_not:c { \cs_to_str:N #1 _aux_i:NwN } } \cs_new_protected_nopar:cpx { \cs_to_str:N #1 _aux_i:NwN } ##1 { \exp_not:N \cs_new_protected_nopar:Npn \exp_not:c { \cs_to_str:N #1 _aux_ii:wN } ####1 ##1 { \exp_not:n { \tl_set:Nn \l_test_tmpa_tl { ##1 } \tl_map_inline:Nn \l_test_tmpa_tl { % TODO: here we must find out whether the token is in fact a group \bool_if:nF { ( ! \token_if_cs_p:N ####1 ) && ( \token_if_letter_p:N ####1 || \token_if_other_char_p:N ####1 ) } { \msg_error:nn { test } { not-outer } \exp_args:NNno \tl_set_rescan:Nnn \l_test_tmpa_tl { } \l_test_tmpa_tl \tl_map_break: } } \exp_args:No } \exp_not:c { \cs_to_str:N #1 _aux_iii:n } \exp_not:n { \l_test_tmpa_tl \group_end: } } \exp_not:c { \cs_to_str:N #1 _aux_ii:wN } } \cs_new_protected_nopar:cpn { \cs_to_str:N #1 _aux_iii:n } ##1 { #2 } } \ExplSyntaxOff \makeatother \NewVerbatimCommand\myverb{\quitvmode\texttt{#1}} \begin{document} \null \myverb+ab c d\ef#% gh + \mbox{\myverb+ab c d\ef gh +} \end{document}