summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-18 18:03:30 +0000
committerKarl Berry <karl@freefriends.org>2010-04-18 18:03:30 +0000
commit4f5df459139365b598a08e7b946698649b36efec (patch)
tree21af8eff7041190cb17325ade7677d02bc4e4665 /Master/texmf-dist/source
parentd6fb43e455d1db11285021afc73220e1544c48fc (diff)
hyperref update (17apr10)
git-svn-id: svn://tug.org/texlive/trunk@17902 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.dtx30
-rw-r--r--Master/texmf-dist/source/latex/hyperref/nameref.dtx108
2 files changed, 128 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index 4d442b0954e..cb876aacf9e 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -44,7 +44,7 @@
%<puenc>\ProvidesFile{puenc.def}
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
-%<!none> [2010/03/30 v6.80u
+%<!none> [2010/04/17 v6.80x
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -126,7 +126,7 @@
\end{document}
%</driver>
% \fi
-% \CheckSum{26960}
+% \CheckSum{26980}
%
% \MakeShortVerb{|}
% \StopEventually{}
@@ -6526,10 +6526,26 @@
}%
\fi
\fi
- \DeclareRobustCommand\ref{\@ifstar\@refstar\T@ref}%
+ \DeclareRobustCommand\ref{%
+ \@ifstar\@refstar\T@ref
+ }%
\DeclareRobustCommand\pageref{%
\@ifstar\@pagerefstar\T@pageref
}%
+% \@ifclassloaded{memoir}{%
+% \ltx@IfUndefined{@mem@titlerefnolink}\ltx@secondoftwo{%
+% \ltx@IfUndefined{@mem@titleref}\ltx@secondoftwo\ltx@firstoftwo
+% }%
+% }\ltx@secondoftwo
+% {%
+% \DeclareRobustCommand*{\nameref}{%
+% \@ifstar\@mem@titlerefnolink\@mem@titleref
+% }%
+% }{%
+ \DeclareRobustCommand*{\nameref}{%
+ \@ifstar\@namerefstar\T@nameref
+ }%
+% }%
}
\Hy@AtBeginDocument{%
\ifHy@texht
@@ -8065,7 +8081,10 @@
\edef\hyper@hash{\string#}
\edef\hyper@tilde{\string~}
\edef\hyper@quote{\string"}
-\let\@currentHref\@empty
+% \end{macrocode}
+% Support \cs{label} before |\begin{document}|.
+% \begin{macrocode}
+\def\@currentHref{Doc-Start}
\let\Hy@footnote@currentHref\@empty
% \end{macrocode}
% We give the start of document a special label; this is used
@@ -11199,6 +11218,9 @@
\def\@pagerefstar#1{%
\HyRef@StarSetRef{#1}\@secondoffive
}
+\def\@namerefstar#1{%
+ \HyRef@StarSetRef{#1}\@thirdoffive
+}
\Hy@AtBeginDocument{%
\@ifpackageloaded{varioref}{%
\def\@Refstar#1{%
diff --git a/Master/texmf-dist/source/latex/hyperref/nameref.dtx b/Master/texmf-dist/source/latex/hyperref/nameref.dtx
index 9a73dd7b8e2..c8e9eb72bb6 100644
--- a/Master/texmf-dist/source/latex/hyperref/nameref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/nameref.dtx
@@ -30,9 +30,9 @@
%<driver>\ProvidesFile{nameref.drv}
% \fi
% \ProvidesFile{nameref.dtx}
- [2010/01/25 v2.36 Cross-referencing by name of section]%
+ [2010/04/17 v2.39 Cross-referencing by name of section]%
%
-% \CheckSum{580}
+% \CheckSum{691}
%
% \iffalse
%<*driver>
@@ -114,6 +114,7 @@
% \begin{macrocode}
\RequirePackage{refcount}[2006/02/12]
\RequirePackage{gettitlestring}[2009/12/18]
+\RequirePackage{ltxcmds}[2009/12/12]
% \end{macrocode}
%
% We redefine |\label| so that it also writes the name of the
@@ -269,19 +270,71 @@
}
% \end{macrocode}
%
+% Support for class memoir.
+%
+% \begin{macrocode}
+\ltx@IfUndefined{ifheadnameref}{%
+}{%
+ \ltx@IfUndefined{M@sect}{%
+ }{%
+ \let\NRorg@M@sect\M@sect
+ \def\M@sect#1#2#3#4#5#6[#7][#8]{%
+ \ifheadnameref
+ \NR@gettitle{#8}%
+ \else
+ \NR@gettitle{#7}%
+ \fi
+ \NRorg@M@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{#8}]%
+ }%
+ }%
+}
+% \end{macrocode}
+%
% Parts and chapters are treated differently. sigh.
+% \cs{@part} and \cs{@spart} are \cs{long} because of class memoir.
%
% \begin{macrocode}
\let\NR@part\@part
-\def\@part[#1]#2{%
+\long\def\@part[#1]#2{%
\NR@gettitle{#1}%
\NR@part[{#1}]{#2}%
}
+\let\NR@spart\@spart
+\long\def\@spart#1{%
+ \NR@gettitle{#1}%
+ \NR@spart{#1}%
+}
\let\NR@chapter\@chapter
\def\@chapter[#1]#2{%
\NR@gettitle{#1}%
\NR@chapter[{#1}]{#2}%
}
+\@ifclassloaded{memoir}{%
+ \ltx@IfUndefined{ifheadnameref}{%
+ }{%
+ \def\@chapter[#1]#2{%
+ \ltx@IfUndefined{ch@pt@c}{%
+ \NR@gettitle{#1}%
+ }{%
+ \ifx\ch@pt@c\ltx@empty
+ \NR@gettitle{#2}%
+ \else
+ \def\NR@temp{#1}%
+ \ifx\NR@temp\ltx@empty
+ \expandafter\NR@gettitle\expandafter{\ch@pt@c}%
+ \else
+ \ifheadnameref
+ \NR@gettitle{#1}%
+ \else
+ \expandafter\NR@gettitle\expandafter{\ch@pt@c}%
+ \fi
+ \fi
+ \fi
+ }%
+ \NR@chapter[{#1}]{#2}%
+ }%
+ }%
+}{}
\let\NR@schapter\@schapter
\def\@schapter#1{%
\NR@gettitle{#1}%
@@ -359,12 +412,42 @@
}{}
% \end{macrocode}
%
+% \subsubsection{Theorems}
+%
+% \begin{macrocode}
+\ltx@IfUndefined{@opargbegintheorem}{}{%
+ \let\NRorg@opargbegintheorem\@opargbegintheorem
+ \def\@opargbegintheorem#1#2#3{%
+ \NR@gettitle{#3}%
+ \NRorg@opargbegintheorem{#1}{#2}{#3}%
+ }%
+}
+\AtBeginDocument{%
+ \@ifpackageloaded{amsthm}{%
+ \let\NRorg@begintheorem\@begintheorem
+ \begingroup
+ \edef\x{macro:\string#1\string#2[\string#3]}%
+ \@onelevel@sanitize\x
+ \def\y#1->#2\@nil{#1}%
+ \edef\z{\expandafter\y\meaning\@begintheorem->\@nil}%
+ \@onelevel@sanitize\z
+ \expandafter\endgroup
+ \ifx\x\z
+ \def\@begintheorem#1#2[#3]{%
+ \NR@gettitle{#3}%
+ \NRorg@begintheorem{#1}{#2}[{#3}]%
+ }%
+ \fi
+ }{}%
+}
+% \end{macrocode}
+%
% \subsection{Referencing stuff}
%
% We default the label and hypertext reference to be empty.
% \begin{macrocode}
-\def\@currentlabelname{}
-\def\@currentHref{}
+\providecommand*{\@currentlabelname}{}
+\providecommand*{\@currentHref}{}
% \end{macrocode}
% Since the second part of the preserved reference now has five parts
% (number, page, name, hypertext reference and file), we need extra utility
@@ -458,7 +541,20 @@
}%
\fi
\fi
-\def\nameref{\protect\T@nameref}
+%\@ifclassloaded{memoir}{%
+% \ltx@IfUndefined{@mem@titlerefnolink}\ltx@secondoftwo{%
+% \ltx@IfUndefined{@mem@titleref}\ltx@secondoftwo\ltx@firstoftwo
+% }%
+%}\ltx@secondoftwo
+%{%
+% \DeclareRobustCommand*{\nameref}{%
+% \@ifstar\@mem@titlerefnolink\@mem@titleref
+% }%
+%}{%
+ \DeclareRobustCommand*{\nameref}{%
+ \@ifstar\T@nameref\T@nameref
+ }%
+%}
% \end{macrocode}
% An extended form which gives title and page number.
% \begin{macrocode}