texlive[64758] Master/texmf-dist: vertical alignment for inline math,
commits+karl at tug.org
commits+karl at tug.org
Thu Oct 20 00:05:02 CEST 2022
Revision: 64758
http://tug.org/svn/texlive?view=revision&revision=64758
Author: karl
Date: 2022-10-20 00:05:02 +0200 (Thu, 20 Oct 2022)
Log Message:
-----------
vertical alignment for inline math, tex4ht r1217-1218
Revision Links:
--------------
http://tug.org/svn/texlive?view=revision&revision=1217
Modified Paths:
--------------
trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht
trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2022-10-19 21:43:14 UTC (rev 64757)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2022-10-19 22:05:02 UTC (rev 64758)
@@ -1,3 +1,9 @@
+2022-10-19 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-html4.tex (html4-math.4ht): calculate vertical alignment
+ for inline math.
+ https://tex.stackexchange.com/a/662257/2891
+
2022-10-17 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (latex.4ht): declare \Configure{MathJaxSource} as
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex 2022-10-19 21:43:14 UTC (rev 64757)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex 2022-10-19 22:05:02 UTC (rev 64758)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1203 2022-09-29 13:51:29Z michal_h21 $
+% $Id: tex4ht-html4.tex 1218 2022-10-19 12:57:24Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -6557,7 +6557,22 @@
\special{t4ht*=}%
>>>
+This version of PicMath tries to set the correct vertical alignment for inline math.
+It typessets the math inside a box, measures depth and height, calculates
+the alignment, and outputs it using CSS. It uses Expl3 features, so we need
+to use it in LaTeX configuration.
+\<configure html4 latex\><<<
+\ExplSyntaxOn
+\Configure{PicMath}
+{\setbox0=}
+{\Css{img[src="\PictureFile"]{%
+ vertical-align:-\fp_eval:n{ \dim_to_fp:n{\dp0}/(\dim_to_fp:n{\ht0}+\dim_to_fp:n{\dp0}) * 100}\%
+}}\box0}
+{}
+{ class="math" }
+\ExplSyntaxOff
+>>>
%%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht 2022-10-19 21:43:14 UTC (rev 64757)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht 2022-10-19 22:05:02 UTC (rev 64758)
@@ -1,4 +1,4 @@
-% html4-math.4ht (2022-08-29-13:30), generated from tex4ht-html4.tex
+% html4-math.4ht (2022-10-19-13:47), generated from tex4ht-html4.tex
% Copyright 2009-2022 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 2022-08-29-13:30}
+\immediate\write-1{version 2022-10-19-13:47}
\exit:ifnot{accents,%
amsfonts,%
@@ -468,6 +468,7 @@
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ConfigureHinput{amsmath}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -676,7 +677,6 @@
\endinput\empty\empty\empty\empty\empty\empty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1547,6 +1548,9 @@
+
+
+
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht 2022-10-19 21:43:14 UTC (rev 64757)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht 2022-10-19 22:05:02 UTC (rev 64758)
@@ -1,4 +1,4 @@
-% html4.4ht (2022-09-29-14:24), generated from tex4ht-html4.tex
+% html4.4ht (2022-10-19-13:47), generated from tex4ht-html4.tex
% Copyright 2009-2022 TeX Users Group
% Copyright 1997-2009 Eitan M. Gurari
%
@@ -17,7 +17,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2022-09-29-14:24}
+\immediate\write-1{version 2022-10-19-13:47}
\exit:ifnot{8859-6,%
CJK,%
@@ -1561,6 +1561,15 @@
\HCode{\the\tmp:toks}%
\special{t4ht*=}%
]{}\the\tmp:toks\EndPicture}
+\ExplSyntaxOn
+\Configure{PicMath}
+{\setbox0=}
+{\Css{img[src="\PictureFile"]{%
+ vertical-align:-\fp_eval:n{ \dim_to_fp:n{\dp0}/(\dim_to_fp:n{\ht0}+\dim_to_fp:n{\dp0}) * 100}\%
+}}\box0}
+{}
+{ class="math" }
+\ExplSyntaxOff
\Configure{pageref}
{\HCode{<span class="pageref">}}
{\HCode{</span>}}
@@ -40439,5 +40448,6 @@
+
\endinput
More information about the tex-live-commits
mailing list.