summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-4ht.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex24
1 files changed, 20 insertions, 4 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index f12d318268..86cf26ae1b 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -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 @@ A better def is given to \''\l:bel' in AmsLaTeX .
\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@arg',
resulting in \''\def\RefArg{\RefArg}'.
@@ -3533,12 +3549,12 @@ definitions.
}
\let\T:ref=\::ref
-\def\::ref{\protect\T@ref}
+\def\::ref{\@ifstar{\protect\T@ref}{\protect\T@ref}}
\def\T@ref#1{%
\@safe@activestrue
\let\::ref \T:ref
\expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}%
- \def\::ref{\protect\T@ref}%
+ \def\::ref{\@ifstar{\protect\T@ref}{\protect\T@ref}}
\@safe@activesfalse
}