1

I have the following table.

\documentclass{article}
\usepackage{lscape}
\usepackage[table]{xcolor}
\usepackage{tabu}
\usepackage{makecell, multirow}
\renewcommand\theadfont{\bfseries}

\begin{document}
\begin{landscape}
\setlength\tabcolsep{3pt}
\taburowcolors[3] 2{gray!20 .. white}
\arrayrulewidth=1pt
\begin{tabu}{@{} X[3,c] *{8}{| X[c] X[c]} @{}}

    & \multicolumn{2}{c |}{\thead{Abduction}}
    & \multicolumn{2}{c |}{\thead{Adduction}}
    & \multicolumn{2}{c |}{\thead{Anteversion}}
    & \multicolumn{2}{c |}{\thead{Retroversion}}
    & \multicolumn{2}{c |}{\thead{Lateral\\Rotation\\neutral}}
    & \multicolumn{2}{c |}{\thead{Medial\\Rotation\\neutral}}
    & \multicolumn{2}{c |}{\thead{Lateral\\Rotation\\90° abduction}}
    & \multicolumn{2}{c}{\thead{Medial\\Rotation\\90° abduction}}
    \\

    \thead{Pseudonym}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    \\

    \hline

    Proband 01
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    \\

    Proband 02
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    \\
\end{tabu}
\end{landscape}
\end{document}

The result looks like this.

enter image description here

As you can see there are some gaps in the row coloring which look horrible. How can I get rid of them?

Additionally: I would like "Pseudonym" to be vertically centered. I tried using \multirowthead{2}{Pseudonym} in the first row of the table but that doesn't take into account that the first row has multilined cells. Can someone help with that?

1

The words Anteversion and Retroversion are too long which causes the column to be too wide I guess. Same is true for the expressions 90° abduction and 90° abduction. I tried

& \multicolumn{2}{c |}{\thead{Abduction}}
& \multicolumn{2}{c |}{\thead{Adduction}}
& \multicolumn{2}{c |}{\thead{Ante-\\version}} % <-- look here
& \multicolumn{2}{c |}{\thead{Retro-\\version}} % <-- look here
& \multicolumn{2}{c |}{\thead{Lateral\\Rotation\\neutral}}
& \multicolumn{2}{c |}{\thead{Medial\\Rotation\\neutral}}
& \multicolumn{2}{c |}{\thead{Lateral\\Rotation\\90° ab-\\duction}} % <-- look here
& \multicolumn{2}{c}{\thead{Medial\\Rotation\\90° ab-\\duction}} % <-- look here

and get

enter image description here

But maybe the experts here have a better solution.

1

Well @Dr. Manuel Kuehner beat me for some minutes ... as he also stated, the problem is (as I said in your previous question, that width of \multicolumn{}{}{...}` is wider than sum of width of spanning columns. To resolve this problem you can do the following:

  • write title with divisions of word (as suggested in above answer) or shorten words by period (as used here)
  • enlarge height of text area in page

So, try if this gives what you like to have:

\documentclass{article}
\usepackage{lscape}
\usepackage[table]{xcolor}
\usepackage{tabu}
\usepackage{makecell}% <-- new
\renewcommand\theadfont{\bfseries}

\usepackage{siunitx}% <-- new

\begin{document}
\begin{landscape}
\hrule\vskip 12mm

    \setlength\tabcolsep{3pt}
    \taburowcolors[3] 2{gray!20 .. white}
    \arrayrulewidth=1pt
\noindent%
\begin{tabu} spread  \textheight {|c *{8}{|X[c] X[c]}|}
    & \multicolumn{2}{c|}{\thead[b]{Abduction}}
    & \multicolumn{2}{c|}{\thead[b]{Adduction}}
    & \multicolumn{2}{c|}{\thead[b]{Ante\-\\version}}
    & \multicolumn{2}{c|}{\thead[b]{Retro\-\\version}}
    & \multicolumn{2}{c|}{\thead[b]{Lateral\\ Rotation\\ neutral}}
    & \multicolumn{2}{c|}{\thead[b]{Medial\\  Rotation\\ neutral}}
    & \multicolumn{2}{c|}{\thead[b]{Lateral\\ 
                                    Rotat. \SI{90}{\degree}\\ abduction}}
    & \multicolumn{2}{c|}{\thead[b]{Medial\\  
                                    Rotat. \SI{90}{\degree}\\ abduction}}
    \\
\thead[b]{Pseudonym}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    & \textbf{left}     & \textbf{right}
    \\
    \hline
    Proband 01
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    \\
    Proband 02
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    &                   &
    \\
\end{tabu}
\end{landscape}
\end{document}

Edit: during loading of picture and some comments the answer was reedit and I will repeat this my additions:

enter image description here

On picture is on the left side a line which show the text height. From it is clear, that you have reserve for enlarge text height and than not need to shorten (in my suggestion) word 'Rotation' to 'Rotat.'

In MWE I also change (in comparison to my answer to your first question) the determination of column types. Now is omitted (experimentally) used @{}, and for the first column is selected c.

  • Well, you already answered the question in her previous question :). You should have the accepted answer. Is it still ok with you? – Dr. Manuel Kuehner May 7 '16 at 21:05
  • 1
    of course it is . I add my answer because I like to point two possible solutions (one yours with my variant with shorten 'Rotation' to 'Rotat.') and second, not showed, with enlarge text height. this possible solution I didn't show since OP didn't provide any information about page layout of her document. With this answer I also resolve some other issues regarding tab column definitions (not extra exposed here), more or less for my future use and for to remember this. BTW, this evening I experienced some problems with my internet connections, so I'm temporally slowed down significantly. – Zarko May 7 '16 at 21:27

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.