texlive[63021] Master/texmf-dist: \ref* and \Ref support, tex4ht

commits+karl at tug.org commits+karl at tug.org
Wed Apr 13 23:22:09 CEST 2022


Revision: 63021
          http://tug.org/svn/texlive?view=revision&revision=63021
Author:   karl
Date:     2022-04-13 23:22:09 +0200 (Wed, 13 Apr 2022)
Log Message:
-----------
\ref* and \Ref support, tex4ht r1109-1110

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1109

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-04-13 19:56:33 UTC (rev 63020)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-04-13 21:22:09 UTC (rev 63021)
@@ -1,3 +1,9 @@
+2022-04-13  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (latex.4ht): added support for the \Ref command.
+	* tex4ht-4ht.tex (latex.4ht,nameref.4ht): added support for the
+	\ref* command.
+
 2022-04-05  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-ooffice.tex (ooffice.4ht): added option to produce inline

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-04-13 19:56:33 UTC (rev 63020)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-04-13 21:22:09 UTC (rev 63021)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1107 2022-04-04 14:44:55Z karl $
+% $Id: tex4ht-4ht.tex 1110 2022-04-13 14:59:07Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2022 TeX Users Group    
@@ -1492,10 +1492,26 @@
 \let\o:ref|=\:ref
 \def\::ref#1{{\:SUBOff\:SUPOff\xdef\RefArg{#1}}\expandafter\o:ref
                                                \expandafter{\RefArg}}
-\def\:ref{\Protect\::ref}
+\def\:ref{\@ifstar{\Protect\::ref}{\Protect\::ref}}
 \let\ref|=\:ref
 >>>
 
+
+Support for the \''\Ref' command. It is variant of \''\ref' that uppercases
+first letter of the referenced label.
+
+\<sub/sup in labels/refs\><<<
+\def\::Ref#1{%
+  \let\olda:rEfLiNK\rEfLiNK%%
+  \def\rEfLiNK##1##2{\Link{##1}{}\edef\:ref:currentlabel{##2}\expandafter\MakeUppercase\:ref:currentlabel\EndLink}%
+  \::ref{#1}%
+  \let\rEfLiNK\olda:rEfLiNK%
+}
+\def\:Ref{\@ifstar{\Protect\::Ref}{\Protect\::Ref}}
+\let\Ref\:Ref
+>>>
+
+
 Without the \'''\expandafter' we may get \''\RefArg' passed
  as the first argument to \''\T at arg',
 resulting in \''\def\RefArg{\RefArg}'.
@@ -3533,12 +3549,12 @@
 }
 
 \let\T:ref=\::ref
-\def\::ref{\protect\T at ref}
+\def\::ref{\@ifstar{\protect\T at ref}{\protect\T at ref}}
 \def\T at ref#1{%
   \@safe at activestrue
   \let\::ref \T:ref
   \expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}%
-  \def\::ref{\protect\T at ref}%
+  \def\::ref{\@ifstar{\protect\T at ref}{\protect\T at ref}}
   \@safe at activesfalse
 }
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht	2022-04-13 19:56:33 UTC (rev 63020)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/latex.4ht	2022-04-13 21:22:09 UTC (rev 63021)
@@ -1,4 +1,4 @@
-% latex.4ht (2022-02-01-14:27), generated from tex4ht-4ht.tex
+% latex.4ht (2022-04-13-13:14), generated from tex4ht-4ht.tex
 % Copyright 1997-2009 Eitan M. Gurari
 % Copyright 2009-2022 TeX Users Group
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-02-01-14:27}
+\immediate\write-1{version 2022-04-13-13:14}
 
 \ifx\SaveMkHalignConf:g\:UnDef \else \expandafter\endinput\fi
 
@@ -430,8 +430,16 @@
 \let\o:ref\:ref
 \def\::ref#1{{\:SUBOff\:SUPOff\xdef\RefArg{#1}}\expandafter\o:ref
                                                \expandafter{\RefArg}}
-\def\:ref{\Protect\::ref}
+\def\:ref{\@ifstar{\Protect\::ref}{\Protect\::ref}}
 \let\ref\:ref
+\def\::Ref#1{%
+  \let\olda:rEfLiNK\rEfLiNK%%
+  \def\rEfLiNK##1##2{\Link{##1}{}\edef\:ref:currentlabel{##2}\expandafter\MakeUppercase\:ref:currentlabel\EndLink}%
+  \::ref{#1}%
+  \let\rEfLiNK\olda:rEfLiNK%
+}
+\def\:Ref{\@ifstar{\Protect\::Ref}{\Protect\::Ref}}
+\let\Ref\:Ref
 \let\:newl at bel\@newl at bel
 \let\n:wlbl\@newl at bel
 \def\@newl at bel#1#2{{\:SUBOff\:SUPOff
@@ -2298,7 +2306,7 @@
 \expandafter\:temp\usepackage!*?: 
 \def\:tempa{\@latex at e@error}
 \ifx \:temp\:tempa
-   % latex209.4ht (2022-02-01-14:27), generated from tex4ht-4ht.tex
+   % latex209.4ht (2022-04-13-13:14), generated from tex4ht-4ht.tex
 % Copyright 1997-2009 Eitan M. Gurari
 % Copyright 2009-2022 TeX Users Group
 %
@@ -2317,7 +2325,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-02-01-14:27}
+\immediate\write-1{version 2022-04-13-13:14}
 
 \let\:fnsymbol\@fnsymbol
 \def\@fnsymbol#1{{\hbox{$\:fnsymbol{#1}$}}}

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht	2022-04-13 19:56:33 UTC (rev 63020)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht	2022-04-13 21:22:09 UTC (rev 63021)
@@ -1,6 +1,6 @@
-% nameref.4ht (2021-02-03-14:57), generated from tex4ht-4ht.tex
+% nameref.4ht (2022-04-13-13:14), generated from tex4ht-4ht.tex
 % Copyright 2005-2009 Eitan M. Gurari
-% Copyright 2009-2021 TeX Users Group
+% Copyright 2009-2022 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2021-02-03-14:57}
+\immediate\write-1{version 2022-04-13-13:14}
 
    \let\NR:Type\relax
 \let\ltx at label\label
@@ -163,12 +163,12 @@
 }
 
 \let\T:ref=\::ref
-\def\::ref{\protect\T at ref}
+\def\::ref{\@ifstar{\protect\T at ref}{\protect\T at ref}}
 \def\T at ref#1{%
   \@safe at activestrue
   \let\::ref \T:ref
   \expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}%
-  \def\::ref{\protect\T at ref}%
+  \def\::ref{\@ifstar{\protect\T at ref}{\protect\T at ref}}
   \@safe at activesfalse
 }
 



More information about the tex-live-commits mailing list.