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.

I have the springer svjour3 template and the user guide says that for tables the usual Latex 2e commands are used.

Now, I would like to produce a table that goes over the whole page (the error is the same, no matter whether I choose the one or the two column setup) with three columns of 6cm width. Inside the cells the text should be line broken automatically.

% For tables use
\begin{table*}
% table caption is above the table
\caption{Please write your table caption here}
\label{tab:1}       % Give a unique label
% For LaTeX tables use
\begin{tabular}{ p{5 cm} l p{5 cm} l p{5 cm} }
\hline\noalign{\smallskip}
first & second & third  \\
\noalign{\smallskip}\hline\noalign{\smallskip}
number & Some very very long text. And even more longer text in this column. & number \\
number & number & Some very very long text. And even more longer text in this column. \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table*}

The problem is that no matter how I manipulate the arguments to the tabular commands, I can produce the desired 5cm for one column only, the rest would ignore it and just get as long as it gets and run out of the pdf page. What could cause this?

share|improve this question

1 Answer 1

Your l column specification is causing this: p{5cm} will fix the width of that column to 5cm and break the lines as expected. However, l, r and c columns do not break.

You may be interested in using the tabularx package's tabularx environment rather. It provides an X column specification that breaks (like p{<len>}), but spreads out to fill some pre-specified width. The usage resembles

\begin{tabularx}{\linewidth}{p{5cm}Xp{5cm}}
  % Your tabular stuff here
\end{tabularx}

In the above code snippet, the table will be \linewidth wide, with the X-column filling up whatever is left of \linewidth-10cm (and some column spacing).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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