1

I have a longtable environment and want pagebreaks only after certain rows which can be achieved putting * at the end of the rows that must not be broken (see this post).

This does work as long as the babel package option is not set to ngerman (or german). Somehow ngerman option seems to prevent the asterisks from working as intended. Setting option english does not influence the behavior of *.

MWE:

\documentclass[a4paper, 11pt]{scrartcl}
\usepackage[ngerman]{babel} % page breaking does not work
% \usepackage[english]{babel} %  page breaking does work
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{lipsum}

\begin{document}

\begingroup\small
\begin{longtable}{p{6cm}lp{6cm}}
\caption{longtable page breaks} \\
\toprule
\endfirsthead
\endhead
\midrule
\multicolumn{3}{c}{\footnotesize Continued on next page... / Fortsetzung nächste Seite}
\endfoot
\endlastfoot

\lipsum[66] & 1 & \lipsum[75] \\ * 
shorter text & 2 & shorter text \\ * 
shorter text & 3 & shorter text \\ * 
shorter text & 4 & shorter text \\ * 
shorter text & 5 & shorter text \\ % page break allowed
\lipsum[6] & 6 & \lipsum[6] \\ * 
shorter text & 7 & shorter text \\ * 
shorter text & 8 & shorter text \\ * 
shorter text & 9 & shorter text \\ * 
shorter text & 10 & shorter text \\ % page break allowed
\lipsum[75] & 6 & \lipsum[66] \\ *
shorter text & 12 & shorter text \\ *  
shorter text & 13 & shorter text \\ *
shorter text & 14 & shorter text \\ *
shorter text & 15 & shorter text \\ % page break allowed
\end{longtable}
\endgroup

\end{document}

Does anybody know a solution how to use \usepackage[ngerman]{babel} and have the page breaks after the intended rows?

closed as unclear what you're asking by egreg, Joseph Wright Oct 1 '16 at 21:34

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I don't see any problem when I run your example, it all fits on to one page, so no page breaking happens so whether or not page breaking is allowed after \\ does not play a part? – David Carlisle May 31 '16 at 10:29
  • 1
    If you want to force a page break then as in normal text \\\pagebreak – David Carlisle May 31 '16 at 10:30
  • 2
    I get a page break if I add a few lines. The english \lipsum text produce more lines in your example and so breaks earlier. – Ulrike Fischer May 31 '16 at 10:36
  • Ulrike, you are right. My example is thus lapsed. I have the problem in a larger file but I could not reproduce the error now. Davids proposal \pagebreak did help though. Should I delete the question? – jmjr May 31 '16 at 12:06
  • @jmjr With \documentclass[a5paper, 12pt]{scrartcl}, I get pagebreaks after lines 5 and 10, both with English and German … – Andreas May 31 '16 at 12:36