
¿Es posible agregar un enlace al \hyper@normalise
comando sin sobrescribir toda la macro? Deseo agregar un gancho al final de la macro justo antes de \hyper@n@rmalise
poder agregar definiciones personalizadas para normalizar.
Esto es lo que quiero lograr:
\begingroup
\endlinechar=-1 %
\catcode`\^^A=14 %
\catcode`\^^M\active
\catcode`\%\active
\catcode`\#\active
\catcode`\_\active
\catcode`\$\active
\catcode`\&\active
\gdef\hyper@normalise{^^A
\begingroup
\catcode`\^^M\active
\def^^M{ }^^A
\catcode`\%\active
\let%\@percentchar
\let\%\@percentchar
\catcode`\#\active
\def#{\hyper@hash}^^A
\def\#{\hyper@hash}^^A
\@makeother\&^^A
\edef&{\string&}^^A
\edef\&{\string&}^^A
\edef\textunderscore{\string_}^^A
\let\_\textunderscore
\catcode`\_\active
\let_\textunderscore
\let~\hyper@tilde
\let\~\hyper@tilde
\let\textasciitilde\hyper@tilde
\let\\\@backslashchar
\edef${\string$}^^A
\Hy@safe@activestrue
\csname hyper@normalise@hook\endcsname % <--HERE
\hyper@n@rmalise
}^^A
\endgroup
Pero quiero hacerlo \patchcmd
sin necesidad de congelarlo \hyper@normalise
en mi paquete. En esta macro se cambian muchos catcodes, por lo que aparece un error:
Runaway definition?
\active \def \catcode `\
! File ended while scanning definition of \etb@resrvda.
MWE:
\documentclass{article}
\usepackage{etoolbox}
\usepackage{hyperref}
\makeatletter
\patchcmd\hyper@normalise{\hyper@n@rmalise}{\csname hyper@normalise@hook\endcsname \hyper@n@rmalise}{}{}
\show\hyper@normalise
\makeatother
\begin{document}
aa
\end{document}