bugtex4ht - Bugs: bug #424, inline math alignment problem in...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #424: inline math alignment problem in svg mode when using tex4ht

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Fri May 24 15:01:22 2019  
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri Oct 6 09:20:43 2023, comment #1:

I found a solution for the vertical alignment of inline math some time ago. The details are described in this answer on TeX.sx: https://tex.stackexchange.com/a/662257/2891

So today, when you use the "pic-m" option, you should get a correct alignment.

Michal Hoftich <michal_h21>
Project Member
Fri May 24 15:01:22 2019, original submission:

This looks like a hard problem. But I thought to make entry here to keep track of it and not forget it.

From https://tex.stackexchange.com/questions/492374/how-to-fix-inline-math-alignment-in-svg-mode-when-using-tex4ht

When using svg for math with tex4ht, the inline math in some places does not come out as well aligned with the text around it. This does not affect mathjax mode.



%This below is needed for tex4ht, without, inline math does not
%even render well at all
\ifx\HCode\undefined \else

But $\ln x=\frac{s}{\pi}\ln b$, hence $x=e^{s\frac{\ln b}{\pi}}$, and the
above becomes

\ln x&=\frac{s}{\pi}\ln b


Command (all on one line)

make4ht -ulm default -f html5+dvisvgm_hashes foo.tex
"htm,pic-align,notoc*,p-width,charset=utf-8,svg" "-cmozhtf -utf8"

The inline math that shows up is not well align on same baseline as text. More examples at above link.

TL 2019 on linux


Nasser M. Abbasi <nma123>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Oct 6 09:20:43 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup+gray