summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-09-24 17:27:30 +0000
committerKarl Berry <karl@freefriends.org>2024-09-24 17:27:30 +0000
commitc606ea066298ad6805ba4636adec71e2806c678e (patch)
tree410aef47a3ad35943686ac084f837643c2e55bf6 /Master/texmf-dist/source/generic
parentcbc1d3911741346aac59a9007830972c724b805d (diff)
subscripts in labels, tex4ht r1555; \Ref->\XRef to avoid clash with LaTeX, tex4ht r1556; subscript support in tags, tex4ht r1557
git-svn-id: svn://tug.org/texlive/trunk@72371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog20
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/Makefile6
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex43
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex16
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/wripro.tex6
5 files changed, 60 insertions, 31 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index 0efdd8bc4fc..e836a359a1c 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,23 @@
+2024-09-24 Karl Berry <karl@freefriends.org>
+
+ * wripro.tex: copyright 2024.
+ * Makefile (tex4ht_sty_derived): depends on wripro.tex.
+
+2024-09-23 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (amsmath.4ht): fixed support for superscripts and
+ subscripts in equation tags (like \tag{$e_{1}$}).
+
+ * tex4ht-4ht.tex (th4.4ht),
+ * tex4ht-info.tex (info4ht.4ht),
+ * tex4ht-sty.tex (tex4ht.sty),
+ * wripro.tex: renamed internal TeX4ht command \Ref to \XRef, to
+ prevent clashes with \Ref provided by LaTeX.
+
+ * 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@gmail.com>
* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): prevent insertion of
diff --git a/Master/texmf-dist/source/generic/tex4ht/Makefile b/Master/texmf-dist/source/generic/tex4ht/Makefile
index 5328185f784..16da59e03ce 100644
--- a/Master/texmf-dist/source/generic/tex4ht/Makefile
+++ b/Master/texmf-dist/source/generic/tex4ht/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 1538 2024-07-07 15:55:16Z karl $
+# $Id: Makefile 1558 2024-09-24 17:22:45Z karl $
# This file is public domain. Originally written 2010, Karl Berry.
# Assumes GNU make.
@@ -385,8 +385,6 @@ endif
derived += $(tex4ht_mathjax_derived)
tex4ht_mathjax_derived = mathjax-latex-4ht.4ht
-# wripro.tex generates nothing (not literate).
-
ifneq ($(do_java),2)
derived += $(xtpipes_derived)
xtpipes_derived = \
@@ -577,7 +575,7 @@ $(tex4ht_ooimpress_derived): tex4ht-ooimpress.tex $(common)
$(tex4ht_options_derived): tex4ht-options.tex $(common)
htlatex $< "html,3,sections+" "" "" $(tex_1opt)
-$(tex4ht_sty_derived): tex4ht-sty.tex $(common_no_tex4ht_sty)
+$(tex4ht_sty_derived): tex4ht-sty.tex wripro.tex $(common_no_tex4ht_sty)
$(HTTEX) $< ""
$(tex4ht_svg_derived): tex4ht-svg.tex $(common)
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index 2bd694407ce..ca3a61c56a5 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 1552 2024-09-09 14:48:03Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1557 2024-09-23 12:20:56Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2024 TeX Users Group
@@ -1526,6 +1526,13 @@ 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}}
+\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 @@ 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%
-}
+\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
>>>
@@ -22112,11 +22121,13 @@ $$
|<def :currentlabel for make@df@tag|>%
\anc:lbl r{}%
}}
-\def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{#1}%
+\ExplSyntaxOn
+\def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{\tl_rescan:nn{}{#1}}%
\toks@\@xp{\p@equation{#1}}\edef\@currentlabel{\the\toks@}%
|<def :currentlabel for make@df@tag|>%
\anc:lbl r{}%
}}
+\ExplSyntaxOff
>>>
%%%%%%%%%%%%%
@@ -37114,25 +37125,25 @@ is not a font).
\<non-html TeX4ht divs\><<<
\def\TagCh#1{\Tag{#1|<Ch tag|>}{\theChapterCounter}}
-\def\RefCh#1{Chapter\ \Ref{#1|<Ch tag|>}}
+\def\RefCh#1{Chapter\ \XRef{#1|<Ch tag|>}}
\def\TagApp#1{\Tag{#1|<Ap tag|>}{\theChapterCounter}}
-\def\RefApp#1{Appendix\ \Ref{#1|<Ap tag|>}}
+\def\RefApp#1{Appendix\ \XRef{#1|<Ap tag|>}}
\def\TagSec#1{\Tag{#1|<Sec tag|>}{\theSectionCounter}}
-\def\RefSec#1{Section\ \Ref{#1|<Sec tag|>}}
+\def\RefSec#1{Section\ \XRef{#1|<Sec tag|>}}
>>>
\<html TeX4ht divs\><<<
\def\TagCh#1{\Tag{#1|<Ch tag|>}{\theChapterCounter}\Tag
{#1|<hCh tag|>}{\:curch}}
-\def\RefCh#1{\Link{\LikeRef{#1|<hCh tag|>}}{}Chapter\ \Ref
+\def\RefCh#1{\Link{\LikeRef{#1|<hCh tag|>}}{}Chapter\ \XRef
{#1|<Ch tag|>}\EndLink}
\def\TagApp#1{\Tag{#1|<Ap tag|>}{\theChapterCounter}\Tag
{#1|<hAp tag|>}{\:curch}}
-\def\RefApp#1{\Link{\LikeRef{#1|<hAp tag|>}}{}Appendix\ \Ref
+\def\RefApp#1{\Link{\LikeRef{#1|<hAp tag|>}}{}Appendix\ \XRef
{#1|<Ap tag|>}\EndLink}
\def\TagSec#1{\Tag{#1|<Sec tag|>}{\theSectionCounter}\Tag
{#1|<hSec tag|>}{\:cursec}}
-\def\RefSec#1{\Link{\LikeRef{#1|<hSec tag|>}}{}Section\ \Ref
+\def\RefSec#1{\Link{\LikeRef{#1|<hSec tag|>}}{}Section\ \XRef
{#1|<Sec tag|>}\EndLink}
>>>
@@ -37144,12 +37155,12 @@ is not a font).
\<html TeX4ht divs\><<<
\def\TagPage#1{%
\Link{}{page#1}\EndLink\Tag{#1}{}}
-\def\RefPage#1{\Link{page#1}{}\Ref{#1}\EndLink}
+\def\RefPage#1{\Link{page#1}{}\XRef{#1}\EndLink}
>>>
\<non-html TeX4ht divs\><<<
\def\TagPage#1{\Tag{#1}{}}
-\def\RefPage{\Ref}
+\def\RefPage{\XRef}
>>>
%\SubSection{Standard}
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex
index e713134f7e3..34fa75425ae 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-sty.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-sty.tex 1514 2024-05-06 14:50:21Z michal_h21 $
+% $Id: tex4ht-sty.tex 1556 2024-09-23 10:50:11Z michal_h21 $
% tex tex4ht-sty or ht tex tex4ht-sty
%
% Copyright 2009-2022 TeX Users Group
@@ -2162,11 +2162,11 @@ Should be consistent with the corresponding features in ProTeX.
\SubSection{Ref}
-The implementations of \''\Ref' and \''\Tag' view the crosswords $\alpha$ as
+The implementations of \''\XRef' and \''\Tag' view the crosswords $\alpha$ as
pointers to macros that carry the names `\''\cw:'$\alpha$'.
\<common cross references\><<<
-\def\Ref#1{\expandafter\ifx
+\def\XRef#1{\expandafter\ifx
\csname |<tag of Tag|>#1\endcsname \relax \:NoTag{#1}%
\else \csname |<tag of Tag|>#1\endcsname \fi}
>>>
@@ -2186,7 +2186,7 @@ pointers to macros that carry the names `\''\cw:'$\alpha$'.
\SubSection{LikeRef}
The \`'\:LikeRef' command is a stripped down version of
-\`'\Ref'; it doesn't check whether the tag is defined.
+\`'\XRef'; it doesn't check whether the tag is defined.
The space in \`'\space' is needed for carrying MAME tags
in (mosaic) html files.
@@ -2272,7 +2272,7 @@ probably in latex.4ht.
\openin15=\jobname.xref
\ifeof15 \def\:NoTag#1{\hbox{$???$}}
\else \def\:NoTag#1{\hbox{$???$}
- \:warning{\string\Ref\string{\string#1\string}?}}
+ \:warning{\string\XRef\string{\string#1\string}?}}
|<warnings for missing /Link|>
\fi
\closein15
@@ -2312,11 +2312,11 @@ optional. A missing \`'.ext' stands for \`'.xref'. When \`'-[prefix]+'
is empty the component \`'{...}' should also be omitted (and the
comamnd assume the form \`'\LoadRef{filename.ext}').
-A \`'+' asks that \`'\Ref' and \`'LikeRef' commands will refer to
+A \`'+' asks that \`'\XRef' and \`'LikeRef' commands will refer to
expanded tags of the form \`'filename::tag' instead of just \`'tag'.
A \`'[prefix]' asks that only tags which start with the given prefix
will be loaded. When \`'[prefix]' is omitted, an empty prefix is
-assumed and all the tags are loaded. A \`'-' asks that \`'\Ref' and
+assumed and all the tags are loaded. A \`'-' asks that \`'\XRef' and
\`'LikeRef' commands will refer to truncated tags in which the
specified prefixes are omitted.
@@ -2920,7 +2920,7 @@ restricted environments (\`'\edef', \`'\write').
>>>
-\`'\def\RefFile#1{\Ref{#1|<File tag|>}}
+\`'\def\RefFile#1{\XRef{#1|<File tag|>}}
\def\LikeRefFile#1{\LikeRef{#1|<File tag|>}}'
\<html file commands\><<<
diff --git a/Master/texmf-dist/source/generic/tex4ht/wripro.tex b/Master/texmf-dist/source/generic/tex4ht/wripro.tex
index 30d0c025f28..4da6c4d3b64 100644
--- a/Master/texmf-dist/source/generic/tex4ht/wripro.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/wripro.tex
@@ -1,4 +1,4 @@
-% $Id: wripro.tex 414 2018-06-12 23:04:41Z karl $
+% $Id: wripro.tex 1556 2024-09-23 10:50:11Z michal_h21 $
% Used in tex4ht.sty. Not installed in runtime.
%
% Copyright (C)) 2009-2010 TeX Users Group
@@ -181,9 +181,9 @@ For instance, in {\tt
A \`'\Link-{..}{b}' asks that a \''\Tag' will not be produced for `b'.
-A \`'\Link[\empty]{b}{..}' asks that a \''\Ref' will not be produced for
+A \`'\Link[\empty]{b}{..}' asks that a \''\XRef' will not be produced for
`a'. The same is true for any other non-empty replacement to \''\empty'
-A `b' for which we neither have a \''\Tag' and a \''\Ref' provides
+A `b' for which we neither have a \''\Tag' and a \''\XRef' provides
a memory save in `strings out of', `string characters out of', and
`multiletter control sequences' (see log files).