Open gamboz opened 3 years ago
Thanks for reporting this. In LaTeX, the URL-related commands (like \href
, \url
, and \email
) parse their URL argument in a special fashion to deactivate any special characters (such as $
, _
or ^
). So to implement them in pylatexenc
requires a little more work to ensure that the URL argument is always parsed verbatim. I'm pretty busy at the moment but I'll try to find some time soon to implement them.
[ suggestion, please feel free to ignore :) ]
If you can change the parsing procedure based on the macro name, it might be a good idea also to ignore the second argument of \newcommand
s & co. As you know, these macro sometimes include the beginning or end of an environment, and the parser gets confused (as in \newcommand{\beq}{\begin{equation}}
).
Yes, I'm planning to improve the parsing of \newcommand
instructions, too :)
Yes, I'm planning to improve the parsing of
\newcommand
instructions, too :)
looking forward to this...
I think the spec for the macro
\href
might be missing from pylatexenc/latexwalker/_defaultspecs.py The following code gives error: it expects a node with two arguments, but gets a node with empty argnlist.