Katex: Not equals in table row does not align correctly [pen included]

Created on 20 Sep 2019  路  4Comments  路  Source: KaTeX/KaTeX

https://codepen.io/HughGrovesArup/pen/OJLadYp

As can be seen when in a table row the / is misaligned.

image

bug

All 4 comments

The issue doesn't appear on https://katex.org/. My hunch is that codepen.io's CSS is affect ours somehow. I wasn't able to figure out what style was responsible though. :( Once we figure that out we should be able to guard against it. We should probably add a bunch of reset params to .katex in katex.less to reset all external styles.

The places where I have actually encountered the issue are in a VS code extension that utilises a webview (like an iframe) and inside a vue.js component.

The issue does not appear on katex.org - but is that just because it's not within tags? If I remove the tr / td from the codepen it renders as expected https://codepen.io/HughGrovesArup/pen/LYPMvxW

@HughGrovesArup: Removing the td and tr means the math block is removed from the table, so that's why it works.

I did some testing.

(1) Removing ALL of codepen's styles gave the following (with the second set of equations being in p tags, not in a table):
image

So that's not it.

(2) I then tried the code in various versions:

0.9.0 (not quite right since the neq is too far right, but at least looks OK)
image

0.10.0
image

0.10.2
image

So seems it's a KaTeX issue.

This is due to vlist using a table layout and border-collapse which affects it is set to separate in table tags. I've opened a PR. Thank you for reporting!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fabiospampinato picture fabiospampinato  路  4Comments

asmeurer picture asmeurer  路  3Comments

Joe312341 picture Joe312341  路  5Comments

hagenw picture hagenw  路  3Comments

pvnr0082t picture pvnr0082t  路  4Comments