[Tex/LaTex] Vertical alignment text first column with merged cells and last column

tablesvertical alignment

I'm relatively new to Latex and I really appreciate this community, it has already helped me a lot. However, I've been unable to find the answer for the following problem:

I want to create a 3 columns and 5 rows. The first 3 rows in column 1 are merged, but the text isn't centered relative to column 2/3. Also the text in the last column isn't vertically centered. This is the code i'm using:

\documentclass[11pt,a4paper]{article}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{array}

\begin{document}

\noindent\begin{tabular}{|m{5cm}|m{5cm}|m{5cm}|}
\hline
\multirow{3}{*}{Temperature ($^\circ$C/K)} & Thermocouple & Depending on the experimental set-up, type-K,T or other is used\\[10ex] \cline{2-3}
                                           & Resistor Thermal Device (RTD) & Usually a PT100 or PT1000\\[5ex] \cline{2-3}
                                           & Thermistor & \\ \hline

\end{tabular}
\end{document}

Thanks for any tips and/or tricks!

Best Answer

Deep boxes confuse the vertical alignment of multirow and usually need to be corrected by using the optional fixup argument, e.g. 15pt correction can be given via

\multirow{3}{*}[-15pt]{....}

(Compare Vertical Alignment in multirow using cells with >1 lines). Also extra space added at the end of a row with \\[...] will not help the vertical spacing as you observe. One work around is to add a dummy column, cf. Why can I not vertically align the text in the 3rd table column?:

Sample output

\documentclass[11pt,a4paper]{article}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{array}

\begin{document}

\noindent\begin{tabular}{|m{5cm}|m{5cm}|m{5cm}|m{0cm}}
\cline{1-3}
\multirow{3}{*}[-15pt]{Temperature ($^\circ$C/K)}
& Thermocouple & Depending
on the experimental set-up, type-K,T or other is used&\\[10ex]
\cline{2-3} 
& Resistor Thermal Device (RTD) & Usually a PT100 or PT1000&\\[5ex]
\cline{2-3}
& Thermistor & \\ \cline{1-3}
\end{tabular}

\end{document}