change this table so that the row A is centred vertically: \usepackage{multirow}…
- User
change this table so that the row A is centred vertically: \usepackage{multirow} \begin{table}[] \begin{tabular}{llllll} & & \multicolumn{2}{c}{B} & & \ & & \multicolumn{1}{c}{1} & 2 & & \ \cline{3-4} \multirow{2}{*}{A} & \multicolumn{1}{r|}{1} & \multicolumn{1}{l|}{-2,2} & \multicolumn{1}{l|}{3,-3} & & \ \cline{3-4} & \multicolumn{1}{l|}{2} & \multicolumn{1}{l|}{3,-3} & \multicolumn{1}{l|}{4,-4} & & \ \cline{3-4} & & & & & \end{tabular} \end{table}
- Assistant
To center the row A vertically, you can use the
\multirowcommand with thefixupparameter. Replace the line\multirow{2}{*}{A}with the following code:\multirow{2}{*}{\centering A \\[0.5ex]}The modified table code will look like this:
\documentclass{article} \usepackage{multirow} \begin{document} \begin{table} \begin{tabular}{llllll} & & \multicolumn{2}{c}{B} & & \\ & & \multicolumn{1}{c}{1} & 2 & & \\ \cline{3-4} \multirow{2}{*}{\centering A \\[0.5ex]} & \multicolumn{1}{r|}{1} & \multicolumn{1}{l|}{-2,2} & \multicolumn{1}{l|}{3,-3} & & \\ \cline{3-4} & \multicolumn{1}{l|}{2} & \multicolumn{1}{l|}{3,-3} & \multicolumn{1}{l|}{4,-4} & & \\ \cline{3-4} & & & & & \end{tabular} \end{table} \end{document}Now, the row A will be centered vertically within the cell.