Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t7QBaf4D006152 for ; Wed, 26 Aug 2015 13:36:42 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx103) with ESMTPS (Nemesis) id 0MQ8H1-1ZQSXf1gQd-005GUM for ; Wed, 26 Aug 2015 13:36:36 +0200 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 t7QBYkIS011353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Aug 2015 13:34:46 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7PM15Bp029230; Wed, 26 Aug 2015 13:34:46 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12513353 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 26 Aug 2015 13:34:45 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7QBYjdl022496 for ; Wed, 26 Aug 2015 13:34:45 +0200 Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t7QBYgQC028889 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Wed, 26 Aug 2015 13:34:45 +0200 Received: by igfj19 with SMTP id j19so9329062igf.1 for ; Wed, 26 Aug 2015 04:34:42 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.88.8 with SMTP id bc8mr10462030igb.46.1440588882371; Wed, 26 Aug 2015 04:34:42 -0700 (PDT) Received: by 10.36.81.201 with HTTP; Wed, 26 Aug 2015 04:34:42 -0700 (PDT) References: <55DBB7F6.1070307@clear.net.nz> <55DABA1D.3050706@morningstar2.co.uk> <55DCFDF7.7080305@clear.net.nz> <55DC05BF.1040505@morningstar2.co.uk> <55DC28E8.9090405@morningstar2.co.uk> <55DDFD0A.4000901@clear.net.nz> Content-Type: text/plain; charset=UTF-8 Message-ID: Date: Wed, 26 Aug 2015 13:34:42 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Catcode changes To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <55DDFD0A.4000901@clear.net.nz> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:r7d8G6yL3GY=:CT7CUNxoT4MgSUegtwHVAmo5kr 0UoRP+CxTw6qB4+4OMtw54++iVwENkxFCkrEquPLYS2AgexP3L025iu33Rpf+95Fg1uas0IjR YF/I8E1sfDk6T/+54JhSe6Z2acSxxU3ZeT7YQxS3sgOZBgwlq/AM5uqpATZzI7GjlbW3o3ALp reInBx6FxbCO6YZOsdB+iWhULmKD2B+Bf5ueSFqICE02D7z0avPLQDcahnpZGe86OAmUL/vwx UjG6P7oT8DVuCdqkf5OBD6qz58QxVnUJekWubtYZ4EhYleMheq8Fj7Gu9VKd2lAsJk6+ha/JK Mpei2ZSgxWjhKNUpi69NiQ5div0PdjI5fhuD+es2jiMHInyKM9dezH8itS/waW+fbhbJIwgwr ygAGN7JGvIOYbmjsTQ3+OSgUfBQQy0sUan5m3GBiHzSdGPcrZvDoxmp+Br4wFdld9fzH19MDr A/5cGhHTvEjc/iwznsLDUkhFqXGQUhCu5kzn1BIvPk33WEjdz4sAHnJhsmYn5VD0C4XGA91bZ CkUoEGqMb5MJzA9Ttf5z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results: notjunk:1;V01:K0:yn6+UDQXdeo=:A+PLBYp8KkL7EZkvpPs6xs 2gBh5I7PyOWBdjjFiqKH2wP4+jIls+VKhDcHD1YjXqcLvNdpKKuciQJt6ODjC89wKe1hHzg73 UM3cD2jwYbrCBIEnocXSpRKB4JU64fvPRCLWdD/qXjTaA9jnxZKctwt8/NB8wNv5MaGn0vib9 fKBZMxhFgea5B51kpAdTN/UtrqAccCcDIqscnhnLVI1phTeWZo0XRrOKXmeLucGrJedsu6We/ 4P8jGfcUxfkJVwNQ1vz/vxCtSNjp2Kq0gEBFYvEdBZZEoKfQvCd+XTJn4G5mmophMqZ1CrSpQ nBCacn2RQaK8VS218sz5RcIHzeWltQFbMeJslBlBl/flQgMAuVuXiIM1Q1+fs33GKyEsalYl/ I20t8IOu2R7sCxQBEvxc5Ykq1BrwO3recC5ohNDuaFbgSEQJvZeKiOc2Kzx80M+iBSIA/1t+E GhmXRoprElu2ciaVHcLeEqVMenamhIATOaYxR9e6kfL4m9zY842n X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7841 On 8/26/15, aparsloe wrote: > On 25/08/2015 1:35 a.m., Joseph Wright wrote: >> On 25/08/2015 07:05, Joseph Wright wrote: >>> On 26/08/2015 00:44, aparsloe wrote: >>>> (1) I wanted to use \tl_replace_all:Nnn on a token list that might >>>> contain braced groups. Using \tl_set_rescan:Nnn to change the category >>>> codes of { and } seemed the most direct way of proceeding. (Then >>>> resetting the category codes after replacement with an empty setup.) >>> I see what you mean (I have a similar case in siunitx, for historical >>> reasons). We'll explore what we can do with this: there are >>> mapping-based approaches one can imagine that will enter brace groups. >>> (We do that for \tl_lower_case:n, for example). However, for a general >>> 'search and replace' I'd be slightly wary as the TeX convention that >>> stuff in brace groups is 'special' is quite prevalent. (Depending on >>> performance requirements, you might also look at l3regex if you are >>> doing the replacement only very rarely.) >> It would be useful here to see what your real use case is, as that's >> often illustrative. >> -- >> Joseph Wright > Thank you for the responses. I was remiss. I didn't make it clear that > looking inside braced groups was not the concern, rather to replace (or > remove) a list of tokens that might include braced groups. I've been > reworking the code of a package that turns latex expressions into > expressions that can be digested by l3fp. In fact, this particular issue > has now been reworked away, but the problem had been to remove a varying > expression, e.g. \sqrt{123} or \frac{1-x}{1+x}, from the initial > segment of a formula. Rescanning { and } to "other" allowed me to use > \tl_remove:Nn successfully. Although I can think of other means of doing > this, they seem cumbersome by comparison. > > Andrew \tl_set:No \l_result_tl { \use_none:nn \sqrt{123} + 123 } could be a better approach in many cases, no? Bruno