ho-tex / oberdiek

Updating the oberdiek bundle
Other
16 stars 6 forks source link

Traverse disc nodes in luacolor #66

Closed zauguin closed 5 years ago

zauguin commented 5 years ago

Especially when a discretionary is given explicitly or contains ligatures, the inner list might have a different color attribute than the disc node. So traverse the replace element like any other nested list instead of treating a disc as an atomic colored object.

We only have to look at replace because if TeX actually breaks the line at the disc and .pre/.post is used, TeX moves the lists out of the discretionary. After that the discretionary node only contains empty sublists, so there is no need for special handling.

See https://tex.stackexchange.com/questions/493104/how-to-change-color-inside-discretionary-with-luacolor for an example where the problem occured.