Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to render a table with results of experiments. There are 6 experiments (multirows) described by 2 columns and each of them is performed 5 times (rows).

My code:

\begin{tabular}{l r | l || r r}
Vzorka & Výskyty & Algoritmus & Porovnania & Prístupy \\ \hline 
\multirow{5}{*}{Gabriel} & \multirow{5}{*}{8}
& NAIVE BINARY          & 158   & 44 \\
& NAIVE BINARY_LCP      & 174   & 92 \\
& NAIVE INTERPOLATION   & 168   & 78 \\
& LESS NAIVE BINARY     & 98    & 26 \\
& LESS NAIVE BINARY_LCP & 124   & 58 \\ \hline
...
\end{tabular}

This code produces what I want only for the first row:

The output of above code

successful rows after the first one are shifted and overlapping the "8" number. Can you please help me?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

I believe your problem is that you didn't put enough empty cells for the following lines. A multirow will allow content to occupy space, but doesn't actually create the cells that are under it. I rewrote your code aligning everything to illustrate that.

\begin{tabular}{l r | l || r r}
Vzorka & Výskyty & Algoritmus & Porovnania & Prístupy \\ \hline 
\multirow{5}{*}{Gabriel} & \multirow{5}{*}{8} & NAIVE BINARY          & 158   & 44 \\
                         &                    & NAIVE BINARY_LCP      & 174   & 92 \\
                         &                    & NAIVE INTERPOLATION   & 168   & 78 \\
                         &                    & LESS NAIVE BINARY     & 98    & 26 \\
                         &                    & LESS NAIVE BINARY_LCP & 124   & 58 \\ \hline
\end{tabular}
share|improve this answer
    
Thank you! Actually my formatting made me add more ampersands on the first row as well, so it didn't work... Thanks again:). –  Gabriel Ščerbák Jun 27 '11 at 16:22

Your Answer

 
discard

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.