TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following code:


 \paragraph*{Woche vom #1 bis #2}~\nopagebreak

  28.11. & Was ich alles an dem ersten Tag dieser Woche getan habe! \\
  29.11. & Der zweite Tag wa recht lang. \\
  30.11. & Nur Doku geschrieben \\
  01.12. & Ich freie mich schon auf's Wochenende, aber noch sind wir nicht soweit. Ich muss noch ganze zwei Tage runterreißen. \\
  02.12. & Letzter Tag! Endlich! \\

Now if I compile the file using pdfLaTeX I get two pages. On the first there is the heading Woche 2 bis 3 and on the second there is the table. The vspace is just to simulate some other text or things. How can I modify the environment to get it running?

share|improve this question
Put a \par after the \endtabularx command. (It looks as if the grouping introduced by your environment confuses the page breaking). – Ulrike Fischer Feb 13 '12 at 16:30
up vote 3 down vote accepted

The usual setting for \paragraph is that it typesets an inline heading. Change it as to be like \section, for example with the titlesec package:


 \paragraph*{Woche vom #1 bis #2}

Adjust the spacing to suit your needs.

Alternatively, put the heading inside the tabularx and forget about \paragraph:

 \multicolumn{2}{@{}l@{}}{\bfseries Woche vom #1 bis #2}\\[1.5ex]

This seems to be the cleanest solution.

share|improve this answer

Do you always want a line break after the heading? After a display heading LaTex goes to some trouble to prevent a page break, and will, as you wish, pull the entire heading on to the next page, you get that effect if you changed your code to say

 \section*{Woche vom #1 bis #2}


Instead of using paragraph*.

So simplest is to define \paragraph* to be a display heading rather than run-in. If you want most paragraphs to have a run-in heading unless the next thing is a big item like a table, then @ulrike-fischer's comment (which I just noticed) is probably your answer.

share|improve this answer
I don't know if my comment is really the answer. In this case it works (and it was quite interesting to see that the grouping has this effect) but TeX can be quite stubborn and insert a page break at ` \\ ` regardless of \nobreaks or \nopagebreaks or * used to prevent it. So I think your and Enrico's suggestion to use a real display heading command is the real answer. – Ulrike Fischer Feb 14 '12 at 8:54

The \vspace*{16cm} is forcing the table to the next page. Test it with 1cm and then adjust to taste!

share|improve this answer
I want BOTH the heading and the table on the second page. It's because there are severat such environments after each other and one of those environments gets "broken". The vspace just simulates the other things on the first page. – Christian Wolf Feb 13 '12 at 17:02

Your Answer


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.