TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following this question: I want to create an environment for a table with the following specifications:

The left column is a vertically centered rotated text, saying Övning. The right column contains paragraphs of text, so I want an empty line for each paragraph (as if I'm using \usepackage[parfill]{parskip}) and \\ to just give me a line break.

The previous question fixed the paragraph issue but broke the centering for the left column. Also, if I use line breaks

Here's my environment now:


  \advance\parskip by 0pt plus 2pt
   \setlength{\parfillskip}{30pt plus 1fil}}p{#1}}

    \begin{tabular}{m{0.05\textwidth}|P{0.85\textwidth}}   # using m in the second column gives back the vertical centering
    \rotatebox{90}{\textbf{Övning}} & \textbf{#1}

I can use it like so:

Övningen finns under Warmup-1 $\rightarrow$ makes10.

Du är given två heltal, \texttt{a} och \texttt{b} som parametrar. Skriv en funktion som returnerar \texttt{True} om ett av talen är 10 eller om summan av dem är 10.

\texttt{makes10(9, 10)} $\rightarrow$ \texttt{True}

\texttt{makes10(9, 9)}  $\rightarrow$ \texttt{False}

\texttt{makes10(1, 9)}  $\rightarrow$ \texttt{True}

This produces the following resultenter image description here:

However, if I introduce line breaks, like so:

\texttt{makes10(9, 10)} $\rightarrow$ \texttt{True} \\
\texttt{makes10(9, 9)}  $\rightarrow$ \texttt{False} \\
\texttt{makes10(1, 9)}  $\rightarrow$ \texttt{True} \\

Then it breaks my table:

enter image description here

So, I want to be able to use line/paragraph breaks in the right column as usual and I want the text in the vertical column to be centered.

I'm using xelatex with polyglossia (this caused an issue in the previous question).

share|improve this question
up vote 3 down vote accepted

\\ ends the current row. With \newline instead of \\ it works as expected.

For vertical centering, use an m column also in your own definition:

  \advance\parskip by 0pt plus 2pt
   \setlength{\parfillskip}{30pt plus 1fil}}m{#1}}
share|improve this answer
Thank you so much! Accepted. – pg-robban Aug 28 '11 at 16:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.