From 439b6e9f794a954368f6005f5a6e3cea3565282e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 20 Sep 2023 20:39:58 +0000 Subject: support \mathvariant, tex4ht r1371 git-svn-id: svn://tug.org/texlive/trunk@68329 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/tex4ht/ChangeLog | 5 ++++ .../source/generic/tex4ht/tex4ht-4ht.tex | 4 ++-- .../source/generic/tex4ht/tex4ht-mathml.tex | 27 +++++++++++++++++++++- .../tex/generic/tex4ht/hyperref-hooks.4ht | 6 ++--- Master/texmf-dist/tex/generic/tex4ht/mathml.4ht | 12 ++++++++-- .../texmf-dist/tex/generic/tex4ht/mkht-scripts.4ht | 6 ++--- 6 files changed, 49 insertions(+), 11 deletions(-) diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index f435205901b..9f496a5156b 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,8 @@ +2023-09-20 Michal Hoftich + + * tex4ht-mathml.tex (mathml.4ht): added support for the \mathvariant + command (thanks to Linas Stonys). + 2023-09-11 Michal Hoftich * tex4ht-html4.tex (html4.4ht): prevent duplicate TOC when the diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index c76a160f677..592bdcc444e 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 1368 2023-09-11 09:02:15Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1370 2023-09-17 15:00:53Z karl $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2023 TeX Users Group @@ -5629,7 +5629,7 @@ We can load nameref from the early hook file \<<< % hyperref-hooks.4ht (|version), generated from |jobname.tex -% Copyright 2022 TeX Users Group +% Copyright 2022-2023 TeX Users Group | \:AtEndOfPackage{% | diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex index 869396ddec0..9b6f23c04b9 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-mathml.tex 1366 2023-09-07 10:32:15Z michal_h21 $$ +% $Id: tex4ht-mathml.tex 1371 2023-09-20 12:19:50Z michal_h21 $$ % compile 3 times: latex tex4ht-mathltx % or xhlatex tex4ht-mathltx "html,3,sections+" % @@ -1843,7 +1843,32 @@ Used to be +Support for the \verb'\mathversion' command. Thanks to Linas Stonys +for the report and additional testing. +\<<< +| +>>> + +We can configure attributes that will be added to the \verb'' element +using \verb'\Configure{mathversion-style}' ideally, +use something like \verb'mathvariant="xxx"'. + +\<<< +\NewConfigure{mathversion-style}[2]{\expandafter\gdef\csname :mathversion-#1\endcsname{#2}} +% ToDo: Add support for other mathversions +\Configure{mathversion-style}{bold}{\a:mathml mathvariant="bold-italic"} +>>> + +Now we can append code to \verb'\mathversion'. +It will add the mathvariant tag to the \verb'' element. + +\<<< +\append:defI\mathversion{% + % \a:DviMathML is executed at the beginning of math \a:@math is hook for attributes. we need to append out tags to it + \Configure{DviMathML}{\append:def\a:@math{\expandafter\csname :mathversion-\math@version\endcsname}}{}% +} +>>> \<<< \Configure{afterSUB}{'}{\def\SUB:prime{\SUB:SUP}} diff --git a/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht b/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht index b3c7d96eb51..5684a03370b 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/hyperref-hooks.4ht @@ -1,5 +1,5 @@ -% hyperref-hooks.4ht (2023-09-11-14:37), generated from tex4ht-4ht.tex -% Copyright 2022 TeX Users Group +% hyperref-hooks.4ht (2023-09-17-08:01), generated from tex4ht-4ht.tex +% Copyright 2022-2023 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -16,7 +16,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2023-09-11-14:37} +\immediate\write-1{version 2023-09-17-08:01} \:AtEndOfPackage{% \@ifpackageloaded{nameref}{} diff --git a/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht b/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht index 5eb6f022f12..f32bd5fc17a 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht @@ -1,4 +1,4 @@ -% mathml.4ht (2023-09-07-13:26), generated from tex4ht-mathml.tex +% mathml.4ht (2023-09-20-13:25), generated from tex4ht-mathml.tex % Copyright 2009-2023 TeX Users Group % Copyright 1999-2009 Eitan M. Gurari % @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2023-09-07-13:26} +\immediate\write-1{version 2023-09-20-13:25} \exit:ifnot{Preamble,% accents,% @@ -1697,6 +1697,14 @@ accent="true">&\#x0332;}% font-style: normal; } } +\NewConfigure{mathversion-style}[2]{\expandafter\gdef\csname :mathversion-#1\endcsname{#2}} +% ToDo: Add support for other mathversions +\Configure{mathversion-style}{bold}{\a:mathml mathvariant="bold-italic"} +\append:defI\mathversion{% + % \a:DviMathML is executed at the beginning of math \a:@math is hook for attributes. we need to append out tags to it + \Configure{DviMathML}{\append:def\a:@math{\expandafter\csname :mathversion-\math@version\endcsname}}{}% +} + \def\:tempd#1#2{% \expandafter\def\csname #1\endcsname{\mathchar"13#2\relax}% \MathSymbol\mathop{#1}% diff --git a/Master/texmf-dist/tex/generic/tex4ht/mkht-scripts.4ht b/Master/texmf-dist/tex/generic/tex4ht/mkht-scripts.4ht index 39f6f0ef190..b1f8845e875 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/mkht-scripts.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/mkht-scripts.4ht @@ -1,5 +1,5 @@ -% mkht-scripts.4ht (2023-08-27-00:00), generated from tex4ht-mkht.tex -% Copyright 2009-2020 TeX Users Group +% mkht-scripts.4ht (2023-09-10-08:49), generated from tex4ht-mkht.tex +% Copyright 2009-2023 TeX Users Group % Copyright 2000-2009 Eitan M. Gurari % % This work may be distributed and/or modified under the @@ -18,7 +18,7 @@ % If you modify this program, changing the % version identification would be appreciated. % -\immediate\write-1{version \ifx \JOBNAME\UnDefined 2023-08-27-00:00\else |version\fi} +\immediate\write-1{version \ifx \JOBNAME\UnDefined 2023-09-10-08:49\else |version\fi} \ifx \JOBNAME\UnDef -- cgit v1.2.3