You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def_format_document(self, preamble):
"""Return a formatted LaTeX document with the specified formula embedded."""opening, closing=None, Noneifself.__maths_env:
opening='\\begin{%s}'%self.__maths_envclosing='\\end{%s}'%self.__maths_envelse:
# determine characters with which to surround the formulaopening='\\['ifself.__displaymathelse'\\('closing='\\]'ifself.__displaymathelse'\\)'
Probably there is planned some detection of mathenvs (set_latex_environment), but the function is not used still.
May be for displaymath node just check that the node text starting with \begin{ and then not wrap such nodes with anything? (without detecting name of the environment)
If this OK, I can patch it...
The text was updated successfully, but these errors were encountered:
Very helpful indeed.
I don't have the time ATM to dig deeper in the code, but it looks indeed
unfortunate. If you would have the time to look into it, I would appreciate
it.
Thanks!
Consider following case — math environment in markdown math mode
$$
:VSCode preview / KaTeX works OK with it (see screenshot).
In pandoc JSON we have
Unfortunately, GladTeX nest all this in "[" "]" (and latex compilation failed, because "Erroneous nesting of equation structures"`)
Probably there is planned some detection of mathenvs (
set_latex_environment
), but the function is not used still.May be for displaymath node just check that the node text starting with
\begin{
and then not wrap such nodes with anything? (without detecting name of the environment)If this OK, I can patch it...
The text was updated successfully, but these errors were encountered: