2

How to keep together the same numbers? The \nobreak does not work. Sorry, for my poor english :)

\documentclass[12pt,a5paper,landscape]{article}

\usepackage[utf8]{inputenc}
\usepackage[a5paper]{geometry}
\geometry{top=20mm, bottom=20mm, left=20mm, right=20mm}
\geometry{includemp=false}
\geometry{includehead=true,includefoot=true}
\geometry{layouthoffset=0mm, layoutvoffset=0mm}
\geometry{headsep=10pt}
\usepackage[T1]{fontenc}
\usepackage{cals}

\makeatletter

\begin{document}

\begin{calstable}
\colwidths{
{100pt}
{100pt}
{100pt}
}
\thead{
\brow
\alignC
\cell{head1}
\nullcell{ltb}
\nullcell{tbr}
\spancontent{head2}
\erow
}
\tfoot{
\hrule width 300pt height 0.4pt depth 0pt\relax
}

\brow
\cell{1}
\cell{111}
\cell{111}
\erow

\brow
\cell{2}
\cell{222}
\cell{222}
\erow

\brow
\cell{}
\cell{222}
\cell{222}
\erow

\brow
\cell{3}
\cell{333}
\cell{333}
\erow

\brow
\cell{}
\cell{333}
\cell{333}
\erow

\brow
\cell{}
\cell{333}
\cell{333}
\erow

\brow
\cell{4}
\cell{444}
\cell{444}
\erow

\brow
\cell{}
\cell{444}
\cell{444}
\erow

\brow
\cell{}
\cell{444}
\cell{444}
\erow

\brow
\cell{}
\cell{444}
\cell{444}
\erow

\brow
\cell{5}
\cell{555}
\cell{555}
\erow

%\nobreak

\brow
\cell{}
\cell{555}
\cell{555}
\erow

\brow
\cell{}
\cell{555}
\cell{555}
\erow

\brow
\cell{}
\cell{555}
\cell{555}
\erow

\brow
\cell{}
\cell{555}
\cell{555}
\erow

\brow
\cell{6}
\cell{666}
\cell{666}
\erow

\end{calstable}

\end{document}

2 Answers 2

2

Instead of trying to insert \nobreak, I'd recommend to join cells vertically. Then you automatically get the rows together.

\brow \nullcell{tlr}\cell{555}\cell{555} \erow
\brow \nullcell{lr}\cell{555}\cell{555} \erow
\brow \nullcell{lr}\cell{555}\cell{555} \erow
\brow \nullcell{lr}\cell{555}\cell{555} \erow
\brow \nullcell{blr}\spancontent{5}\cell{555}\cell{555} \erow

enter image description here

2
  • Thank you, this solution is perfect for me! But I have a question: is it possible to have lines in the spancontent field, too? Or is there any other solution for not breaking the same numbers? Jan 23, 2014 at 17:02
  • 1) Spancontent is always line-free. 2) caltable uses its own page breaking. If you want all the "5"-rows together, instead of "nobreak" between, insert "break" before the whole group: \tbreak{\break} 3) You can disable breaking between some rows, but it's a bit complicated. I think the method (2) is much better.
    – olpa
    Jan 25, 2014 at 0:40
0

You may set a manual table break (\tbreak{<code>}) between the rows where you want the page breaks:

\brow
\cell{}
\cell{444}
\cell{444}
\erow

\tbreak{\vfill\break} % < - manual break

\brow
\cell{5}
\cell{555}
\cell{555}
\erow

See Oleg Parashchenko’s article in TUGboat, Volume 32 (2011) p. 193.

1
  • Thank you, I know manual break (\tbreak), but I do not want, I need "\nobreak". Jan 21, 2014 at 12:47

You must log in to answer this question.

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