I'm trying to write a custom environment, but I keep running into a strange error..

This is my setup



    {\bf Scenario name} & \multicolumn{1}{l}{Some scenario} \\

    body & \scenarioBODY \\

    {\bf Total} & {\bf 100 DKK} \\

It works with

        Some body

but not with

            \item Some body

What am I doing wrong?

  • \longtable{@{\extracolsep{\fill}}lp{3cm}@{}} rather then \longtable{@{\extracolsep{\fill}}ll@{}} – Salim Bou Sep 10 '16 at 17:18
  • Thanks; that worked. But why? – cholewa1992 Sep 10 '16 at 17:33
  • Don't use l column type to insert paragraph or list, instead you can use p{<width>} tables-wiki – Salim Bou Sep 10 '16 at 17:54
  • @cholewa1992 - Use \bseries intead of \bf, those old commands will cause errors, depending of the documentclass. Read the manual of the array package to learn about different kinds of columns (texdoc array) on the command line. The l-type throws an error, if there is a \par in the content, the p-type not. The enumerate env. and such end an item with a paragraph. – Keks Dose Sep 12 '16 at 11:59
  • Thanks @KeksDose. I managed to solve the problem; it was as you say due to the use of l-type instead of p-types. But also the latex compiler made i really hard to figure out that that was the error ;-) – cholewa1992 Sep 13 '16 at 17:45

From the comments: You can't insert paragraphs or lists in l columns. Use a p column instead, e.g.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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