summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-04-20 23:02:43 +0000
committerKarl Berry <karl@freefriends.org>2009-04-20 23:02:43 +0000
commit3ea86bef2e63ca77c8fbfe4e3b4617804de11855 (patch)
tree1e0e750a74f9564e0c70869bcb018ee010518e50 /Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
parentee53eac199e12fb91859fd18a43dd506ff75e3a9 (diff)
tex4ht-1.0.2009_04_18_1145
git-svn-id: svn://tug.org/texlive/trunk@12767 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht/nameref.4ht')
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/nameref.4ht44
1 files changed, 38 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht b/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
index 88a0de1b8b1..bac9949c633 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
@@ -1,6 +1,6 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% nameref.4ht 2008-09-16-11:44 %
-% Copyright (C) 2005--2008 Eitan M. Gurari %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% nameref.4ht 2009-04-14-17:07 %
+% Copyright (C) 2005--2009 Eitan M. Gurari %
% %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
@@ -24,23 +24,33 @@
% gurari@cse.ohio-state.edu %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\immediate\write-1{version 2008-09-16-11:44}
+\immediate\write-1{version 2009-04-14-17:07}
\let\ltx@label\label
-\def\prf:label{{\ifx \NR:Title\:UnDef \else \NR:Title\fi}{}{}}%
+\def\prf:label{{\ifx \NR:Title\:UnDef \else \NR:Title\fi}%
+ {\ifx \NR:Type\:UnDef \else \NR:Type .1\fi}{}}%
\let\NR:StartSec\:StartSec
\def\:StartSec#1#2#3{%
\gdef\NR:Title{\a:newlabel{#3}}%
+ \gdef\NR:Type{#1}%
\NR:StartSec{#1}{#2}{#3}%
\gdef\@currentlabelname{#1}%
}
+\pend:defI\begin{\PushMacro\NR:Type \PushMacro\NR:Title}
+\pend:defI\end{%
+ \PopMacro\NR:Type \PopMacro\NR:Title
+ \global\let\NR:Type\NR:Type
+ \global\let\NR:Title\NR:Title
+}
\def\:tempc#1#2#3#4#5#6[#7]#8{%
\gdef\NR:Title{\a:newlabel{#7}}%
+ \gdef\NR:Type{#1}%
\o:NR@sect:{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}}
\HLet\NR@sect\:tempc
\def\:tempc#1#2#3#4#5{%
\gdef\NR:Title{\a:newlabel\ssect:ttl}%
+ \gdef\NR:Type{#1}%
\o:NR@ssect:{#1}{#2}{#3}{#4}{#5}%
\def\@currentlabelname{\ssect:ttl}}
\HLet\NR@ssect\:tempc
@@ -65,6 +75,24 @@
\o:NR@schapter:{#1}%
\def\@currentlabelname{\sch:ttl}}
\HLet\NR@schapter\:tempc
+
+\long\def\:tempc#1[#2]{%
+ \gdef\NR:Type{#1}%
+ \def\@currentlabelname{#2}%
+ \o:NR@@caption:{#1}[{#2}]%
+}
+\HLet\NR@@caption\:tempc
+
+\AtBeginDocument{%
+ \@ifpackageloaded{listings}{%
+ \def\:tempc#1{%
+ \gdef\NR:Title{\a:newlabel{listing}}%
+ \gdef\NR:Type{lstlisting}%
+ \o:NROrg@lst@MakeCaption:{#1}%
+ \def\@currentlabelname{listing}}
+ \HLet\NROrg@lst@MakeCaption\:tempc
+ }{}%
+}
\let\T:ref=\::ref
\def\::ref{\protect\T@ref}
\def\T@ref#1{%
@@ -77,7 +105,7 @@
\Configure{newlabel}
{\cur:th \:currentlabel}
- {\string\csname\space
+ {\string\csname\string\string\space
:autoref\string\endcsname {\@currentlabelname}#1}
\ifx \@currentlabelname\:UnDef
\let\@currentlabelname\empty
@@ -91,6 +119,10 @@
figure*\endcsname{\def\@currentlabelname{figure}}
\fi
\pend:defII\:thm{\def\@currentlabelname{##1}}
+\pend:defIII\@setref{\edef\RefArg{##3}}
+\append:defIII\@setref{\let\:autoref\:gobble}
+\let\:autoref\:gobble
+
\Hinput{nameref}
\endinput