latex3 / hyperref

Hypertext support for LaTeX
165 stars 35 forks source link

remove ltxcmds dependency #312

Closed davidcarlisle closed 10 months ago

davidcarlisle commented 10 months ago

This PR removes the dependency on the ltxcmds pakage.

Mostly ltxcmds provides LaTeX commands for other formats so is not needed in hyperref. (Just use \@firstoftwo rather than \ltx@firstoftwo etc)

It does provide a few extra features, here taken from expl3, and given Hy@ names

\let\Hy@LocalAppendToMacro\tl_put_right:Nn
\let\Hy@GlobalAppendToMacro\tl_gput_right:Nn
\let\Hy@ifempty\tl_if_empty:nTF

Also a couple of afterfi commands defined directly in the Hy@ prefix

\long\def\Hy@ReturnAfterFi#1\fi{\fi#1}
\long\def\Hy@ReturnAfterElseFi#1\else#2\fi{\fi#1}

The main advantage is an iterative step towards aligning the hyperref coding with the main kernel sources.

u-fischer commented 10 months ago

Looks good. The generic hyperref driver in the pdfresources contains some ltxcmds too (I removed them now), so that should be updated first.