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
The replace_with method tries to replace a child of 'somecommand' but we are dealing with an argument instead. The documentation does not mention this limitation.
In my use case I am parsing all newcommands, then replacing these commands with their values. I.e.
\newcommand{\test}{Just a test}
\stuff{\test}
Should be converted to
\newcommand{\test}{Just a test}
\stuff{Just a test}
In this case I do not know I am operating on an argument of a node instead of a child of this node. Is there a workaround?
Edit: my workaround is the following, but I am not sure what further implications this has (if any).
I had the same need of replacing inside the argument, and I ended up writing a loop to check for all args.contents and set the values manually. However please be aware of the subtle usage of setter/getter as described in #113
Gives
The
replace_with
method tries to replace a child of 'somecommand' but we are dealing with an argument instead. The documentation does not mention this limitation.In my use case I am parsing all
newcommand
s, then replacing these commands with their values. I.e.Should be converted to
In this case I do not know I am operating on an argument of a node instead of a child of this node. Is there a workaround?
Edit: my workaround is the following, but I am not sure what further implications this has (if any).
The text was updated successfully, but these errors were encountered: