1

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!

2

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}
2
  • How does the -15pt come from, I see you add 10ex+5ex vertical spaces. Did you just by manually adjust fixup parameter? I see two method to automatically set the vertical alignment, one is save the position in the first run, and read back and adjust the positon(tex.stackexchange.com/a/77984/24012), but still complex; The other method is tex.stackexchange.com/a/183178/24012, which also use tex primitives. – ollydbg23 Aug 25 '15 at 15:46
  • Thanks for the links. The -15pt was a manual choice. – Andrew Swann Aug 25 '15 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.