From 3b961a61ef9fb89adf20a89550d5de0bfe135448 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 20 Oct 2022 03:04:26 +0000 Subject: CTAN sync 202210200304 --- support/TeX4ht/source/ChangeLog | 6 ++++++ support/TeX4ht/source/tex4ht-html4.tex | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'support/TeX4ht') diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index f291004937..b88a67a074 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,9 @@ +2022-10-19 Michal Hoftich + + * tex4ht-html4.tex (html4-math.4ht): calculate vertical alignment + for inline math. + https://tex.stackexchange.com/a/662257/2891 + 2022-10-17 Michal Hoftich * tex4ht-4ht.tex (latex.4ht): declare \Configure{MathJaxSource} as diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index 145cb1ae28..d72179ac89 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -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 @@ The above should be sensitive to cases like the following one. \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. +\<<< +\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 +>>> %%%%%%%%%%%%%%%%%% -- cgit v1.2.3