I want to blend a LaTeX document. I thought I would use the pylatexenc package to parse the document, then run through the input structure blend the existing text and output the resulting structure. Is there an example program that I can derive the rest from for my own? I tried it, but had difficulty making changes to the content of the individual elements, almost as if they were deepcopies.
I tried this,
walker = LatexWalker(input)
nodelist, pos, len = walker.get_latex_nodes()
...
for node in nodelist:
process_node(node)
...
for node in nodelist:
output.write(node.latex_verbatim())
but had difficulty making changes to the content of the individual elements, almost as if they were deepcopies. Output was the same as input 🙁
You need to sign in to view this answers
Leave feedback about this