[OS X TeX] separators in label names
jfbu
jfbu at free.fr
Sun Oct 13 15:44:50 EDT 2019
Hi Piet,
Le 13/10/2019 à 14:21, Piet van Oostrum a écrit :
> jfbu <jfbu at free.fr> writes:
>
>>
>> Hi,
>>
>> sorry if completely off the mark, but doesn't babel provide the
>>
>> \@safe at activestrue
>>
>> toggle precisely for such \csname...\endcsname expansions ?
>>
>> Couldn't crossreftools in presence of babel do
>>
>> \@safe at activestrue
>> ...
>>
>> \@safe at activesfalse
>>
> I have tried that, but because there are all kinds of expansions going on at different times, I couldn't get it working.
It was impossible to get it working while maintaining the main aspect of crossreftools which is to provide expandable macros.
I wonder why Murray needs this package, but my hint at \if at safe@actives babel toggle was under such circumstances misleading as it can't be applied without breaking expandability.
I of course did that without having read the numerous exchanges on tex.sx, and here, and belatedly understood crossreftools is a package providing expandable macros.
Seems Murray got it solved by David, anyway,
Best,
Jean-François
>
> However, I found that I had made an error in my code. There was a r@{#1} that should be r@#1.
>
> So the code should be:
>
> \renewcommand{\@@crtextr at ct@ref}[2]{%
> \expandafter\@@@crtextr at ct@ref\expandafter{\detokenize{#2}}{#1}%
> }
> \newcommand{\@@@crtextr at ct@ref}[2]{%
> \expandafter\ifx\csname r@#1\endcsname\relax
> \crt at refundefined%
> \else
> \expandafter\expandafter\csname crt at ref@splitter@#2\endcsname\csname r@#1\endcsname%
> \fi
> }
>
More information about the MacOSX-TeX
mailing list