diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty | 82 |
1 files changed, 75 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty index 9a903029e78..51da8aac561 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty @@ -18,7 +18,7 @@ -\typeout{Using the lwarp html version of package `hyperref' — discarding options.} +\typeout{Using the lwarp html version of package `hyperref', discarding options.} \typeout{ Are not using ProvidesPackage, so that other packages} \typeout{ do not attempt to patch lwarp's version of `hyperref'.} \DeclareOption*{} @@ -27,19 +27,43 @@ \newcommand*{\hypersetup}[1]{} \newcommand*{\hyperbaseurl}[1]{} -\NewDocumentCommand{\hyperimage}{m +m}{% +\NewDocumentCommand{\LWR@hyperimageb}{m +m}{% \LWR@ensuredoingapar% \def\LWR@templink{#1}% \@onelevel@sanitize\LWR@templink% \LWR@htmltag{img src="\LWR@templink" alt="#2" class="hyperimage"}% \LWR@ensuredoingapar% +\endgroup% } -\NewDocumentCommand{\hyperdef}{m m +m}{% + +\newrobustcmd*{\hyperimage}{% +\begingroup% +\catcode`\#=12 +\catcode`\%=12 +\catcode`\&=12 +\catcode`\~=12 +\catcode`\_=12 +\LWR@hyperimageb% +} + +\NewDocumentCommand{\LWR@hyperdefb}{m m +m}{% \LWR@ensuredoingapar% \LWR@sublabel{#1.#2}% #3% +\endgroup% } -\NewDocumentCommand{\LWR@hyperrefb}{m m m +m}{% + +\newcommand*{\hyperdef}{% +\begingroup% +\catcode`\#=12 +\catcode`\%=12 +\catcode`\&=12 +\catcode`\~=12 +\catcode`\_=12 +\LWR@hyperdefb% +} + +\NewDocumentCommand{\LWR@hyperrefbb}{m m m +m}{% \def\LWR@templink{#1}% \@onelevel@sanitize\LWR@templink% \def\LWR@templinktwo{#2}% @@ -51,12 +75,34 @@ }% #4% \LWR@htmltag{/a}% +\endgroup% +} + +\newrobustcmd*{\LWR@hyperrefb}{% +\begingroup% +\catcode`\#=12 +\catcode`\%=12 +\catcode`\&=12 +\catcode`\~=12 +\catcode`\_=12 +\LWR@hyperrefbb% } -\NewDocumentCommand{\LWR@hyperrefc}{O{label} +m}{ +\NewDocumentCommand{\LWR@hyperrefcb}{O{label} +m}{ \LWR@startref{#1}% #2% \LWR@htmltag{/a}% +\endgroup% +} + +\newcommand*{\LWR@hyperrefc}{% +\begingroup% +\catcode`\#=12 +\catcode`\%=12 +\catcode`\&=12 +\catcode`\~=12 +\catcode`\_=12 +\LWR@hyperrefcb% } \DeclareRobustCommand*{\hyperref}{% @@ -64,13 +110,35 @@ \@ifnextchar[\LWR@hyperrefc\LWR@hyperrefb% } -\NewDocumentCommand{\hypertarget}{m +m}{% +\NewDocumentCommand{\LWR@hypertargetb}{m +m}{% \label{#1}% #2% +\endgroup% } -\DeclareDocumentCommand{\hyperlink}{m +m}{% +\newcommand*{\hypertarget}{% +\begingroup% +\catcode`\#=12 +\catcode`\%=12 +\catcode`\&=12 +\catcode`\~=12 +\catcode`\_=12 +\LWR@hypertargetb% +} + +\DeclareDocumentCommand{\LWR@hyperlinkb}{m +m}{% \hyperref[#1]{#2}% +\endgroup% +} + +\newcommand*{\hyperlink}{% +\begingroup% +\catcode`\#=12 +\catcode`\%=12 +\catcode`\&=12 +\catcode`\~=12 +\catcode`\_=12 +\LWR@hyperlinkb% } \NewDocumentCommand{\autoref}{s m}{% |