diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-22 23:31:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-22 23:31:01 +0000 |
commit | bbffa11d433672e37acfe18df6795ed412105379 (patch) | |
tree | 4f4b0cd078e364662f1fbe0ecac5a87431dee1fe /Master/texmf-dist | |
parent | cd55798aa1bb59eab2d143603955d2f1bb297194 (diff) |
nameref.4ht from r90 of tex4ht repo
git-svn-id: svn://tug.org/texlive/trunk@27776 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/nameref.4ht | 99 |
1 files changed, 65 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht b/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht index bc9de8f5f61..916943c69f4 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht @@ -1,6 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% nameref.4ht 2010-09-04-21:02 % -% Copyright (C) 2005--2010 Eitan M. Gurari % +% nameref.4ht 2012-09-21-16:03 % +% Copyright (C) 2005--2009 Eitan M. Gurari % +% 2009--2012 TeX Users Group % % % % This work may be distributed and/or modified under the % % conditions of the LaTeX Project Public License, either % @@ -24,27 +25,37 @@ % tex4ht@tug.org % % http://www.tug.org/tex4ht % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\immediate\write-1{version 2010-09-04-21:02} - +\immediate\write-1{version 2012-09-21-16:03} +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any +% later version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions +% of LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work +% is the TeX4ht Project <http://tug.org/tex4ht>. +% +% If you modify this program, changing the +% version identification would be appreciated. \let\ltx@label\label \def\prf:label{{\ifx \NR:Title\:UnDef \else \NR:Title\fi}% {\ifx \NR:Type\:UnDef \else \NR:Type .1\fi}{}}% \let\NR:StartSec\:StartSec \let\NR:no@sect\no@sect \def\no@sect#1#2#3#4#5#6[#7]#8{\gdef\NR:Title{\a:newlabel{#7}}% - \NR:no@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}} + \gdef\NR:Type{#1}% + \NR:no@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}} \def\:StartSec#1#2#3{% -% \gdef\NR:Title{\a:newlabel{#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}% @@ -55,36 +66,59 @@ \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 \def\:tempc[#1]#2{% \gdef\NR:Title{\a:newlabel{#1}}% + \gdef\NR:Type{part}% \o:no@part:[{#1}]{#2}} \HLet\no@part\:tempc \def\:tempc#1{% \gdef\NR:Title{\a:newlabel{#1}}% + \gdef\NR:Type{part}% \o:no@spart:{#1}} \HLet\no@spart\:tempc \def\:tempc[#1]#2{% \gdef\NR:Title{\a:newlabel{#1}}% + \gdef\NR:Type{chapter}% \o:NR@chapter:[#1]{#2}} \HLet\NR@chapter\:tempc \def\:tempc#1{% \gdef\NR:Title{\a:newlabel\sch:ttl}% \o:NR@schapter:{#1}% - \def\@currentlabelname{\sch:ttl}} + \gdef\NR:Type{chapter}% +} \HLet\NR@schapter\:tempc -\long\def\:tempc#1[#2]{% - \gdef\NR:Type{#1}% - \def\@currentlabelname{#2}% - \o:NR@@caption:{#1}[{#2}]% +\let\o:NR@@caption\@caption + +\long\def\@caption#1[#2]{% + \gdef\NR:Type{\@captype}% + \gdef\NR:Title{\a:newlabel{#2}}% + \o:NR@@caption{#1}[{#2}]% } -\HLet\NR@@caption\:tempc + +\let\o:NRorg@opargbegintheorem\@opargbegintheorem + \def\@opargbegintheorem#1#2#3{% + \gdef\NR:Title{\a:newlabel{#3}}% + \gdef\NR:Type{\@currenvir}% + \NR@gettitle{#3}% + \defineautorefname{\@currenvir}{#1}% + \o:NRorg@opargbegintheorem{#1}{#2}{#3}% + }% + +\let\o:NRorg@begintheorem\@begintheorem + \def\@begintheorem#1#2{% + \gdef\NR:Title{\a:newlabel{#1 #2}}% + \gdef\NR:Type{\@currenvir}% + \defineautorefname{\@currenvir}{#1}% + \NR@gettitle{}% + \o:NRorg@begintheorem{#1}{#2}% + }% \AtBeginDocument{% \@ifpackageloaded{listings}{% @@ -92,7 +126,7 @@ \gdef\NR:Title{\a:newlabel{listing}}% \gdef\NR:Type{lstlisting}% \o:NROrg@lst@MakeCaption:{#1}% - \def\@currentlabelname{listing}} + \gdef\@currentlabelname{listing}} \HLet\NROrg@lst@MakeCaption\:tempc }{}% } @@ -106,22 +140,19 @@ \@safe@activesfalse } - \Configure{newlabel} - {\cur:th \:currentlabel} - {\string\csname\string\string\space - :autoref\string\endcsname {\@currentlabelname}#1} +\gdef\defineautorefname#1#2{% + \expandafter\gdef\csname #1autorefname\endcsname{#2}} +\defineautorefname{theorem}{Theorem} + +\Configure{newlabel} + {\csname cur:th\endcsname \csname :currentlabel\endcsname} + {\string\csname\space :autoref\string\endcsname + {\NR:Type}#1} + \ifx \@currentlabelname\:UnDef \let\@currentlabelname\empty \fi -\append:defI\refstepcounter{\def\@currentlabelname{#1}} -\pend:def\eqnarray{\def\@currentlabelname{equation}} -\pend:def\equation{\def\@currentlabelname{equation}} -\ifx \figure\:UnDef \else - \pend:def\figure{\def\@currentlabelname{figure}} - \expandafter\pend:def\csname - 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 |