Katex: Enable tall items in makeVList

Created on 29 Jun 2017  路  5Comments  路  Source: KaTeX/KaTeX

KaTeX's makeVList function has trouble with tall items. Given, say, a tall image, it will locate the top of the image no higher than the top of the text line box created by the fontSizeEnsurer. This location will be in conflict with the height and depth passed to makeVList if the tall item is taller than maxFontSize.

Work-arounds tried so far include: (1) passing a large value of maxFontSize to makeVList, as in PR #744, and (2) trying a hand-written adjustment to the tall item's location, as in the \fbox part of PR #670.

(1) can push the line downward and create large gaps above the math.

(2) will not work properly if there is a font size change inside the \fbox.

A more general solution would be helpful.

Most helpful comment

@ronkok Personally I'm OK with a buggy \boxed as long as it works in many useful cases. Many existing features have bugs in some cases -- that shouldn't stop us from releasing them.

All 5 comments

Question for @kevinbarabash or @xymostech: I am inclined to write a PR that withdraws \boxed until I can write a bug-free version or until somebody can make makeVList more robust. \boxed is not that urgent and I would hate to see a bug in \boxed be something that would delay the next KaTeX release.

What do you think of a temporary removal of \boxed?

@ronkok Personally I'm OK with a buggy \boxed as long as it works in many useful cases. Many existing features have bugs in some cases -- that shouldn't stop us from releasing them.

@ronkok I'm okay with releasing \boxed in its current state, but if there are known issues with a new feature we should include those issues in the release notes.

Nooooooo. vertical alignment bugs strike again. +1 to what @edemaine said, having a feature with known limitations is probably better than no feature.

Fixed in #768

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jason-s picture jason-s  路  3Comments

msridhar picture msridhar  路  3Comments

mpolyak picture mpolyak  路  3Comments

janosh picture janosh  路  4Comments

OisinMoran picture OisinMoran  路  4Comments