[Tex/LaTex] Auto resize tabular row height

spacingtables

After running following code

\documentclass[10pt]{article}
\usepackage{multirow}

\begin{document}

\begin{tabular}{|l|l|l|} \hline
\multicolumn{3}{|c|}{Schedulers} \\ \hline
\multirow{3}{3cm}{Row 1. long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text } & RR & Round Robin \\
& EF & Earliest First \\
& LL & Lightest Loaded \\ \hline

\multirow{4}{*}{Row 2.} & MM & Min-Min \\ 
& MX & Max-Min \\
& DL & Dynamic Level \\ 
& RC & Relative Cost \\ \hline

\multirow{4}{*}{Row 3.} & PN & This paper \\
& ZO & Genetic Algorithm\\
& TA & Tabu search\\
& SA & Simlulated Annealing \\ \hline
\end{tabular}

\end{document}

I get this output:

enter image description here

What should I do to make first three rows (RR, EF and LL) accordingly higher?

Best Answer

Unfortunately multirow doesn't expand rows if it is bigger than the rows it is spanning. In this case changing \\ to \\[1cm] make a reasonable result. A more automatic solution is possible but harder.

enter image description here

\documentclass[10pt]{article}
\usepackage{multirow}

\begin{document}

\begin{tabular}{|l|l|l|} \hline
\multicolumn{3}{|c|}{Schedulers} \\ \hline
\multirow{3}{3cm}{Row 1. long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text } & RR & Round Robin \\[1cm]
& EF & Earliest First \\[1cm]
& LL & Lightest Loaded \\[1cm] \hline

\multirow{4}{*}{Row 2.} & MM & Min-Min \\ 
& MX & Max-Min \\
& DL & Dynamic Level \\ 
& RC & Relative Cost \\ \hline

\multirow{4}{*}{Row 3.} & PN & This paper \\
& ZO & Genetic Algorithm\\
& TA & Tabu search\\
& SA & Simlulated Annealing \\ \hline
\end{tabular}

\end{document}
Related Question