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 p4BJgZCu028632 for ; Wed, 11 May 2011 21:42:36 +0200 Received: (qmail 8756 invoked by alias); 11 May 2011 19:42:30 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 11 May 2011 19:42:29 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx051) with SMTP; 11 May 2011 21:42:29 +0200 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 p4BJdlSE028770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 May 2011 21:39:47 +0200 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 p4BH6lYx003961; Wed, 11 May 2011 21:39:46 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1254856 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 11 May 2011 21:39:46 +0200 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 p4BJdkGj006605 for ; Wed, 11 May 2011 21:39:46 +0200 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with SMTP id p4BJdYjv028715 for ; Wed, 11 May 2011 21:39:37 +0200 Received: (qmail invoked by alias); 11 May 2011 19:39:34 -0000 Received: from HSI-KBW-078-042-073-176.hsi3.kabel-badenwuerttemberg.de (EHLO [192.168.0.197]) [78.42.73.176] by mail.gmx.net (mp072) with SMTP; 11 May 2011 21:39:34 +0200 X-Provags-ID: V01U2FsdGVkX193WZA7zWZ38Sr+fi1bNfoetOcyCagpCrcl9pncex rOSxRu0WEiH65e User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110503 Thunderbird/3.1.10 MIME-Version: 1.0 References: <4DCADD93.6090009@gmx.de> <4DCAE0D9.8@morningstar2.co.uk> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBA037B3C7A31836B8B6218C1" Message-ID: <4DCAE5F5.20305@gmx.de> Date: Wed, 11 May 2011 21:39:33 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Arno Trautmann Subject: Re: compare string with \c_job_name_tl To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4DCAE0D9.8@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p4qWX7V4skqN6/OUNajYwphmqhThGSbqwKBsGqzNkcpmnY7EiOQEaM0qTCF9 bKjKzmsKRBacMjPxEI6cxbQImsyETw4OglKV02TXilOEpn2uBinHkICpnJmhvjGk2/ou5HaH1DWR 2/daQjVrlRDaUj0wMGC/2B2WVeTgq9ZOudcL1nqBEWD7yegwJ8bdFx+87N6fiTZ0iEW+g==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6740 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBA037B3C7A31836B8B6218C1 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Joseph Wright wrote: > On 11/05/2011 20:03, Arno Trautmann wrote: >> Hi all, >> >> sorry for this rather trivial question, but at the moment it's driving= >> me crazy =85 >> I just want to execute some code depending on the jobname. I found a >> solition by Donald Arsenau=B9 that looks rather lengthy. So, I thought= >> with LaTeX3, everything is easier. Now I tried this: >> >> \documentclass{minimal} >> \usepackage{expl3} >> \begin{document} >> \ExplSyntaxOn >> \tl_set:Nn\myjob{a} >> \tl_set:Nx\myjobii{\tl_to_str:N\myjob} >> \tl_if_eq:NNTF\myjobii\jobname{true}{false} >> \ExplSyntaxOff >> \end{document} >> >> because, based on Donald's post, I assumed that I need to have an =93a= =94 >> with catcode =93other=94 for a successfull test. >> >> Now, calling >> lualatex --jobname=3Da test.tex >> always prints =93false=94. So =96 what is my mistake here and what wou= ld be >> the easiest way for such a test using expl3? >> >> cheers >> Arno >=20 > The \jobname primitive is not a token list variable, so this test won't= > work: you want \c_job_name_tl. Yes, I tried that, too, but it didn't work =85 but thanks. > However, I'd use the \str_if_eq:xxTF test > here, as you want a string comparison >=20 > \documentclass{minimal} > \usepackage{expl3} > \begin{document} > \ExplSyntaxOn > \str_if_eq:nnTF{a}{\c_job_name_tl}{true}{false} > \ExplSyntaxOff > \end{document} >=20 > (This will work with \jobname as well, but the 'official' interface to > that in LaTeX3 is \c_job_name_tl.) Your example fails, but the :no variant works in this case. However, I seem not to get it working for comparing a command to the jobname =96 what do I have to do to say \str_if_eq:nnTF{\myjobname}{\c_job_name_tl}{true}{false} I tried to use \tl_to_str in the argument of a \str_if_eq:ooTF, but that still results in false. cheers Arno --------------enigBA037B3C7A31836B8B6218C1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3K5fUACgkQcYXUw/rerZ6w9ACgjHWMH/l0KRZg3J3b+83IQxg8 wB8AoIk3KcmJb1iA5HaVOZzl25MDwOFG =tyGg -----END PGP SIGNATURE----- --------------enigBA037B3C7A31836B8B6218C1--