1

So, the question is: is it somehow possible?

I need to use long table of some sort (I use longtabu), multirow of 9 rows, some rows contain parboxes.

When pagebreak occurs in the middle of multirow I want multirows's text appear on both pages (before and after pagebreak) vertically centered according to it's rows:

This is what i wanna get

Sorry for cyrillic letters.

It seems that the finest trick for vertical centering text in multirows is using invisible lines (like using \cline{3-9} instead of \hline) but this would spoil all the automation of tex and doesn't look properly.


EDITED: Here is sample code, took it from this question (it's close). You can see that \multirow doesn't work properly with page break. Once again with sample code:

  1. Can I make \multirow work with pagebreak? Do I have to use some other command/package for making a multirow?
  2. Is there an opportunity to make \multirow's text appear on both pages: before and after pagebreak?

\documentclass{article}

%%%%%%%%%%%%%%%%%%%%%%
% Package Inclusions %
%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tabu}
\usepackage{longtable}
\usepackage{seqsplit}
\usepackage{geometry}
\usepackage{pdflscape}
\usepackage{xparse}
\usepackage{array}
\usepackage{xstring}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{amssymb,amsfonts,textcomp}
\usepackage{multirow}
\usepackage{lipsum}

%used to print Spanish characters in the text
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage[english]{babel}

%%%%%%%%%%%%%%%%%%%%%%
%   Configurations   %
%%%%%%%%%%%%%%%%%%%%%%

\geometry{
      top=0.50in,            
      inner=0.75in,
      outer=0.75in,
      bottom=0.50in,
      headheight=3ex,      
      headsep=6ex,          
    }

\setlength{\LTpre}{1pt} % removes the white space before a long table
\setlength{\LTpost}{1pt} % removes the white space after a long table
\pagestyle{empty} % stops the page number from showing on each page
\tabulinesep=1mm


%%%%%%%%%%%%%%%%%%%%%%
% Start Report       %
%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{landscape}
\Large
{\textbf{Test Report}}
\small

\begin{longtabu} to 9.5in {
    |X[1.5,l,m]|
    X[4,l,m]|
    X[2.5,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[3,l,m]|
    X[2,l,m]|
    X[8,l,m]|
    }
    \hline

    \multicolumn{4}{|l|}{\textbf{Customer Name:}} &
    \multicolumn{5}{l|}{\textbf{Well Name:}} &
    \multicolumn{1}{l|}{\textbf{Job Date:}}

    \\

    \multicolumn{4}{|l|}{test} &
    \multicolumn{5}{l|}{test well} &
    \multicolumn{1}{l|}{22/08/2014}


    \\\hline

    \multicolumn{4}{|l|}{\textbf{Customer Representative:}} &
    \multicolumn{3}{l|}{\textbf{County/Parish:}} &
    \multicolumn{2}{l|}{\textbf{State:}} &
    \multicolumn{1}{l|}{\textbf{Job Category:}}

    \\\cline{5-9}

    \multicolumn{4}{|l|}{Health} &
    \multicolumn{3}{c|}{test} &
    \multicolumn{2}{c|}{Texas} &
    \multicolumn{1}{l|}{Wash Fill/Sand Removal} \\ \hline

    \multicolumn{1}{|c|}{\multirow{3}{*}{\centering\textbf{Time}}} &
    \multicolumn{1}{c|} {\multirow{3}{*}{\centering\textbf{Activity Name}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Tubing Depth}}} &
    \multicolumn{2}{c|}{\centering\textbf{Pressure}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm} {\centering\textbf{Tubing Weight}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}
{\centering\textbf{Liquid Rate}}}&
    \multicolumn{1}{c|}{\multirow{2}{3cm}{\centering\textbf{Flow black Rate / Liquid Type}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{N2 Rate}}}&
    \multicolumn{1}{c|}{\multirow{3}{*}{\centering\textbf{Activity Info}}} \\\cline{4-5}
    & & & 
    \centering\scriptsize\textbf{Circulation} &
    \centering\scriptsize\textbf{Wellhead} &
    & & & & \\\cline{3-9}
    & &
    \centering\scriptsize\textbf{Start/End} &
    \centering\scriptsize\textbf{(psi)} &
    \centering\scriptsize\textbf{(psi)} &
    \centering\scriptsize\textbf{(lbs)} &
    \centering\scriptsize\textbf{(bbl/min)} &
    \centering\scriptsize\textbf{(bbl)/Name} &
    \centering\scriptsize\textbf{(SCF/min)} & 
\\\hline %cline{3-9}
 \endhead
    \multicolumn{3}{l}{Continued on next page ...} \\ 
    \endfoot
    \endlastfoot
    & & & & & & & & &\\\hline
\end{longtabu}



\begin{longtabu} to 9.88 in {
    |X[1.5,l,m]|
    X[4,l,m]|
}
\hline   
\multirow{9}{*}{test1} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{1-2}
\hline   
\multirow{9}{*}{test2} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{1-2}
\hline   
\multirow{9}{*}{test3} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{1-2}
\hline   
\multirow{19}{*}{test4} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{2-2}
&10 \\ \cline{2-2}
&11 \\ \cline{2-2}
&12 \\ \cline{2-2}
&13 \\ \cline{2-2}
&14 \\ \cline{1-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{2-2}
\hline   
\end{longtabu}

\end{landscape}
\end{document}
4
  • Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – CarLaTeX
    Commented Feb 11, 2017 at 4:26
  • I dont have access to this file right now, i'll upload it on monday. I'll tag you here when it's ready Commented Feb 11, 2017 at 21:08
  • I don't know if I can help you, but with a mwe I'm sure someone will.
    – CarLaTeX
    Commented Feb 11, 2017 at 21:17
  • @CarLaTeX Hey check it out Commented Feb 11, 2017 at 21:37

1 Answer 1

1

If David Carisle didn't find a solution here, I doubt there is one...

If you don't want to adjust it manually (that is, when your document is almost finished, divide the block of multirow in two little ones, in order to have one of them in the first page and the other in the second), I suggest putting the entire block of multirow automatically on the second page.

From the multirow package documentation, Section 3.6 Use with longtable:

... omissis ... you want to prevent the pagebreak to occur in the middle of this entry. You can do this by ending the intermediate rows with \\* instead of \\.

... omissis ... There is, however, a bug in longtable, that causes the \\* not to work if it is followed by a \cline

... omissis ... multirow has a package option longtable that redefines \cline so that the \\* will also work when followed by \cline. The code comes from David Carlisle.

\documentclass{article}

%%%%%%%%%%%%%%%%%%%%%%
% Package Inclusions %
%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tabu}
\usepackage{longtable}

\usepackage{seqsplit}
\usepackage{geometry}
\usepackage{pdflscape}
\usepackage{xparse}
\usepackage{array}
\usepackage{xstring}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{amssymb,amsfonts,textcomp}
\usepackage[longtable]{multirow}
\usepackage{lipsum}

%used to print Spanish characters in the text
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage[english]{babel}

%%%%%%%%%%%%%%%%%%%%%%
%   Configurations   %
%%%%%%%%%%%%%%%%%%%%%%

\geometry{
      top=0.50in,            
      inner=0.75in,
      outer=0.75in,
      bottom=0.50in,
      headheight=3ex,      
      headsep=6ex,          
    }

\setlength{\LTpre}{1pt} % removes the white space before a long table
\setlength{\LTpost}{1pt} % removes the white space after a long table
\pagestyle{empty} % stops the page number from showing on each page
\tabulinesep=1mm


%%%%%%%%%%%%%%%%%%%%%%
% Start Report       %
%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{landscape}
\Large
{\textbf{Test Report}}
\small

\begin{longtabu} to 9.5in {
    |X[1.5,l,m]|
    X[4,l,m]|
    X[2.5,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[3,l,m]|
    X[2,l,m]|
    X[8,l,m]|
    }
    \hline

    \multicolumn{4}{|l|}{\textbf{Customer Name:}} &
    \multicolumn{5}{l|}{\textbf{Well Name:}} &
    \multicolumn{1}{l|}{\textbf{Job Date:}}

    \\

    \multicolumn{4}{|l|}{test} &
    \multicolumn{5}{l|}{test well} &
    \multicolumn{1}{l|}{22/08/2014}


    \\\hline

    \multicolumn{4}{|l|}{\textbf{Customer Representative:}} &
    \multicolumn{3}{l|}{\textbf{County/Parish:}} &
    \multicolumn{2}{l|}{\textbf{State:}} &
    \multicolumn{1}{l|}{\textbf{Job Category:}}

    \\\cline{5-9}

    \multicolumn{4}{|l|}{Health} &
    \multicolumn{3}{c|}{test} &
    \multicolumn{2}{c|}{Texas} &
    \multicolumn{1}{l|}{Wash Fill/Sand Removal} \\ \hline

    \multicolumn{1}{|c|}{\multirow{3}{*}{\centering\textbf{Time}}} &
    \multicolumn{1}{c|} {\multirow{3}{*}{\centering\textbf{Activity Name}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Tubing Depth}}} &
    \multicolumn{2}{c|}{\centering\textbf{Pressure}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm} {\centering\textbf{Tubing Weight}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}
{\centering\textbf{Liquid Rate}}}&
    \multicolumn{1}{c|}{\multirow{2}{3cm}{\centering\textbf{Flow black Rate / Liquid Type}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{N2 Rate}}}&
    \multicolumn{1}{c|}{\multirow{3}{*}{\centering\textbf{Activity Info}}} \\\cline{4-5}
    & & & 
    \centering\scriptsize\textbf{Circulation} &
    \centering\scriptsize\textbf{Wellhead} &
    & & & & \\\cline{3-9}
    & &
    \centering\scriptsize\textbf{Start/End} &
    \centering\scriptsize\textbf{(psi)} &
    \centering\scriptsize\textbf{(psi)} &
    \centering\scriptsize\textbf{(lbs)} &
    \centering\scriptsize\textbf{(bbl/min)} &
    \centering\scriptsize\textbf{(bbl)/Name} &
    \centering\scriptsize\textbf{(SCF/min)} & 
\\\hline %cline{3-9}
 \endhead
 \multicolumn{3}{l}{Continued on next page\ldots} \\ 
 \endfoot
 \endlastfoot
 & & & & & & & & &\\\hline
\end{longtabu}


\begin{longtabu} to 9.88 in {
    |X[1.5,l,m]|
    X[4,l,m]|
}
\hline   
\endhead
\multicolumn{2}{l}{Continued on next page\ldots} \\ 
\endfoot
\endlastfoot
\multirow{9}{*}{test1} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{1-2}
\hline   
\multirow{9}{*}{test2} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{1-2}
\hline   
\multirow{9}{*}{test3} 
&1 \\ \cline{2-2}    
&2 \\ \cline{2-2}
&3 \\ \cline{2-2}
&4 \\ \cline{2-2}
&5 \\ \cline{2-2}
&6 \\ \cline{2-2}
&7 \\ \cline{2-2}
&8 \\ \cline{2-2}
&9 \\ \cline{1-2}
\hline   
\multirow{19}{*}{test4} 
&1 \\* \cline{2-2}    
&2 \\* \cline{2-2}
&3 \\* \cline{2-2}
&4 \\* \cline{2-2}
&5 \\* \cline{2-2}
&6 \\* \cline{2-2}
&7 \\* \cline{2-2}
&8 \\* \cline{2-2}
&9 \\* \cline{2-2}
&10 \\* \cline{2-2}
&11 \\* \cline{2-2}
&12 \\* \cline{2-2}
&13 \\* \cline{2-2}
&14 \\* \cline{2-2}
&15 \\* \cline{2-2}
&16 \\* \cline{2-2}
&17 \\* \cline{2-2}
&18 \\* \cline{2-2}
&19 \\* \cline{2-2}
\hline   
\end{longtabu}

\end{landscape}
\end{document}

First page:

enter image description here

Second page:

enter image description here

2
  • it seems that OP forgot on your answer :-(
    – Zarko
    Commented Aug 11, 2017 at 12:59
  • @Zarko Thank you for your upvote... Unfortunately it happens sometimes :):):)
    – CarLaTeX
    Commented Aug 11, 2017 at 13:01

You must log in to answer this question.

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