1

I have a problem with one of my tables. My table with the Problem As you can see on the left side the text is going out of bounds. I have tried many different things and nothing worked so far.

My code:

\documentclass{article}

\usepackage{rotating}
\usepackage{multirow}

\begin{document}
\begin{tabular}{c|p{0.40\textwidth}|p{0.50\textwidth}}
& \textbf{Vorteile} & \textbf{Nachteile} \\\hline
\multirow{3}{*}{\begin{sideways}\textbf{Kundensicht}\end{sideways}} & Jederzeit und überall verfügbar & fehlender physischer Kontakt mit den Produkten\\
& Unabhängig von Öffnungszeiten & Mindestbestellwert und zusätzliche Kosten\\
& Markttransparenz & Sicherheit bei der Zahlungsabwicklung \\\hline
\multirow{3}{*}{\begin{sideways}\textbf{Anbietersicht}\end{sideways}} & globale Präsenz & hoher technischer Aufwand\\
& Gewinnung von Kundendaten & kein schneller ROI \\
& Cross-/Up-Selling & Abhängigkeit von Google\\\hline
\end{tabular}
\end{document}

I saw possibilities to change the height manually but it was always for the entire table, and as you can see, the top row does not need more space. After three hours of searching for possibilities to chance it and trying them out, I give up.

What I would like to have is, that the text on the left side fits perfectly, sideways and is centered in the cell and the text to its right is distributed equally in its cell, as well.

If anyone has any idea and could help me out, I would really appreciate it!

  • 2
    Welcome to TeX.SE. Please post a compilable document, not just fragments! – user31729 Mar 19 '17 at 18:33
  • You can add space by inserting a \newline in one of the parboxes. Note that this is an ugly way to do it. Another way (which only looks good without verticle lines) would be to place a \noalign{\vspace{1cm}} just before the \hline. – Skillmon Mar 19 '17 at 18:38
  • Related/duplicate: How to make TeX fit rotated text into table cell? – Werner Mar 19 '17 at 18:44
2

enter image description here

Since you not provide complete small document with your table, below is only snippet from my table testbed :)

\usepackage{makecell}
\renewcommand\theadfont{\bfseries\normalsize}

\begin{tabular}{c|m{0.40\textwidth}|m{0.50\textwidth}}
    & \textbf{Vorteile}                 & \textbf{Nachteile}            \\
    \hline
\settowidth\rotheadsize{\theadfont Kundensichte}
\rothead{Kundensicht}
    &   \makecell[l]{Jederzeit und überall verfügbar\\
        Unabhängig von Öffnungszeiten               \\
        Markttransparenz} 
        &   \makecell[l]{Fehlender physischer Kontakt mit den Produkten \\
             Mindestbestellwert und zusätzliche Kosten                  \\
            Sicherheit bei der Zahlungsabwicklung}  \\
        \hline
\settowidth\rotheadsize{\theadfont Anbietersicht}
\rothead{Anbietersicht}
    &   \makecell[l]{globale Präsenz              \\
                     Gewinnung von Kundendaten    \\
                     Cross-/Up-Selling}  
        &   \makecell[l]{hoher technischer Aufwand     \\
                         kein schneller ROI            \\
                         Abhängigkeit von Google}   \\
    \hline
\end{tabular}

Edit:

Of course you can define new command for rotate cell content. For example, like this:

\newcommand\RH[1]{% RotHead (with online measurement of cell height) ...
                  \settowidth\rotheadsize{\theadfont #1}
                  \rothead{#1}}

and then instead

\settowidth\rotheadsize{\theadfont Kundensichte}
\rothead{Kundensicht}

use it in above table as

\RH{Kundensicht}
  • below is only sniped from my table testbed :) Good one :) – Dr. Manuel Kuehner Mar 19 '17 at 19:58
  • 1
    huh, spelling errors ... snippet is correct. Preamble of my "table testbed" contain many to this case irrelevant packages in I was to lazy to remove them and form own MWE ... and OP not provide MWE and ... I have some more excuses :-). Sorry for any inconvenience. – Zarko Mar 19 '17 at 20:13

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.