diff options
author | Karl Berry <karl@freefriends.org> | 2022-04-13 21:22:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-04-13 21:22:09 +0000 |
commit | 5fbdde835cedbab62d0fef554d33770b307839a8 (patch) | |
tree | db6ea7233290ee1e9cf98cdc5feafe4422b61024 /Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | |
parent | 6c42279a36bed48049930270e967663e428a2975 (diff) |
\ref* and \Ref support, tex4ht r1109-1110
git-svn-id: svn://tug.org/texlive/trunk@63021 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index f12d3182680..86cf26ae1bb 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/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 } |