Graphics, Figures & TablesFitting a multirow tabular cell with rotated text

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Fitting a multirow tabular cell with rotated text

Post by Singularity »

I'm trying to get the "Degree" cell with the rotated text to expand to fit the text, but with no luck. I've tried \hspace, \vspace, and the following ~\hspace\baselineskip which I got from here.

I also tried using [origin=c], suggested here.

I've tried commenting out my parindent and parskip, but that wasn't it. So my code matches theirs exactly, yet "Degree" spills out of the box. What's different?

Code: Select all

Code, edit and compile here:
\documentclass[fleqn,reqno]{article}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{array} % Provides for a more flexible array and tabular environment
\usepackage{booktabs} % For fancy stuff in arrays and tables, like the following column definitions
\newcolumntype{L}{>{\begin{math}}l<{\end{math}}}%
\newcolumntype{C}{>{\begin{math}}c<{\end{math}}}%
\newcolumntype{R}{>{\begin{math}}r<{\end{math}}}%
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
\begin{document}
End behavior of polynomial functions
\begin{tabular}{|c|c|c|c|l|}
\cline{3-5}
\multicolumn{2}{c|}{} & \multicolumn{2}{c|}{\textbf{\underline{Lead Coefficient}}} & \\
\multicolumn{2}{c|}{} & Positive & Negative & Notes\\
\hline
\multirow{2}{*}{\rotatebox[origin=c]{90}{\textbf{Degree~\hspace{-\normalbaselineskip}}}}
& Even & up/up & down/down & \textbf{Even} degree's ends always go in the \textbf{same} direction. \\
& Odd & down/up & up/down & \textbf{Odd} degree's ends always go in the \textbf{opposite} direction. \\
\hline
\end{tabular}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

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

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

Post Reply