When reading a temporary file, I get an error when switching to french (comment/uncomment documentclass):
Runaway argument?
testcolor;testtext \\\textbf {\ChangesIncolor \ -- \ChangesIntext }\fi \ETC.
! Paragraph ended before \changeschopline was complete.
I am assuming, french language uses the ;
differently, thus the error, but I am not sure and I don't know how to fix the problem.
Thanks for your knowledge.
MWE:
\begin{filecontents*}{\jobname.soc}
testcolor;testtext
\end{filecontents*}
% \documentclass[english]{article}
\documentclass[french]{article} % error reading file
\usepackage{babel}
\def\changeschopline#1;#2 \\{%
\def\ChangesIncolor{#1}%
\def\ChangesIntext{#2}%
}
\newcommand{\listofchanges}{
\newread\ChangesInFile%
\openin\ChangesInFile = \jobname.soc%
\loop\unless\ifeof\ChangesInFile%
\read\ChangesInFile to \ChangesLine%
\ifeof\ChangesInFile\else%
\expandafter\changeschopline\ChangesLine\\%
\textbf{\ChangesIncolor\ -- \ChangesIntext}%
\fi%
\repeat
\closein\ChangesInFile%
}
\begin{document}
\listofchanges
\end{document}
Disclaimer: I am using this for the changes package, see issue and test files here: