Closed nschloe closed 1 year ago
Okay, I've gotten to
new_node = LatexMacroNode(
macroname="textit",
nodeargd=ParsedMacroArgs(
argspec="{",
argnlist=node.nodelist[1:],
),
)
nodelist_to_latex
will print
\textitipsum dolor
so there are {}
missing. Not sure if I need to add delimiters
or instead of node.nodelist[1:]
somehow provide a LatexGroupNode
.
I think I got it:
new_node = LatexMacroNode(
macroname="textit",
nodeargd=ParsedMacroArgs(
argspec="{",
argnlist=[LatexGroupNode(nodelist=node.nodelist[1:])],
),
)
I'm trying to change
to
with pylatexenc. To this end, I need create a
LatexMacroNode
from aLatexGroupNode
. I triedbut this fails with
I'n not sure how to properly instantiate
LatexMacroNode