0

I need to vertical center the name of month on a table with 3 column. I need to vertical center on the firs column, in the middle of the 2 or 3 lines. I don't understand the documentation of the package.

       %----------------------------------------------------
        \begin{tabular}{@{}llr@{}} 
            \toprule
           %\multirow{2}{*}{A}
            %\multirow{2}{4em}{marzo}\\ 
         16&ore 21.00&Bla bla bla\\
   \multirow{2}{0 em}{marzo}\\ 
            31 &ore 18.00&bla bla bla\\
     \cmidrule(r){1-2} %---- crea una linea fra le prime due colonne
            01 aprile&ore 10.00&bla bla bla\\
            20 &ore 21.00&bla bla bla\\
             \cmidrule(r){1-2}
            05 maggio&ore 18:00&bla bla bla\\
            06 &ore 10:00&bla bla bla\\
           \cmidrule(r){1-2}
            02 giugno&ore 21:00&bla bla bla\\
            03 & &\emph{bla bla bla}\\
            15 &ore 18:00&bla bla bla\\
\bottomrule
        \end{tabular}
%-------------------------------------------

Can someone give me an example?

  • 1
    Which table environment are you using? What have you tried already? Maybe give some lines of what you have up untill now – Foitn Mar 14 '18 at 12:06
  • without see example of your table (in form of complete but small document begining with \documentclass{...} and ending with `\end{document} containing only necessary packages and your table, we cant help you. – Zarko Mar 14 '18 at 12:16
2

Is this what you had in mind:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{booktabs,multirow}
\begin{document}
\begin{tabular}{ccccl}
\toprule
16 & \multirow{2}{*}{March}   & ore 21.00  &Bla bla bla\\
31 &                          & ore 18.00  &bla bla bla\\
\midrule
01 & \multirow{2}{*}{April} &ore 10.00 &bla bla bla\\
20 &                        &ore 21.00 &bla bla bla\\
\bottomrule
\end{tabular}
\end{document}

enter image description here

| improve this answer | |
4

I'm not sure this is what you want to achieve.

The \multirow command has this syntax:

\multirow{number_of_rows}{width}{contents}

If you put * for the width, the content's natural width is taken.

\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\begin{document}
    \begin{tabular}{@{}llll@{}} 
        \toprule
        \multirow{2}{*}{marzo} & 16 & ore 21.00 & Bla bla bla\\
                               & 31 & ore 18.00 & bla bla bla\\
        \cmidrule(r){1-3}
        \multirow{2}{*}{aprile} & 01 & ore 10.00 & bla bla bla\\
                                & 20 & ore 21.00 & bla bla bla\\
        \cmidrule(r){1-3}
        \multirow{2}{*}{maggio} & 05 & ore 18:00 & bla bla bla\\
                                & 06 & ore 10:00 & bla bla bla\\
        \cmidrule(r){1-3}
        \multirow{3}{*}{giugno} & 02 & ore 21:00 & bla bla bla\\
                                & 03 &           & \emph{bla bla bla}\\
                                & 15 & ore 18:00 & bla bla bla\\
        \bottomrule
    \end{tabular}
\end{document}

enter image description here

| improve this answer | |

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.