This table environment mymulticolumn has three arguments, the first of which sets an optional \arraystretch, the second of which sets the "apparent" number of columns (either 2 or 3), and the last of which sets the width of certain columns. The code generates the error indicated in the title of my question, which in turn prompts my question: why?



%column specifications

{ {@{} x @{\cs} p{#3} x @{\cs} l} }
{ {@{} x @{\cs} p{#3} x @{\cs} p{#3} x @{\cs} l} } }%


1. & $f(x)=x^2$ & 
2. & $f(x)=\sqrt{x}$ \\
3. & $f(x)=\ln x$ &
4. & $f(x)=\tan x$


1 Answer 1


It can't work for several reason, the main one being that just \ifthenelse becomes the argument to \begin{tabular}. The second reason is that with array the argument to \begin{tabular} is not expanded, the third is that even if expansion was peformed, it wouldn't work, because \ifthenelse is not “fully expandable”.

Put the \ifthenelse outside:

     \begin{tabular}{@{} x @{\cs} p{#3} x @{\cs} l}%
     \begin{tabular}{@{} x @{\cs} p{#3} x @{\cs} p{#3} x @{\cs} l}%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .