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 p02FTp4U003581 for ; Sun, 2 Jan 2011 16:29:52 +0100 Received: (qmail 14653 invoked by alias); 2 Jan 2011 15:29:46 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 02 Jan 2011 15:29:46 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx071) with SMTP; 02 Jan 2011 16:29:46 +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 p02FS7VC007742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Jan 2011 16:28:07 +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 p01N14Z2014420; Sun, 2 Jan 2011 16:28:01 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 771152 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 2 Jan 2011 16:28:01 +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 p02FS1YH026970 for ; Sun, 2 Jan 2011 16:28:01 +0100 Received: from web82001.mail.mud.yahoo.com (web82001.mail.mud.yahoo.com [66.163.178.245]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with SMTP id p02FRmaE003479 for ; Sun, 2 Jan 2011 16:27:49 +0100 Received: (qmail 54973 invoked by uid 60001); 2 Jan 2011 15:27:46 -0000 X-YMail-OSG: lWto6kIVM1mXv_NlppZrcphosLGaaWCRHAIpixyH1wG8dNH NMz6gE.4wRelNqg0a5XNJ98vySSP2Ci1HFFPTinj.QUwPw9.P8Z5iT3dUegE A6lzLbEqQpXnc.MtrM7NJSSsPUqTS7NytBXfrdYaZQAtjALziA2JWp.rqft2 n_rxTLuXFg9p45V3BeUBFt2dmmeyuHsNySa3fYqBKSxCvxUtAnhX2EDqP05n IDjlL9NDLzgoPAvYK.inocIjUzWgtXafAkNqKHNVJsZBDq5Ul.0Wwo.yXzYt 6BO2RJNzBliNRmLvW74Dt22co7hQyt2inOq7yI1J5uOi65fcEDIlD7_IKm5. io4RST1ZvpY_9zour3m_DycVDcD80P_8xZ5CukEZvqaySbD26_uKa_cS_EvJ OhA7J3mbb Received: from [174.22.75.153] by web82001.mail.mud.yahoo.com via HTTP; Sun, 02 Jan 2011 07:27:46 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 References: <4D1F6F9D.9020209@laposte.net> <4D1F8145.2010308@morningstar2.co.uk> <4D1F8BFD.5000803@laposte.net> <4D1F8DFE.70205@morningstar2.co.uk> <20110101204323.GA14218@khaled-laptop> <4D1F94F8.2010306@morningstar2.co.uk> <703780.66667.qm@web82005.mail.mud.yahoo.com> <4D1F99C9.8000609@gmx.de> <4D206576.2080206@morningstar2.co.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-174327478-1293982066=:54913" Message-ID: <473826.54913.qm@web82001.mail.mud.yahoo.com> Date: Sun, 2 Jan 2011 07:27:46 -0800 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Paul Thompson Subject: Re: LaTeX3 and engines To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4D206576.2080206@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7YMk+ONqcQ8h4HHJoBtGOmrvNj+HJMmLLset8EwG 6ybhA==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: 6495 --0-174327478-1293982066=:54913 Content-Type: text/plain; charset=us-ascii There is really a somewhat deeper issue. Like many who use LaTeX for more than superficial stuff (I wrote a class file newlfm and several sty files, most of which are not much used), I can read documentation and figger it out somewhat. However, knowing of the EXISTENCE of a tool is really the key, not how it is used. How are people to learn that specific primitives exist? It's not in the LaTeX Companion, which is my starting point. Paul Thompson ________________________________ From: Joseph Wright To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Sent: Sun, January 2, 2011 5:45:58 AM Subject: Re: LaTeX3 and engines On 01/01/2011 21:16, Arno Trautmann wrote: > Paul Thompson wrote: >> What sort of documentation is available for \pdfstrcmp? I confess that I have >> never heard of this toolset. > > pdfTeX manual says: > > \pdfstrcmp (expandable) > This command compares two strings and expands to 0 if the strings are > equal, to -1 if the first string ranks before the second, and to 1 > otherwise. The primitive was introduced in pdfTEX 1.30.0. > > searching the internet may bring even more information. Like many of the newer pdfTeX primitives, there is to some extend a need to 'suck it and see' to find out what happens. For LaTeX3, all we do is use the 'equal' test. The test does expansion, so to test two token lists as strings without any expansion, you do \def\StringCompareTF#1#2{% \ifnum\pdfstrcmp{\unexpanded{#1}}{\unexpanded{#2}}=\z@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } or code to that effect. -- Joseph Wright --0-174327478-1293982066=:54913 Content-Type: text/html; charset=us-ascii
There is really a somewhat deeper issue.  Like many who use LaTeX for more than superficial stuff (I wrote a class file newlfm and several sty files, most of which are not much used), I can read documentation and figger it out somewhat.  However, knowing of the EXISTENCE of a tool is really the key, not how it is used.  How are people to learn that specific primitives exist?  It's not in the LaTeX Companion, which is my starting point.
 
Paul Thompson


From: Joseph Wright <joseph.wright@MORNINGSTAR2.CO.UK>
To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE
Sent: Sun, January 2, 2011 5:45:58 AM
Subject: Re: LaTeX3 and engines

On 01/01/2011 21:16, Arno Trautmann wrote:
> Paul Thompson wrote:
>> What sort of documentation is available for \pdfstrcmp?  I confess that I have
>> never heard of this toolset.
>
> pdfTeX manual says:
>
> \pdfstrcmp<general text>  <general text>  (expandable)
> This command compares two strings and expands to 0 if the strings are
> equal, to -1 if the first string ranks before the second, and to 1
> otherwise. The primitive was introduced in pdfTEX 1.30.0.
>
> searching the internet may bring even more information.

Like many of the newer pdfTeX primitives, there is to some extend a need to 'suck it and see' to find out what happens. For LaTeX3, all we do is use the 'equal' test. The test does expansion, so to test two token lists as strings without any expansion, you do

\def\StringCompareTF#1#2{%
  \ifnum\pdfstrcmp{\unexpanded{#1}}{\unexpanded{#2}}=\z@
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}

or code to that effect.
--
Joseph Wright
--0-174327478-1293982066=:54913--