Can anyone tell me how to horizontally center the wrapped text in the second header cell of the table in the following example without screwing up the row height or otherwise making it look ugly? I just can't figure it out. In general, is it possible wrap text in one table cell, center it vertically and horizontally in the cell, and also have text in the other cells of the same row vertically centred as well?
Code: Select all
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}
\begin{tabular}{c c p{6cm}} \toprule
\multicolumn{1}{c}{Name}
& \multicolumn{1}{p{2.3cm}}{Variable Form In Code}
& \multicolumn{1}{c}{Meaning} \\
\midrule
x & \verb|x| & Thickness of the back iron on part 1 \\
x & \verb|x| & Thickness of the magnet on part 1 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}