TexSoup icon indicating copy to clipboard operation
TexSoup copied to clipboard

$ in specific TeX contexts causes problems

Open mdeeg opened this issue 5 years ago • 2 comments
trafficstars

When parsing URLs containing a $ using the verbatim command \url from the url package TexSoup terminates with an EOFError.

Minimal example:

from TexSoup import TexSoup
soup = TexSoup(r"\url{https://test.lab/test?var=test$}")

Is there an easy way to tell TexSoup how to handle such TeX code or simply ignore specific commands completely?

mdeeg avatar Nov 16 '20 17:11 mdeeg

@mdeeg Oh huh, I didn't realize specific commands could be treated as verbatim.

There isn't a way to tell TexSoup to ignore commands ... yet -- I can followup here when that's added.

alvinwan avatar Nov 20 '20 00:11 alvinwan

I think I just hit the "same" issue with the following tex input:

\begin{subblock}
  \begin{lstlisting}
    $
  \end{lstlisting}
\end{subblock}

(resulting in an EOF error as well)

lmm-git avatar Feb 16 '22 14:02 lmm-git