Graphics, Figures & TablesSideways Heading for Table without Row Lines

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
cschirf
Posts: 2
Joined: Sat Oct 10, 2009 11:11 pm

Sideways Heading for Table without Row Lines

Post by cschirf »

Hi,

I'm trying to rotate a heading over several rows in a table. I can get the words to rotate fine, is there any way to do it so the lines for the rows don't show up (like the way multicolumn works)?

I've looked through this forum and several others, and I can't seem to find what I'm looking for.

This is what I have so far (the heading in question is the one labelled `Mother's Occupation'):

Code: Select all


\begin{longtable}{| c | c | c | c  | c | c |}

\hline
 & \multicolumn{5}{| c |}{ } \\
 & \multicolumn{5}{| c |}{\textbf{\large Father's Occupation}} \\
 & \multicolumn{5}{| c |}{ } \\

\hline
& & & & & \\

    \multicolumn{1}{|c|}{\textbf{}}  
&  \multicolumn{1}{|c|}{\textbf{}}  
&  \multicolumn{1}{c|}{\textbf{Group A}}  
&  \multicolumn{1}{c|}{\textbf{Group B}}
&  \multicolumn{1}{c|}{\textbf{Group C}}
&  \multicolumn{1}{c|}{\textbf{Group D}} \\

& & & & & \\
\hline
& & & & & \\

% *** next row is where the problem is *** 
\multirow{5}{*}{\begin{sideways}{\textbf{\large Mother's Occupation}}\end{sideways}} 

&	\textbf{Group A}	&	$8$		&	$3$		&	$4$		&	$1$	\\

& & & & & \\
\hline
& & & & & \\

&	\textbf{Group B}	&	$3$		&	$3$		&	$0$		&	$1$	\\

& & & & & \\
\hline
& & & & & \\

&	\textbf{Group C}	&	$0$		&	$0$		&	$1$		&	$0$	\\


& & & & & \\
\hline
& & & & & \\

&	\textbf{Group D}	&	$2$		&	$0$		&	$0$		&	$1$	\\

& & & & & \\
\hline
& & & & & \\

&	\textbf{Total:}		&	\textbf{26}	&	\textbf{10}	&	\textbf{10}	&	\textbf{4}	 \\ 

& & & & & \\
\hline

\end{longtable}
}
I'd appreciate any help.

Thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Sideways Heading for Table without Row Lines

Post by php1ic »

Use \cline{m-n} instead of \hline to draw a horizontal line from the mth column to the nth.

eg.

Code: Select all

&   \textbf{Group A}   &   $8$      &   $3$      &   $4$      &   $1$   \\

& & & & & \\
\cline{2-6}
& & & & & \\

&   \textbf{Group B}   &   $3$      &   $3$      &   $0$      &   $1$   \\
cschirf
Posts: 2
Joined: Sat Oct 10, 2009 11:11 pm

Re: Sideways Heading for Table without Row Lines

Post by cschirf »

Thank you!
Post Reply