Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass[a4paper,12pt]{article}
\usepackage[dutch]{babel} % Quotes won't work without babel
\usepackage[utf8]{inputenc}  % This is very important!
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\usepackage{tabularx}

\newcolumntype{Y}{>{\raggedright}X}

\begin{document}
\begin{tabularx}{\linewidth}{|Y|Y|}\hline
\multicolumn{}{}{Some Text.}
More Text and some Items below:
\begin{itemize}
\item Item1
\item Item2
\item Item3
\item Item4
\item Item5
\item Item6
\item Item7
\end{itemize}
& \begin{center} \resizebox{10cm}{!}{\includegraphics{pic.png}}\\ \textit{Picture Description} \end{center}
\tabularnewline \hline
\end{tabularx}
\end{document}

Error message is:

Missing number, treated as zero.
<to be read again> 
\relax 
l.26 \end{tabularx}

Can somebody solve this, please?

share|improve this question
1  
Considering that this is a simple syntax error with no connection to the question title, I'd advise to either formulate the question in a more general way or close this as too localized. –  Stephan Lehmke Nov 20 '12 at 10:41
    
Ok - the question can be reopened after it's edited if desirable. –  Stefan Kottwitz Nov 20 '12 at 11:41
add comment

closed as too localized by Martin Schröder, Stephan Lehmke, egreg, Stefan Kottwitz Nov 20 '12 at 11:41

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 7 down vote accepted
\multicolumn{}{}{Some Text.}

is certainly wrong. Please look into the manual to find out how to use it.

I don't know what you're trying to achieve, but if I use

\multicolumn{2}{c}{Some Text.}\\

your example compiles for me.

Error analysis

To make this at least marginally interesting to future users, here's a short explanation on how to find out about the error.

By setting

\errorcontextlines 10000

in the preamble, you get a lot more error context in the log.

With LaTeX, the default setting almost never gives a useable explanation...

Then, you will get the following in the log file:

! Missing number, treated as zero.
<to be read again> 
                   \relax 
\@multispan #1->\@multicnt #1\relax 
                                    \loop \ifnum \@multicnt >\@ne \sp@n \rep...

\multicolumn #1#2#3->\multispan {#1}
                                    \begingroup \def \@addamp {\if@firstamp ...
<inserted text> ...e \multicolumn {}{}{Some Text.}
                                                   More Text and some Items ...

Note that the order is "from inner to outer", that is, the first (non-indented) line is the point where the error actually occurred. The line after that (indented) is the part of that line which isn't yet processed, so the point of error is exactly at the line break:

\@multispan #1->\@multicnt #1\relax 
                                    \loop \ifnum \@multicnt >\@ne \sp@n \rep...

The next "split line" gives, again at the split, the command from where this was called:

\multicolumn #1#2#3->\multispan {#1}
                                    \begingroup \def \@addamp {\if@firstamp ...

The story told by this:

  1. \multicolumn calls \multispan on its first argument.
  2. \multispan in turn tries to assign its argument to a count register.

So still a bit of detective's work is needed, but in the end it's clear that the first argument of \multicolumn should not be empty, and you know where to look for the error.

share|improve this answer
    
Thanks for help, it compiles now. –  dima Nov 20 '12 at 10:38
add comment

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