13

While using tabularx and multirow I tried to import this table (made with Word) in LaTeX:

table

but it's not really working. It seems as if there isn't enough space for the text, but shouldn't taburlarx take care of this on its own? Even giving an explicit amount of space doesn't solve the problem, as shown in my "work/solution" ;-) until now:

\documentclass[
a4paper, %size of paper
12pt, %font size
twoside,
openright, %start new chapter only on the right side
parskip,
final, %
chapterprefix = false, %Kapitel anschreiben als Kapitel
BCOR=12mm
]{scrreprt}

\usepackage[ngerman, italian, greek]{betababel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{array}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{rotating}

\KOMAoptions{DIV=12}
\newcolumntype{C}{>{\raggedright\arraybackslash}X}

\begin{document}

\begin{tabularx}{1\textwidth}{l|l|C|C|C}
\textbf{Forma} & \textbf{Ogetto} & \textbf{Tipologia orlo} & \textbf{Tecnica di realizzazione dell'orlo} &  \textbf{Organizzazione dello spazio decorato} \\ \hline
\multirow{11}{*}{\begin{sideways}Coppa emisferica\end{sideways}} & BRIT\_01 & \multirow{8}{11\baselineskip }{estroflesso} & \multirow{4}{6\baselineskip}{Strato esterno 3 cm circa più basso di quello interno: fascia priva di decorazione.} & \multirow{5}{8\baselineskip}{Fondo e un registro orizzontale} \\ \cline{2-2}
&BRIT\_02 & & & \\ \cline{2-2}
&GEN\_01 & & & \\\cline{2-2}
&GEN\_02 & & & \\\cline{2-2} \cline{4-4}
& HERM\_02 & & Verosimilmente come i precedenti & \\ \cline{2-2} \cline{4-5}
& ROT\_01& & \multirow{3}{5\baselineskip }{Strato esterno termina appena sotto il labbro dello strato interno: decorazione fino all'orlo.} & Fondo e tre registri orizzontali \\ \cline{2-2} \cline{5-5}
& TAR\_01 & & & Probabile fondo e tre registri orizzontali leggibili \\ \cline{2-2} \cline{5-5}
& TAR\_02 & & & Fondo poco leggibile\\ \cline{2-5}
& COL\_01 & \multirow{3}{4\baselineskip }{dritto} & \multirow{3}{4\baselineskip }{Strati di pari altezza: decorazione fino all'orlo.} & \multirow{2}{2\baselineskip}{Fondo e cinque registri orizzontali}\\ \cline{2-2}
& PILK\_01 & & & \\ \cline{2-2} \cline{5-5}
& YASS\_01 & & & Fondo e campitura geometrica\\ \cline{1-5}
\end{tabularx}

\end{document}
3
  • Have you tried adding some more rows into your table to account for the several \multirows you used?
    – hpesoj626
    Sep 19, 2012 at 9:41
  • you mean empty rows in the end? or line breaks in some cells? (just looked for line breaks, doenst seem that simple...)
    – gregmic
    Sep 19, 2012 at 12:22
  • @gregmic please consider accepting one of the answers provided - even yours would be fine ;) Apr 11, 2019 at 10:21

3 Answers 3

10

enter image description here

multirow needs a little help if the spanning entry is larger than the rows it spans. Also you have use multiples of \baselineskip for the width argument, which seemed wrong.

\documentclass[
a4paper, %size of paper
12pt, %font size
twoside,
openright, %start new chapter only on the right side
parskip,
final, %
chapterprefix = false, %Kapitel anschreiben als Kapitel
BCOR=12mm
]{scrreprt}

\usepackage[ngerman, italian, greek]{betababel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{array}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{rotating}

\KOMAoptions{DIV=12}
\newcolumntype{C}{>{\raggedright\arraybackslash}X}
\begin{document}

\setlength\extrarowheight{7pt}
\begin{tabularx}{1\textwidth}{l|l|C|C|C}
\textbf{Forma} & \textbf{Ogetto} & \textbf{Tipologia orlo} & \textbf{Tecnica di realizzazione dell'orlo} &  \textbf{Organizzazione dello spazio decorato} \\ \hline
\multirow{11}{*}{\begin{sideways}Coppa emisferica\end{sideways}} & BRIT\_01 & \multirow{8}{\hsize}{estroflesso} & \multirow{4}{\hsize}{Strato esterno 3 cm circa più basso di quello interno: fascia priva di decorazione.} & \multirow{5}{\hsize}{Fondo e un registro orizzontale} \\ \cline{2-2}
&BRIT\_02 & & & \\ \cline{2-2}
&GEN\_01 & & & \\\cline{2-2}
&GEN\_02 & & & \\\cline{2-2} \cline{4-4}
& HERM\_02 & & Verosimilmente come i precedenti & \\ \cline{2-2} \cline{4-5}
& ROT\_01& & \multirow{3}{\hsize}{Strato esterno termina appena sotto il labbro dello strato interno: decorazione fino all'orlo.} & Fondo e tre registri orizzontali \\ \cline{2-2} \cline{5-5}
& TAR\_01 & & & Probabile fondo e tre registri orizzontali leggibili \\ \cline{2-2} \cline{5-5}
& TAR\_02 & & & Fondo poco leggibile\\ \cline{2-5}
& COL\_01 & \multirow{3}{\hsize}{dritto} & \multirow{3}{\hsize}{Strati di pari altezza: decorazione fino all'orlo.} & \multirow{2}{\hsize}{Fondo e cinque registri orizzontali}\\ \cline{2-2}
& PILK\_01 & & & \\ \cline{2-2} \cline{5-5}
& YASS\_01 & & & Fondo e campitura geometrica\\ \cline{1-5}
\end{tabularx}

\end{document}
1
  • Thank you a lot David :-) that looks really good. With 4\baselineskip I tried to tell him to use the space of 4 rows. How can you now change the spacing inside the table, i.e. centering the head lines (put Forma, Ogetto and Tipologia orlo in the second row), and let all the entries have the same space above the text to the border of the cell ("Strato esterno 3cm ..." starts right under the cell, where all the other entries have some spacing over the text)?
    – gregmic
    Sep 19, 2012 at 10:20
3

After five years ... an alternative employed makecell:

enter image description here

\documentclass[
a4paper, %size of paper
12pt, %font size
twoside,
openright, %start new chapter only on the right side
parskip,
final, %
chapterprefix = false, %Kapitel anschreiben als Kapitel
BCOR=12mm
]{scrreprt}

%\usepackage[ngerman, italian, greek]{betababel}
\usepackage[utf8]{inputenc}
%\usepackage{graphicx}
\usepackage{array, makecell, multirow, tabularx}
\renewcommand\theadfont{\normalsize\bfseries}

\KOMAoptions{DIV=12}
\newcolumntype{C}{>{\raggedright\arraybackslash}X}
\begin{document}

\setlength\extrarowheight{7pt}
\settowidth\rotheadsize{Coppa emisferica}
\begin{tabularx}{\textwidth}{l|l|l|C|C}
\thead[b]{Forma} 
    &   \thead[b]{Ogetto}
        &   \thead[b]{Tipologia\\ orlo}
            &   \thead[b]{Tecnica di\\ realizzazione\\ dell'orlo}
                &  \thead[b]{Organizzazione\\ dello spazio\\ decorato}         \\
    \hline
\multirow{11}{*}{\rotcell{Coppa emisferica}}
    & BRIT\_01
        &   \multirow{12}{*}{estroflesso}
            &   \multirow{4}{=}{Strato esterno 3 cm circa più basso di quello interno: fascia priva di decorazione.}
                &   \multirow{6}{=}{Fondo e un registro orizzontale}        \\
    \cline{2-2}
    &   BRIT\_02    &   &   &                                               \\
    \cline{2-2}
    &   GEN\_01     &   &   &                                               \\
    \cline{2-2}
    &   GEN\_02     &   &   &                                               \\
    \cline{2-2} \cline{4-4}
    &   HERM\_02
        &   &   Verosimilmente come i precedenti
                &                                                           \\
    \cline{2-2} \cline{4-5}
    &   ROT\_01
        &   &   \multirow{5}{=}{Strato esterno termina appena sotto il labbro dello strato interno: decorazione fino all'orlo.}
                &   Fondo e tre registri orizzontali                        \\
    \cline{2-2} \cline{5-5}
    &   TAR\_01
        &   &   &   Probabile fondo e tre registri orizzontali leggibili    \\
    \cline{2-2} \cline{5-5}
    &   TAR\_02
        &   &   &   Fondo poco leggibile                                    \\
    \cline{2-5}
    &   COL\_01
        & \multirow{3}{*}{dritto}
            & \multirow{4}{=}{Strati di pari altezza: decorazione fino all'orlo.}
                & \multirow{2}{=}{Fondo e cinque registri orizzontali}      \\
    \cline{2-2}
    & PILK\_01  &   &   &                                                   \\
    \cline{2-2} \cline{5-5}
    & YASS\_01  &   &   &   Fondo e campitura geometrica                    \\
    \cline{1-5}
\end{tabularx}

\end{document}
1

All right, thank you guys a lot :-) using some empty cells, as @hpesoj626 suggested together with the code provided by @David Carlisle gives me just what I wanted :-) only remaining thing: putting Forma, Ogetto and Tipologia orlo as titles in the second row. but I will figure that out (but that isn't really that important). So, here my final code with a picture of the result: enter image description here

\begin{tabularx}{1\textwidth}{l|l|C|C|C}
\textbf{Forma} & \textbf{Ogetto} & \textbf{Tipologia orlo} & \textbf{Tecnica di realizzazione dell'orlo} &  \textbf{Organizzazione dello spazio decorato} \\ \hline
\multirow{11}{*}{\begin{sideways}Coppa emisferica\end{sideways}} & BRIT\_01 & \multirow{8}{\hsize}{estroflesso} & \multirow{4}{\hsize}{Strato esterno 3 cm circa più basso di quello interno: fascia priva di decorazione.} & \multirow{5}{\hsize}{Fondo e un registro orizzontale} \\ \cline{2-2}
&BRIT\_02& & & \\ \cline{2-2}
&GEN\_01 & & & \\
& & & & \\ \cline{2-2}
&GEN\_02 & & & \\    & & & & \\ \cline{2-2} \cline{4-4}
& HERM\_02 & & Verosimilmente come i precedenti & \\ \cline{2-2} \cline{4-5}
& ROT\_01& & \multirow{3}{\hsize}{Strato esterno termina appena sotto il labbro dello strato interno: decorazione fino all'orlo.} & Fondo e tre registri orizzontali \\ \cline{2-2} \cline{5-5}
& TAR\_01 & & & Probabile fondo e tre registri orizzontali leggibili \\ \cline{2-2} \cline{5-5}
& TAR\_02 & & & Fondo poco leggibile\\ \cline{2-5}
& COL\_01 & \multirow{3}{\hsize}{dritto} & \multirow{3}{\hsize}{Strati di pari altezza: decorazione fino all'orlo.} & \multirow{2}{\hsize}{Fondo e cinque registri orizzontali}\\ 
& & & & \\ \cline{2-2}
& PILK\_01 & & & \\ \cline{2-2} \cline{5-5}
& YASS\_01 & & & Fondo e campitura geometrica\\ \cline{1-5}
\end{tabularx}

You must log in to answer this question.

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