[tex4ht-commits] [SCM] tex4ht updated: r1555 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Mon Sep 23 12:16:05 CEST 2024
Author: michal_h21
Date: 2024-09-23 10:16:04 +0000 (Mon, 23 Sep 2024)
New Revision: 1555
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
fixed subscripts in labels
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2024-09-11 13:41:52 UTC (rev 1554)
+++ trunk/lit/ChangeLog 2024-09-23 10:16:04 UTC (rev 1555)
@@ -1,3 +1,9 @@
+2024-09-23 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (latex.4ht): fixed support for superscripts and
+ subscripts that are used values in labels (like in
+ \tag{$e_{1}$}\label{eq1}). Thanks to Linas Stonys.
+
2024-09-11 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): prevent insertion of
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2024-09-11 13:41:52 UTC (rev 1554)
+++ trunk/lit/tex4ht-4ht.tex 2024-09-23 10:16:04 UTC (rev 1555)
@@ -1526,6 +1526,13 @@
\let\o:ref|=\:ref
\def\::ref#1{{\:SUBOff\:SUPOff\xdef\RefArg{#1}}\expandafter\o:ref
\expandafter{\RefArg}}
+\ExplSyntaxOn
+\def\::ref#1{{\:SUBOff\:SUPOff\xdef\RefArg{#1}%
+ \SUBOn\SUPOn%
+ \def\rEfLiNK##1##2{\Link{##1}{}\tl_rescan:nn{}{##2}\EndLink}%
+ \expandafter\o:ref\expandafter{\RefArg}%
+}}
+\ExplSyntaxOff
\DeclareDocumentCommand\:ref{s}{\IfBooleanTF{#1}{\Protect\::ref}{\Protect\::ref}}
\let\ref|=\:ref
>>>
@@ -1535,12 +1542,14 @@
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%
-}
+\ExplSyntaxOn
+\def\::Ref#1{{%
+ \:SUBOff\:SUPOff\xdef\RefArg{#1}%
+ \SUBOn\SUPOn%
+ \def\rEfLiNK##1##2{\tl_set_rescan:Nnn\l_tmpa_tl{}{##2}\Link{##1}{}\expandafter\MakeUppercase\l_tmpa_tl\EndLink}%
+ \expandafter\o:ref\expandafter{\RefArg}%
+}}
+\ExplSyntaxOff
\DeclareDocumentCommand\:Ref{s}{\IfBooleanTF{#1}{\Protect\::Ref}{\Protect\::Ref}}
\let\Ref\:Ref
>>>
More information about the tex4ht-commits
mailing list.