It's been a while since I asked an embarrassing question, and am pretty sure this is another one of those: This code below attempts to use \IfStrEqCase from the xstring package and results in:
Runaway argument?
{document} \par \par \par \documentclass {article} \usepackage {pgfpl\ETC.
! File ended while scanning use of \@xs@testcase.
for the case where none of the cases match, but I don't know why.
Notes:
- This is especially embarrassing as I answered What's the best/right way to test an argument to a macro? using
\IfStrEqCaseand that code works just fine. Hence, don't think it is a version issue.
Code:
\documentclass{article}
\usepackage{xstring}
%\newcommand{\CaseVar}{case A}% This works
%\newcommand{\CaseVar}{case B}% This works
\newcommand{\CaseVar}{case C}% This does NOT!!!
\begin{document}
\IfStrEqCase{\CaseVar}{%
{case A}{Found Case A}
{case B}{Found Case B}
}[Oppsss, unknown case '\CaseVar'.]
\end{document}
%after theCase bclosing}solves it, but why????? – Peter Grill Feb 20 '14 at 22:19