summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/nameref.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-16 20:17:11 +0000
committerKarl Berry <karl@freefriends.org>2022-05-16 20:17:11 +0000
commit11dee93a70aa0e33fc86c94d9893c7dffa2a5aac (patch)
tree68036a0a7a3e0ba170ab7a693277b9f510615278 /Master/texmf-dist/tex/latex/hyperref/nameref.sty
parent41edb7fe5e0ff9b43aae8321df1c254aa73eaec9 (diff)
hyperref (16may22)
git-svn-id: svn://tug.org/texlive/trunk@63313 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/nameref.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hyperref/nameref.sty14
1 files changed, 11 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/nameref.sty b/Master/texmf-dist/tex/latex/hyperref/nameref.sty
index 2d4eb7fd7f9..cd8e91ea238 100644
--- a/Master/texmf-dist/tex/latex/hyperref/nameref.sty
+++ b/Master/texmf-dist/tex/latex/hyperref/nameref.sty
@@ -58,7 +58,7 @@
%% given in the file `manifest.txt'.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nameref}
- [2022-05-13 v2.48 Cross-referencing by name of section]%
+ [2022-05-16 v2.49 Cross-referencing by name of section]%
\RequirePackage{refcount}[2006/02/12]
\RequirePackage{gettitlestring}[2009/12/18]
\RequirePackage{ltxcmds}[2009/12/12]
@@ -427,8 +427,16 @@
\NR@setref{#1}\@thirdoffive{#1}%
\endgroup
}%
-\NewDocumentCommand\nameref{s}
- {\IfBooleanTF{#1}{\@namerefstar}{\T@nameref}}
+\@ifundefined{nameref}
+ {
+ \NewDocumentCommand\nameref{s}
+ {\IfBooleanTF{#1}{\@namerefstar}{\T@nameref}}
+ }
+ {
+ \PackageWarning{nameref}{Redefining \string\nameref}
+ \RenewDocumentCommand\nameref{s}
+ {\IfBooleanTF{#1}{\@namerefstar}{\T@nameref}}
+ }
\def\Nameref#1{`\nameref{#1}' on page~\pageref{#1}}
\providecommand\Sectionformat[2]{#1}
\@ifundefined{@kernel@pageref@exp}