LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0 (Apple Message framework v930.3)
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Will Robertson <[log in to unmask]>
Date:
Thu, 12 Feb 2009 09:24:06 +1030
Content-Type:
multipart/signed; boundary=Apple-Mail-1-535092797; micalg=sha1; protocol="application/pkcs7-signature"
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (763 bytes) , smime.p7s (2446 bytes)
Dear all,

I'm trying to write a unit test for \token_if_space:NTF, but I'm  
having some difficulty this early in the morning. Spaces are consumed  
after the control sequence, as an argument is being scanned for, so  
I'm not sure how to pass a space char into the conditional. I haven't  
had any luck getting it to trip true; any hints how to do this and  
when the function might be used?

For the curious, the definition is:

% implicit \catcode`\~=5 % space
\def_new:Npn \token_new:Nn #1#2 {\glet_new:NN #1#2}
\token_new:Nn \c_space_token {~}
\def_long_new:Npn \token_if_space_p:N #1{
   \if_catcode:w \exp_not:N #1\c_space_token
     \c_true
   \else:
     \c_false
   \fi:
}
\def_long_test_function_new:npn {token_if_space:N} #1{
   \if:w\token_if_space_p:N #1}

Many thanks,
Will

ATOM RSS1 RSS2