7

! 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

4
  • 1
    Why do you have quotes around your lengths?
    – Au101
    Commented Jun 8, 2016 at 2:26
  • Without quotes around the lengths, it also gives the same error @Au101 Commented Jun 8, 2016 at 2:28
  • 4
    Have you loaded the array package (\usepackage{array})? In any case, quotes around the lengths is definitely wrong
    – Au101
    Commented Jun 8, 2016 at 2:31
  • 3
    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
    Commented Jun 8, 2016 at 2:45

1 Answer 1

11

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.

3
  • Without quotes around the lengths, it also gives the same error @Mico Commented Jun 8, 2016 at 2:29
  • 1
    @AnimeshKumarPaul What packages are you using? The m column is unknown in base configuration.
    – Kola B.
    Commented Jun 8, 2016 at 2:32
  • 2
    @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
    Commented Jun 8, 2016 at 2:34

You must log in to answer this question.

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