Closed retorquere closed 7 months ago
I think this is the wrong approach, actually. It appears \url
does not take a verbatim argument. Go ahead and run:
\documentclass{article}
\usepackage{hyperref}
\newcommand{\foo}{FOO}
\begin{document}
\foo
\url{hi~there\foo}
\end{document}
and observe that \foo
gets expanded.
You're right... but then I don't know what kind of environment they are, because \url{#}
compiles without an error to show an #
.
\url
redefines the control codes of several characters so they parse as regular strings. But, I don't understand the issue. You shouldn't be getting any errors when parsing with unified-latex
.
I'm still working my way through understanding how unified-latex hangs together, sorry -- I opened this issue based on my reading of the code, and I didn't test properly.
\url
redefines the control codes of several characters so they parse as regular strings
But this should then still be accomodated. How do I go about this?
If you want the URL as a string, you can call toString(...)
on the argument.
Where? The
unified-latex-util-pegjs
package doesn't seem to have any tests.