2

I'm having trouble getting the multirow working with longtabu. The problem is the Time column is not vertically centering as I would expect using a multirow. Also I would like to use a multirow on the activity name and activity info columns. Each of these columns should span 3 rows. Any help is much appreciated!

\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}

%used to print Spanish characters in the text
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage[english,spanish]{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
    \multirow{3}{*}{\centering\textbf{Time}} &
    \centering\textbf{Activity Name} &
    \centering\textbf{Tubing Depth} &
    \multicolumn{2}{c|}{\textbf{Pressure}} &
    \centering\textbf{Tubing Weight} &
    \centering\textbf{Liquid Rate} &
    \centering\textbf{Flow Black Rate / Liquid Type} &
    \centering\textbf{N2 Rate} &
    \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

    \endhead
    \multicolumn{3}{l}{Continued on next page ...} \\ 
    \endfoot
    \endlastfoot

    & & & & & & & & &

    \\\hline


\end{longtabu}

\begin{longtabu} to 9.5in {
    |X[1.5,l,m]|
    X[4,l,m]|
}
\hline   
\multirow{9}{*}{test} 
&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}

\end{longtabu}

\end{landscape}
\end{document}

enter image description here

1 Answer 1

2

The errors are from the fact that only Time label is wrapped by \multirow{3} in the OP. There are other labels in the same row that should be wrapped by multirow{2}, for examples turbing depth, Turbine weight, Liquid rate, and Activity name and Activity info should have been wrapped by \multirow{3}. Further, instead of * for natural width, the text width in this case needs to specify its width to break the lines as shown in the image, otherwise it prints in one single line and hits the margins.

enter image description here

Code

\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}

%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}{*}{test} 
&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}

\end{longtabu}

\end{landscape}
\end{document}
1
  • this is great, thank you very much. issue resolved
    – SteveM
    Sep 16, 2014 at 14:24

You must log in to answer this question.

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