Subject: | |
From: | |
Reply To: | |
Date: | Wed, 22 Sep 2010 19:50:55 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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
|
|
|