summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty14
1 files changed, 12 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
index c0c8df88dbd..50865b64bb3 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
@@ -317,7 +317,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\newcommand{\LWR@hyperreffinish}[1]{%
\begingroup%
\RenewDocumentCommand{\ref}{s m}{\LWR@print@ref{##2}}%
- #1%
+ #1%
\endgroup%
\LWR@htmltag{/a}%
}
@@ -340,7 +340,6 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\LWR@hyperrefbb%
}
-
\NewDocumentCommand{\LWR@hyperrefcb}{O{label}}{%
\LWR@startref{#1}%
\endgroup%
@@ -384,6 +383,17 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\LWR@hyperlinkb%
}
+\newcommand{\LWR@nullify@hyperrefb}[2][]{}
+
+\newcommand*{\LWR@nullify@hyperref}{%
+ \@ifnextchar[\LWR@nullify@hyperrefb\@fourthoffour%
+}
+\appto\LWR@restoreorigformatting{%
+ \LetLtxMacro\hyperdef\@thirdofthree
+ \LetLtxMacro\hyperlink\@secondoftwo%
+ \LetLtxMacro\hyperref\LWR@nullify@hyperref%
+}
+
\NewDocumentCommand{\autoref}{s m}{%
\IfBooleanTF{#1}{\ref{#2}}{\cref{#2}}%
}