New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect depth #89

Closed
baskerville opened this Issue Jul 14, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@baskerville

baskerville commented Jul 14, 2018

I've been using dvisvgm as part of a pandoc filter that replaces occurrences of $…$ by SVG images. Given a depth d, I'm computing the vertical align, in ems, as -d / f, where f is the default font size. It seems to work fine for most formulas. It however fails for the following TeX file (and a few others):

\documentclass[preview, border=1pt]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\begin{document}
$x\times y\cdot z$
\end{document}

I can produce an SVG file with:

latex formula.tex
dvisvgm -e -n formula.dvi

The output provides the following dimensions:

  width=35.091148pt, height=5.938885pt, depth=1.021115pt
  graphic size: 35.091148pt x 6.96pt (12.333128mm x 2.44616mm)

In the following graphic, the baseline computed from the above dimensions (at 1.02115/6.96 of the height) is drawn in red and the expected baseline is drawn in blue:

formula

I'm using dvisvgm 2.3.5.

@mgieseki

This comment has been minimized.

Show comment
Hide comment
@mgieseki

mgieseki Jul 15, 2018

Owner

Thanks for reporting this issue and the detailed description. I could reproduce the problem and already fixed the affected code. I'll commit the changes after a bit more testing.

Owner

mgieseki commented Jul 15, 2018

Thanks for reporting this issue and the detailed description. I could reproduce the problem and already fixed the affected code. I'll commit the changes after a bit more testing.

@mgieseki mgieseki self-assigned this Jul 15, 2018

@mgieseki mgieseki added the bug label Jul 15, 2018

@mgieseki mgieseki closed this in 081fd4f Jul 16, 2018

@mgieseki mgieseki added this to the 2.4.2 milestone Jul 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment