diff options
author | Norbert Preining <norbert@preining.info> | 2022-10-20 03:04:26 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-10-20 03:04:26 +0000 |
commit | 3b961a61ef9fb89adf20a89550d5de0bfe135448 (patch) | |
tree | e36f997e624c704dbb4ed2b5fdbd02835ea3c133 /support/TeX4ht | |
parent | 7b6cdf4c23e6ed232601dabc70f5553a8dee9c9b (diff) |
CTAN sync 202210200304
Diffstat (limited to 'support/TeX4ht')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 6 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-html4.tex | 17 |
2 files changed, 22 insertions, 1 deletions
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 <michal.h21@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@gmail.com> * 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. +\<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 +>>> %%%%%%%%%%%%%%%%%% |