foo?!-1+2. \} \\ $\left(\mathbf{\alpha + 1}^2_x y\right)$ bar $\beta^{12}$ $\bar p {}^foo$ $\bar \mathrm{t}$
'foo?!-1+2. } \\ (π+πΒ²βπ¦) bar π½ΒΉΒ² πΜαΆ ππ tΜ '
April 10, 2023
It is possible to transform a subset of LaTeX to Unicode, as demonstrated by unicodeit website. Unfortunately, unicodeit only works on short LaTeX strings.
Here, I write a simple parser with Lark to process more complex LaTeX strings. A more complete version of this prototype is available as unicodeitplus.
Lark is awesome, because it generates the parser from an EMBL string, is fast and lightweight.
Letβs see how well (or not) this works on a few examples.
foo?!-1+2. \} \\ $\left(\mathbf{\alpha + 1}^2_x y\right)$ bar $\beta^{12}$ $\bar p {}^foo$ $\bar \mathrm{t}$
'foo?!-1+2. } \\ (π+πΒ²βπ¦) bar π½ΒΉΒ² πΜαΆ ππ tΜ '
'π·**βββππ'
'π±π²π³+π'
'β1Μ
π΄Μ
πΜ
π Μ
πΌΜ
'
'π₯βπΒ²πΌβπΌΜ
πΎβ°βπβT'
'βπΜ
πΜ
πΜ
πΜ
'
'πβ/GeVπβ»ΒΉ'
'Search for resonant ttΜ
production in proton-proton collisions at βπ Μ
=13 TeV'