0

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}
2
  • 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, 2013 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, 2013 at 17:01

1 Answer 1

1

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.

2
  • my text is to long for a single line how can i tell $\LaTeX$ to break it inside a multicolumn? Feb 15, 2013 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.
    – user10274
    Feb 15, 2013 at 21:18

You must log in to answer this question.

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