artisticat1 / obsidian-tikzjax

Render LaTeX and TikZ diagrams in your notes
MIT License
457 stars 27 forks source link

\Omega is not rendered #2

Closed zcysxy closed 2 years ago

zcysxy commented 2 years ago

A super weird bug 🤣: \Omega is not rendered. A minimal working example:

\begin{document}
\begin{tikzpicture}
\draw (0,0) node {$x\omega\Omega\Gamma$};
\end{tikzpicture}
\end{document}

The result is $x\omega\Gamma$, the $\Omega$ is missing 😂

artisticat1 commented 2 years ago

Weird! I'll try to look into this when I have time.

artisticat1 commented 2 years ago

Do you know whether this happens with any other symbols?

zcysxy commented 2 years ago

I tested common greek letters and math symbols, and found another one: \otimes.

Unlike wrong syntax or unsupported packages like \mathbb, which break the output image, \Omega and \otimes take up some space but are not rendered.

image
artisticat1 commented 2 years ago

Thanks, that was useful info!

It turns out that \Omega and \otimes were represented by the "soft hyphen" character in unicode, which is invisible. I came up with a hacky workaround where I patch the fonts and move the soft hyphen glyph to a different character.

This is now solved in 0.4.0.