summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-14 03:00:34 +0000
committerNorbert Preining <norbert@preining.info>2022-04-14 03:00:34 +0000
commitef28ae824b7f6bc8e2b9c08443b53fd2ef37a781 (patch)
treef085c0d08110f603a2fc7954b389b0ad503f0831 /support
parent62ceabeefc18d431d171a1d2080bd79e858ff722 (diff)
CTAN sync 202204140300
Diffstat (limited to 'support')
-rw-r--r--support/TeX4ht/source/ChangeLog6
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex24
2 files changed, 26 insertions, 4 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 8ee941ac8c..fdef1c98b9 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,9 @@
+2022-04-13 Michal Hoftich <michal.h21@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@gmail.com>
* tex4ht-ooffice.tex (ooffice.4ht): added option to produce inline
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
}