1

I have created a table with the following latex code:

\documentclass[convert]{standalone} 
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{graphicx}
\begin{document}  

\begin{tabular}{@{}ccccccc@{}}
\toprule
\multicolumn{2}{c}{\multirow{2}{*}{}} & \multicolumn{5}{c}{Test} \\
\multicolumn{2}{c}{}                  & a    & b    & c    & d   & e   \\ \midrule
\multirow{5}{*}{\rotatebox[origin=c]{90}{Dummy}}         & 1        & $*$    &      & $*$    &     & $*$   \\
                           & 2        & $*$    &      & $*$    & $*$   & $*$   \\
                           & 3        &      & $*$    & $*$    & $*$   &     \\
                           & 4        & $*$    &      & $*$    & $*$   &     \\
                           & 5        &      & $*$    & $*$    & $*$   &     \\ \bottomrule
\end{tabular}%

\end{document}

The resulting table: enter image description here How can I make the rotated text Dummy horizontally centered or at least add some spacing before the left border?

3
  • If you just want to add some space: remove the first @{} in your columns Commented Jan 11, 2023 at 16:47
  • @samcarter_is_at_topanswers.xyz it worked. Thank you for the help. Can you please post it as an answer so that I can accept it? Commented Jan 11, 2023 at 16:49
  • You're welcome! Commented Jan 11, 2023 at 16:54

1 Answer 1

0

or at least add some spacing before the left border?

Tables normally do have some padding before and after the columns. By using @{} you remove this padding. So if you want to make the padding around the column symmetrically, just don't remove the default padding:

\documentclass[convert]{standalone} 
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{graphicx}
\begin{document}  

\begin{tabular}{ccccccc@{}}
\toprule
\multicolumn{2}{c}{\multirow{2}{*}{}} & \multicolumn{5}{c}{Test} \\
\multicolumn{2}{c}{}                  & a    & b    & c    & d   & e   \\ \midrule
\multirow{5}{*}{\rotatebox[origin=c]{90}{Dummy}}         & 1        & $*$    &      & $*$    &     & $*$   \\
                           & 2        & $*$    &      & $*$    & $*$   & $*$   \\
                           & 3        &      & $*$    & $*$    & $*$   &     \\
                           & 4        & $*$    &      & $*$    & $*$   &     \\
                           & 5        &      & $*$    & $*$    & $*$   &     \\ \bottomrule
\end{tabular}%

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .