5

! LaTeX Error: Illegal character in array arg.

\begin{center}
\begin{tabular}{ | m{'1cm'} | m{'1cm'}| m{'1cm'} | } 
\hline
cell1 dummy text dummy text dummy text& cell2 & cell3 \\ 
\hline
cell1 dummy text dummy text dummy text & cell5 & cell6 \\ 
\hline
cell7 & cell8 & cell9 \\ 
\hline
\end{tabular}
\end{center}

I got the error for it. Any hint for me please ? Thank you

  • 1
    Why do you have quotes around your lengths? – Au101 Jun 8 '16 at 2:26
  • Without quotes around the lengths, it also gives the same error @Au101 – Animesh Kumar Paul Jun 8 '16 at 2:28
  • 4
    Have you loaded the array package (\usepackage{array})? In any case, quotes around the lengths is definitely wrong – Au101 Jun 8 '16 at 2:31
  • 2
    Just a little additional advice for next time. Always include a full Minimal Working Example (MWE) which should be compilable as-is and include a preamble. As we saw here, one of the problems seems to have been in the preamble. Second, it's a little unsporting to change the question as we go along, it makes good answers redundant, moves the goalposts, and can be confusing to future users. By all means edit the question as needed, but don't correct errors as the community solves them – Au101 Jun 8 '16 at 2:45
7

Remove the ' (single-quote) characters from the arguments of the m column type:

\begin{tabular}{ | m{1cm} | m{1cm}| m{1cm} | }

Addendum: It is assumed that you're loading the array package or a package (such as tabularx) that loads the array package. The array package defines the m column type.

  • Without quotes around the lengths, it also gives the same error @Mico – Animesh Kumar Paul Jun 8 '16 at 2:29
  • 1
    @AnimeshKumarPaul What packages are you using? The m column is unknown in base configuration. – Kola B. Jun 8 '16 at 2:32
  • @AnimeshKumarPaul - Since you're using the m column type, I was assuming that you are loading the array package or, alternatively, a package such as tabularx that loads the array package. Is this assumption unwarranted? – Mico Jun 8 '16 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.