awth13 / org-appear

Toggle visibility of hidden Org mode element parts upon entering and leaving an element
MIT License
364 stars 19 forks source link

org-appear should ignore LaTeX block #28

Closed failable closed 2 years ago

failable commented 2 years ago

The asterisks in LaTeX block are hidden by org-appear.

\begin{eqnarray}
    \min_{q^{*}, p^{*}} \sum_{(u, i) \in K} (r_{ui} - q_{i}^{\top} p_{u})^{2}
\end{eqnarray}
awth13 commented 2 years ago

Thank you for opening the issue, @liebkne!

This seems to be Org mode fontification that does that -- you can check that by disabling org-appear and reverting the buffer with the example. org-appear does not (and cannot) register the *}, p^{* portion of the text as an emphasised element since everything inside a LaTeX fragment is considered latex-environment or latex-fragment, both of which org-appear always ignores.

EDIT: Tracing org-do-emphasis-faces -- which does not have any LaTeX-related checks in the source -- confirms that it is Org mode that is the culprit here.

failable commented 2 years ago

Ah, you're right. Sorry for disturbing.