LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 22 Sep 2010 19:50:55 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1; format=flowed
From:
Joseph Wright <[log in to unmask]>
Parts/Attachments:
text/plain (45 lines)
On 22/09/2010 13:15, Lars Hellström wrote:
> The idea I have proposed is to change the definition of quarks from
> effectively
>
> \def\q_nil{\q_nil}
> to
> \def\q_nil{\string\q_nil}

This breaks \quark_if_<name-here>:NTF. For example, \q_no_value is used 
as a return value for functions such as

   \prop_get:NnN \l_some_prop { key } \l_return_tl

So \quark_if_no_value:NTF needs to be true for both

   \quark_if_no_value:NTF \q_no_value

and

   \quark_if_no_value:NTF \l_return_tl

That then requires two separate tests, something like:

   \tex_ifx:D \q_no_value #1
     \prg_return_true:
   \tex_else:D
     \tex_ifx:D \q_novalue_tl #1 % set to { \q_no_value }
       \prg_return_true:
     \tex_else:D
       \prg_return_false:
     \tex_fi:D
   \tex_fi:D

I'd also point out that currently an 'o' expansion of a quark gives the 
quark, whereas in the scheme suggested things do change.

(At a higher level, \NoValue in xparse is implemented as

   \cs_new_protected:Npn \NoValue { -NoValue- }

so that it _can_ be typeset without a loop occurring. However, this is 
used in 'document level' functions, so the requirements are different.)
-- 
Joseph Wright

ATOM RSS1 RSS2