2

Similar to this question I want to have two particular rows of a table on the same page. Because my document is in twocolumn mode I use xtabular. In longtable the command \\* is supposed to work. In the following MWE the pagebreak occurs between the rows

2\\*
3\\

despite the star.

\documentclass[a6paper,14pt,oneside,twocolumn]{scrartcl}
\usepackage{xtab}

\xentrystretch{-0.1}
\setlength{\columnseprule}{0.4pt}

\begin{document}
\begin{xtabular}{l}
    0\\
    1\\
    2\\
    3\\
    4\\
    5\\
    6\\
    7\\
    8\\
    9\\
    0\\
    1\\
    2\\*
    3\\
    4\\
    5\\
    6\\
    7\\
    8\\
    9\\
\end{xtabular}
\end{document}

\nopagebreak doesn't work either and I found no hint in the 'xtab' documentation.

mwe

EDIT:

\\* doesn't work in supertabular either.

1 Answer 1

2

You can manually add something like \shrinkheight{<dimen>} at appropriate spots in the table, but this requires looking at the result and guessing the good value.

\documentclass[a6paper,14pt,oneside,twocolumn]{scrartcl}
\usepackage{xtab}

\xentrystretch{-0.1}
\setlength{\columnseprule}{0.4pt}

\begin{document}
\begin{xtabular}{l}
    10\\
    11\\
    12\\
    13\\
    14\\
    15\\
    16\\
    17\\
    18\\
    19\\
    20\\
    21\\\shrinkheight{-2\normalbaselineskip}
    22\\
    23\\
    24\\
    25\\
    26\\
    27\\
    28\\
    29\\
\end{xtabular}
\end{document}

enter image description here

1
  • Thank you for the answer. As mentioned by you this is cumbersome. Also the semantics is different to \\* which means something like "don't break here". \shrinkheight{k\normalbaselineskip} would be " put k more lines on this page/column".
    – Benjamin
    Jul 18, 2017 at 16:15

You must log in to answer this question.

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