svenkreiss / unicodeit

Converts LaTeX tags to unicode: \mathcal{H} → ℋ. Available on the web or as Automator script for the Mac.
https://www.unicodeit.net
Other
275 stars 35 forks source link

Handle commands like "\not\subset" #61

Closed cemulate closed 1 year ago

cemulate commented 1 year ago

LaTeX syntax like \not\subset will be rendered as \u0338\u2282, where \not gets directly replaced as the combining character \u0338 (combining long solidus overlay). However, to achieve the correct result, this combining character should come after the other character. \u0338 is listed in the combining characters list as \\slash, so the correct result can be achieved by either \slash{\subset} or \subset\not.

This change catches commands like \not\subset or \not\in and replaces them with \slash{\subset} and \slash{\in} so that the correct result is rendered.