TexSoup 0.3.3 throws an error when parsing this valid LaTeX document:
\pdfminorversion=7
\documentclass{article}
\usepackage{tikz}
\usepackage{circuitikz}
\usetikzlibrary{math}
\begin{document}
\begin{figure}
\begin{circuitikz}[european,scale=1]
\tikzmath{\label = 1;}
\node[muxdemux] (north) at (3,3) {\label};
\end{circuitikz}
\end{figure}
\end{document}
The error disappears if i replace \label with some normal text.
The command i used to parse:
from pathlib import Path
from TexSoup import TexSoup
main_tex = Path("main.tex")
soup = TexSoup((s := main_tex.read_text(encoding="utf8")))
The error:
TypeError: [Line: 0, Offset 484] Malformed argument. First and last elements must match a valid argument format. In this case, TexSoup could not find matching punctuation for: {.
Just finished parsing: ['{', TexCmd('label', [BraceGroup('}')]), ';\n\t\n', TexCmd('end', [BraceGroup('circuitikz')]), '\n', TexCmd('end', [BraceGroup('figure')]), '\n', '\n', '\n\t', '\n', TexCmd('end', [BraceGroup('document')]), '\n', '\n', '\n']
Environment:
TexSoup 0.3.3
Python 3.14.5
Linux
TexSoup 0.3.3 throws an error when parsing this valid LaTeX document:
The error disappears if i replace
\labelwith some normal text.The command i used to parse:
The error:
Environment:
TexSoup 0.3.3
Python 3.14.5
Linux