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 want to make a long table (over all the page), at the moment i am using tabular for it, because everything in it is text.

How can i make a line with text in my tabular environment? It shall be for a recipe, between the ingredients there is sometime a text.

Right now i have something like

\documentclass{scrartcl}
\begin{document}
\[
\begin{tabular}{rl}
60 & ab\\
   & some text here \\
   & even more text\\
40 & bc \\
\end{tabular}
\]
\end{document} 

I would prefer a formatting like

\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{align*}
60 &\ ab
\intertext{some text and even more text here}
40 &\ bc\\
\end{align*}
\end{document}
share|improve this question
2  
Welcome to TeX.sx! Your question seems a bit vague -- please add a minimal working example (MWE) that shows what you have done so far. –  lockstep Feb 15 '13 at 16:46
1  
Try to sketch what you want in Excel for example, then put the image in your post, so people can help you :) –  leo Feb 15 '13 at 17:01
add comment

1 Answer 1

up vote 1 down vote accepted

Using \multicolumn and the array package, one way to achieve what you want is:

\documentclass{article}
\usepackage{array}

\begin{document}
\begin{tabular}{rl}
60 & ab\\  
\multicolumn{2}{p{1cm}}{some text and even more text here some text and even more text here some text and even more text here}\\
40 & bc
\end{tabular}
\end{document}

You can change the value 1cm to what works better to you.

share|improve this answer
    
my text is to long for a single line how can i tell $\LaTeX$ to break it inside a multicolumn? –  Dominic Michaelis Feb 15 '13 at 17:30
1  
@DominicMichaelis leo gave you the proper solution. His p@{1cm} creates a 1cm wide column that lets you typeset paragraphs with proper line breaking. If you need a wider column, just change the size. –  Marc van Dongen Feb 15 '13 at 21:18
add comment

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.