On 02 Jun 2014, at 09:46, Joseph Wright <[email protected]>
wrote:
>>
>> Is this deliberate, and if so is there a reliable way of emulating
>> \pdfstrcmp in it's entirety?
\luaescapestring does nothing except making sure that the argument
is valid lua string content. So yes, then lack of doubling is deliberate.
To get matching strings, you will need to detokenize both, as done below.
Best wishes,
Taco
>
> Suggestion from Bruno Le Floch to the LaTeX team:
>
> \long\def\pdf@strcmp#1#2{%
> \directlua{%
> strcmp (
> "\luaescapestring{\detokenize\expandafter{\expanded{#1}}}",
> "\luaescapestring{\detokenize\expandafter{\expanded{#2}}}"
> )
> }%
> }
>
> which does certainly work. Thoughts?
> --
> Joseph Wright
>
>