phfaist / pylatexenc

Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion
https://pylatexenc.readthedocs.io
MIT License
301 stars 37 forks source link

nodelist_to_latex() doesn't respect node.environmentname #81

Closed nschloe closed 2 years ago

nschloe commented 2 years ago

MWE:

from pylatexenc.latexwalker import LatexEnvironmentNode, nodelist_to_latex

node = LatexEnvironmentNode("myenv", [])
# set the name to something else
node.environmentname = "something"

print(nodelist_to_latex([node]))
\begin{myenv}\end{myenv}
phfaist commented 2 years ago

Please avoid nodelist_to_latex(). (Note that it is not document as part of the public API.) See #89 for more info.