3

I'm having real trouble getting my table to work. What I want to do is create a table where the columns "Kriterium" and "Trainingsziel" are multi-row. I'm not getting proper formatting, though. Any ideas on what I'm doing wrong? EDIT: Hey guys, thanks for your suggestions. I've removed the fullpage package (although that's really scewing up my paper) and made the multirows 3cm wide. Also made the total table width smaller. Unfortunately, that didn't clear the problem, though. At first, I had used percentages of \textwidth, with the same result. Basically, the problem is that the cells in question don't seem to be multirow at all. Hence, any contained text gets truncated. Attached is my new minimal working example - any more ideas would be welcome.

\documentclass[
a4paper,    
10pt,
twocolumn,
openany,
%notitlepage,
]
{scrartcl}

\usepackage{url}
\usepackage[ngerman]{babel}
\usepackage[ansinew]{inputenc}
\usepackage[table]{xcolor}
\usepackage{mdframed}
\usepackage{mdwlist}
\usepackage{framed}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{subfigure}
\usepackage{lettrine}
\usepackage{graphicx} %%Zum Laden von Grafiken
\usepackage{lmodern}
\usepackage{textcomp,gensymb}
\usepackage{amsmath}
\usepackage{amssymb}

\definecolor{weis}{rgb}{1.0,1.0,1.0}
\definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8}
\definecolor{hellgrau}{rgb}{0.95,0.95,0.95}

\definecolor{blau}{rgb}{0.0,0.0,1.0}
\definecolor{gruen}{rgb}{0.0,1.0,0.0}
\rowcolors{1}{dunkelgrau}{hellgrau}
\graphicspath{{figures/}{Pdf/}}

\begin{document}
\pagestyle{plain}
\begin{table*}%
\centering
\begin{tabular}{m{2cm}m{3cm}m{3cm}m{3cm}m{3cm}}         
Übung   & Kurzbeschreibung & Kriterium & Trainingsziel & Schwierigkeit\\ \hline
\multicolumn{5}{c}{Press}\\     
Liegestütz m. Erhöhten Händen                   &   Vereinfachte Variante des Liegestütz                                            & \multirow{3}{3cm}{Oberkörper-Oberarmwinkel 90°, Neutrale Wirbelsäule. Amplitude beachten!}                                                                  & \multirow{3}{3cm}{Verbesserung der Rumpfstabilität in der Sagittalebene unter Last, Training der ventralen Drückerkette (Pectoralis Major, Triceps Brachii, Serratus Anterior)}                                                                                                                         &   *\\
Liegestütz                                                          &   Klassischer Liegestütz                                                                      &                                                                                                                                                                                                                                                       &                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   & **\\
Liegestütz m. erhöhten Füßen                        & Erschwerte Liegestützvariante                                                         &                                                                                                                                                                                                                                                   &                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       & ***\\
Einarmige Liegestütz m. erhöhten Händen & Sportspezifische Rumpfstabilisation unter geringer Last       & \multirow{3}{3cm}{Oberkörper-Oberarmwinkel 90°, Neutrale Wirbelsäule, keine Drehbewegung. Amplitude beachten!}                          &   \multirow{3}{3cm}{Verbesserung der Rumpfstabilität in der Sagittalebene sowie Anti-rotatorisch um die Longitudinalachse unter Last, Training der ventralen Drückerkette (Pectoralis Major, Triceps Brachii, Serratus Anterior)}                           & ****\\
Einarmige Liegestütz                                        & Sportspezifische Rumpfstabilisation unter moderater Last  &                                                                                                                                                                                                                                                   &                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   & *****\\
Einarmige Liegestütz m. erhöhten Füßen  & Sportspezifische Rumpfstabilisation unter hoher Last          &                                                                                                                                                                                                                                                   &                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   & ******\\
\multicolumn{5}{c}{Squat}\\             
Step Up                             & Einstiegsvariante, kann auch beladen werden                                                                               & Beinachse, aufrechter Oberkörper, Gewichtsverteilung      & \multirow{3}{3cm}{Kräftigung der Knie- und Hüftstreckermuskulatur}  &   * \\
Petterson Step Up           & Step-Up unter Ausschluss der Wadenmuskulatur                                                                          & Beinachse, aufrechter Oberkörper, Gewichtsverteilung      &                                                                                                                                                           & **\\
Bulgarian Split Squat   & Semi-Unilaterale Übung m. Fokus auf das Knie                                                                          &                                                                                                               &                                                                                                                                                           & ***\\
Skater Squat                    & Sportspezifische Unilaterale Übung mit hohen Anforderungen an Rumpfstabilität         & \multirow{2}{3cm}{Beinachse, Rumpfstabilität}                       &                                                                                                                                                               &   ****\\
Pistol Squat                    & Unilaterale Übung mit hohen Anforderungen an Kraft, Mobilität und Rumpfstabilität &                                                                                                               &                                                                                                                                                           & *****\\
Loaded Pistol Squat     &                                                                                                                                                                   &                                                                                                               &                                                                                                                                                           & ******\\


\end{tabular}
\caption{Übungskatalog für das intensive Krafttraining}
\label{tab:strength-exercse}
\end{table*}
\end{document}
4
  • Welcome! It works if you drop fullpage. However, you are going to have problems regardless because you have specified a table with 5 5cm columns. So the columns alone will total 25cm whereas your paper is only 210cm wide. And, of course, you don't actually have 210cm to play with because there are margins and spacing between columns.
    – cfr
    Commented Jul 3, 2015 at 21:04
  • Also, \multirow{3}*... tells it to use the 'natural width' of the text. Since you don't specify any line breaks, it creates it as a single line of text in a box.
    – cfr
    Commented Jul 3, 2015 at 21:10
  • Hey guys, thanks for your suggestions. Unfortunately, that didn't clear the problem, though.
    – Lukas
    Commented Jul 3, 2015 at 21:39
  • Did you see my answer? I don't think you have to remove the fullpage package. Although that seemed to make the problem worse when I first tested, I managed to reactivate it once I'd corrected the other problems I found. I've explained what I used and did in my answer but let me know if anything isn't clear. The booktabs documentation is highly recommended.
    – cfr
    Commented Jul 3, 2015 at 21:54

1 Answer 1

2

There are a number of issues here. You have asked for 5 columns of 5cm which will not work on paper of width 210cm, even with zero margins and no spacing between columns. Further more, the * as width in \multirow tells it to use the natural width of the contents. If you specify no line breaks, it just puts the whole thing in a single-line box and uses that.

One way to use the full width available to you is to use tabularx. An X column will be set to the width needed to make a tabular of a specified width (\textwidth in this case). You can then use \hsize as the width fed to \multirow. Once you do that, you realise that 3 rows is not sufficient for all the cells so it is necessary to specify a larger number and insert some blank lines to make room. It also makes sense, for narrow columns, to set their contents ragged right. ragged2e and \RaggedRight provide an enhanced version of this command. The final column of the tabular contains much less content, so is specified as l to save space.

This is the result:

adjusted tabular

Note that I've minimised your example a bit. You did a really good job for a first post, but I wanted to get the minimal code I needed to work on the problem.

\documentclass[
a4paper,
10pt,
twocolumn,
openany,
]
{article}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[cm]{fullpage}
\usepackage{array,multirow,tabularx,ragged2e}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{kantlipsum}

\begin{document}
\pagestyle{plain}
\begin{table*}%
\centering
\begin{tabularx}{\textwidth}{*{4}{>{\RaggedRight\arraybackslash}X}l}
Übung & Kurzbeschreibung & Kriterium & Trainingsziel & Schwierigkeit\\ \hline
\multicolumn{5}{c}{Press}\\
Liegestütz m. Erhöhten Händen & Vereinfachte Variante des Liegestütz & \multirow{3}{\hsize}{Oberkörper-Oberarmwinkel 90°, Neutrale Wirbelsäule. Amplitude beachten!} & \multirow{6}{\hsize}{Verbesserung der Rumpfstabilität in der Sagittalebene unter Last, Training der ventralen Drückerkette (Pectoralis Major, Triceps Brachii, Serratus Anterior)} & *\\
Liegestütz & Klassischer Liegestütz &&& **\\
Liegestütz m. erhöhten Füßen & Erschwerte Liegestützvariante &&& ***\\
&&&&\\
&&&&\\
&&&&\\
&&&&\\
Einarmige Liegestütz m. erhöhten Händen & Sportspezifische Rumpfstabilisation unter geringer Last & \multirow{3}{\hsize}{Oberkörper-Oberarmwinkel 90°, Neutrale Wirbelsäule, keine Drehbewegung. Amplitude beachten!} & \multirow{5}{\hsize}{Verbesserung der Rumpfstabilität in der Sagittalebene sowie Anti-rotatorisch um die Longitudinalachse unter Last, Training der ventralen Drückerkette (Pectoralis Major, Triceps Brachii, Serratus Anterior)} & ****\\
Einarmige Liegestütz & Sportspezifische Rumpfstabilisation unter moderater Last &&& *****\\
Einarmige Liegestütz m. erhöhten Füßen & Sportspezifische Rumpfstabilisation unter hoher Last &&& ******\\
&&&&\\
&&&&\\
\multicolumn{5}{c}{Squat}\\
Step Up & Einstiegsvariante, kann auch beladen werden & Beinachse, aufrechter Oberkörper, Gewichtsverteilung & \multirow{3}{\hsize}{Kräftigung der Knie- und Hüftstreckermuskulatur} & * \\
Petterson Step Up & Step-Up unter Ausschluss der Wadenmuskulatur & Beinachse, aufrechter Oberkörper, Gewichtsverteilung && **\\
Bulgarian Split Squat & Semi-Unilaterale Übung m. Fokus auf das Knie &&& ***\\
Skater Squat & Sportspezifische Unilaterale Übung mit hohen Anforderungen an Rumpfstabilität & \multirow{2}{\hsize}{Beinachse, Rumpfstabilität} & & ****\\
Pistol Squat & Unilaterale Übung mit hohen Anforderungen an Kraft, Mobilität und Rumpfstabilität & && *****\\
Loaded Pistol Squat &&&& ******\\

\end{tabularx}
\caption{Übungskatalog für das intensive Krafttraining}
\label{tab:strength-exercse}
\end{table*}

\end{document}

I'd now suggest thinking about some ways to improve the table, probably starting with the use of booktabs. The following also uses makecell to configure the headers and an additional command \sthead{} for what seem to be sub-headers.

At Bernard's suggestion, I've added a little extra space following the groupings. I've also adjusted the number of lines specified in \multirow{<number>}... to eliminate overfull vertical boxes. The remaining overfull box is a horizontal one due to TeX not knowing how, or not wanting, to hyphenate Hüftstreckermuskulatur so I would suggest helping it out a little in this case. Since I don't speak German, however, I don't know where the hyphenation should occur!

\documentclass[
a4paper,
10pt,
twocolumn,
openany,
]
{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[cm]{fullpage}
\usepackage{array,makecell,multirow,tabularx,ragged2e,booktabs}
\usepackage{lmodern}
\usepackage{textcomp}
\renewcommand\theadfont{\sffamily\bfseries}
\newcommand*\sthead[1]{\sffamily#1}
\renewcommand\theadalign{l}
\begin{document}
\pagestyle{plain}
\begin{table*}%
\centering
\begin{tabularx}{\textwidth}{*{4}{>{\RaggedRight\arraybackslash}X}l}
\toprule
\thead{Übung} & \thead{Kurzbeschreibung} & \thead{Kriterium} & \thead{Trainingsziel} & \thead{Schwierigkeit}\\\midrule
\multicolumn{4}{c}{\sthead{Press}}\\\cmidrule(lr){1-5}
Liegestütz m. Erhöhten Händen & Vereinfachte Variante des Liegestütz & \multirow{4}{\hsize}{Oberkörper-Oberarmwinkel 90°, Neutrale Wirbelsäule. Amplitude beachten!} & \multirow{9}{\hsize}{Verbesserung der Rumpfstabilität in der Sagittalebene unter Last, Training der ventralen Drückerkette (Pectoralis Major, Triceps Brachii, Serratus Anterior)} & *\\
Liegestütz & Klassischer Liegestütz &&& **\\
Liegestütz m. erhöhten Füßen & Erschwerte Liegestützvariante &&& ***\\
&&&&\\
&&&&\\
&&&&\\
&&&&\\\addlinespace[.5em]
Einarmige Liegestütz m. erhöhten Händen & Sportspezifische Rumpfstabilisation unter geringer Last & \multirow{5}{\hsize}{Oberkörper-Oberarmwinkel 90°, Neutrale Wirbelsäule, keine Drehbewegung. Amplitude beachten!} & \multirow{12}{\hsize}{Verbesserung der Rumpfstabilität in der Sagittalebene sowie Anti-rotatorisch um die Longitudinalachse unter Last, Training der ventralen Drückerkette (Pectoralis Major, Triceps Brachii, Serratus Anterior)} & ****\\
Einarmige Liegestütz & Sportspezifische Rumpfstabilisation unter moderater Last &&& *****\\
Einarmige Liegestütz m. erhöhten Füßen & Sportspezifische Rumpfstabilisation unter hoher Last &&& ******\\
&&&&\\
&&&&\\
&&&&\\\addlinespace[.5em]\cmidrule(lr){1-5}
\multicolumn{5}{c}{\sthead{Squat}}\\\cmidrule(lr){1-5}
Step Up & Einstiegsvariante, kann auch beladen werden & Beinachse, aufrechter Oberkörper, Gewichtsverteilung & \multirow{3}{\hsize}{Kräftigung der Knie- und Hüftstreckermuskulatur} & * \\
Petterson Step Up & Step-Up unter Ausschluss der Wadenmuskulatur & Beinachse, aufrechter Oberkörper, Gewichtsverteilung && **\\
Bulgarian Split Squat & Semi-Unilaterale Übung m. Fokus auf das Knie &&& ***\\
Skater Squat & Sportspezifische Unilaterale Übung mit hohen Anforderungen an Rumpfstabilität & \multirow{2}{\hsize}{Beinachse, Rumpfstabilität} & & ****\\
Pistol Squat & Unilaterale Übung mit hohen Anforderungen an Kraft, Mobilität und Rumpfstabilität & && *****\\
Loaded Pistol Squat &&&& ******\\
\bottomrule
\end{tabularx}
\caption{Übungskatalog für das intensive Krafttraining}
\label{tab:strength-exercse}
\end{table*}

\end{document}

tabular with enhancements

The other option would be to rotate the table, hence using the full text height as available width.

8
  • 1
    Thank you, that was a perfect and thorough answer! I'll definitely work through your suggested improvements, that makes sense! Want to have a good laugh? Turns out, what was giving me issues, in the end, was this: \definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8} \definecolor{hellgrau}{rgb}{0.95,0.95,0.95} \rowcolors{1}{dunkelgrau}{hellgrau} Once I removed it (with no other changes than those in my edit), everything showed up as expected.
    – Lukas
    Commented Jul 3, 2015 at 22:03
  • @Lukas Glad it helped. Sorry to confuse things with mention of fullpage. But why should I laugh? Colouring the rows of tabulars is notoriously tricky. And different tabular packages don't agree with each other in ways which are often far from obvious. It is hard to remember what they all even do, never mind which will cause a document to go haywire if combined with which. If you really need coloured rows, ask a new question. Personally, I'd only use them in slides for presentation on screen and only then to a very limited extent. But perhaps that is because it seems like black magic... ;).
    – cfr
    Commented Jul 3, 2015 at 22:10
  • 1
    It does seem like black magic sometimes, does it not? ;)
    – Lukas
    Commented Jul 3, 2015 at 22:12
  • @cfr: Perhaps the last column would look nicer setting it simply as c.
    – Bernard
    Commented Jul 4, 2015 at 19:19
  • @Bernard I considered that initially as that is what I'd normally do but I didn't like it in a table where everything else is aligned left. However, I may just have poorer taste than you ;). Do you really think it looks better that way?
    – cfr
    Commented Jul 4, 2015 at 19:21

You must log in to answer this question.

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