maranget / hevea

Hevea is a fast latex to html translator
http://hevea.inria.fr
Other
97 stars 12 forks source link

Fractured multi-line symbols in displaymath #27

Closed cspiel closed 4 years ago

cspiel commented 4 years ago

Hevea constructs multi-line symbols (e.g. automatically-sized parenthesis) in display math mode out of several glyphs. Sometimes the pieces do not meet exactly, but leave minute gaps, which are visually destracting.

After some experiments I have discovered that these gaps persist even with

line-height: default;

Reducing the line-height to an ad-hoc value of 1.1 "defragments" all multi-line symbols in my tests. The actual value may still be too high, but I would like to suggest the following patch anyhow.

--- a/html/hevea.hva
+++ b/html/hevea.hva
@@ -587,7 +587,7 @@
 %%Style of display
 \def\@orange{\@print{#}FF8000}
 \def\@magenta{fuchsia}
-\def\@dtstyle{border-collapse:separate;border-spacing:\@barsz;width:auto;}
+\def\@dtstyle{border-collapse:separate;border-spacing:\@barsz;line-height:1.1;width:auto;}
 \def\@dcstyle{white-space:nowrap;padding:0px;}%;width:auto;}
 \newstyle{.vdisplay}{\@dtstyle{} empty-cells:show; border:2px solid red;}
 \newstyle{.vdcell}{\@dcstyle{} border:2px solid green;}
maranget commented 4 years ago

Certainly an improvement, would you submit a PR (to get proper credit the normal way) or let me commit your change?

cspiel commented 4 years ago

Please check in -- a PR seems to bloated.

maranget commented 4 years ago

Just done. Thanks