Skip to content

Commit

Permalink
test nameref, issue #234
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrike Fischer committed May 16, 2022
1 parent 5dc5632 commit 235d697
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.txt
@@ -1,3 +1,7 @@
2022-05-16 Ulrike Fischer/David Carlisle
* fixed: check if \nameref is already defined for compability
with ltugboat.cls (issue #234)

2022-05-13 Ulrike Fischer/David Carlisle

* added new interface for package authors to create targets for internal
Expand Down
14 changes: 11 additions & 3 deletions nameref.dtx
Expand Up @@ -33,7 +33,7 @@
%<driver>\ProvidesFile{nameref.drv}
% \fi
% \ProvidesFile{nameref.dtx}
[2022-05-13 v2.48 Cross-referencing by name of section]%
[2022-05-16 v2.49 Cross-referencing by name of section]%
%
%
% \iffalse
Expand Down Expand Up @@ -843,8 +843,16 @@
% \end{macrocode}
% \begin{macro}{\nameref}
% \begin{macrocode}
\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}}
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\Nameref}
Expand Down
9 changes: 9 additions & 0 deletions testfiles/gh234-ltugboat.lvt
@@ -0,0 +1,9 @@
\input{regression-test}
\documentclass{ltugboat}
\usepackage{nameref}
\begin{document}
\START

\ShowCommand\nameref

\end{document}
6 changes: 6 additions & 0 deletions testfiles/gh234-ltugboat.tlg
@@ -0,0 +1,6 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \nameref=document command:
#1:s
->\IfBooleanTF {#1}{\@namerefstar }{\T@nameref }.
(gh234-ltugboat.aux)

0 comments on commit 235d697

Please sign in to comment.