I have a file called _runs.ini. Depending on its content, the document is compiled differently. I tried to read the content and executed a \ifthenelse-command without success.
Here's my MWE:
\documentclass{book}
\usepackage{ifthen}
\newcommand\getrun{%
\newread\tmp
\openin\tmp=_runs.ini
\read\tmp to \pruns
\def\ppruns{\numexpr \pruns\relax}
\closein\tmp
}
\newcommand\startrun{%
\ifthenelse{\equal{\ppruns}{0}}
{true}{false}
}
\begin{document}
\getrun
\startrun
\end{document}
The content of _runs.ini is 0 but obvisously the \equal-command does not recognize it as 0.
What am I doing wrong?
\newcommandis unknown in plain TeX. – wipet Oct 01 '14 at 12:40\newcommandis plain TeX, obviously not the\newcommanditself. – Astrinus Oct 01 '14 at 12:41