[tex4ht-commits] [SCM] tex4ht updated: r1217 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Wed Oct 19 13:53:27 CEST 2022
Author: michal_h21
Date: 2022-10-19 11:53:26 +0000 (Wed, 19 Oct 2022)
New Revision: 1217
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-html4.tex
Log:
calculate vertical alignment for inline math
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2022-10-17 15:18:30 UTC (rev 1216)
+++ trunk/lit/ChangeLog 2022-10-19 11:53:26 UTC (rev 1217)
@@ -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/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex 2022-10-17 15:18:30 UTC (rev 1216)
+++ trunk/lit/tex4ht-html4.tex 2022-10-19 11:53:26 UTC (rev 1217)
@@ -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} * 100}\%
+}}\box0}
+{}
+{ class="math" }
+\ExplSyntaxOff
+>>>
%%%%%%%%%%%%%%%%%%
More information about the tex4ht-commits
mailing list.