2

I try to create a table like to one here:

enter image description here

I tried many options with \multirow and \multicolumn, however, after few hours I'm not even close to the final result.

Any ideas how could I achieve this?

Werner
  • 603,163
Jakub
  • 193
  • Can you provide the code you treid up to now? Did you use the package multirow and the command \multicolumn? – knut Oct 16 '13 at 19:35
  • I tried different solutions and the current code is not event close to the result I need to achieve. Yes, I do ude multirow package and multicolumn command. – Jakub Oct 16 '13 at 19:48

1 Answers1

1

You haven't provided any information regarding important parameters such as the width of the text block and the intended font size for the words in the table. The following example should only be considered to be a starting-off point for further work by you.

Note the use of the tabularx package, the \arraystretch command, the multirow package and three \multirow instructions, several \cline instructions, one \multicolumn instruction, and the \small instruction to enable the table to fit in what some (many?) might consider to be a standard-width text block.

enter image description here

\documentclass{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{multirow,tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\renewcommand\arraystretch{2}
\renewcommand{\tabcolsep}{5pt} % default is 6pt
\begin{document}
\begin{table}
\small
\caption{A table with multiple multirows}
\begin{tabularx}{\textwidth}{|c|c|c|*{8}{Y|}}
\hline
\multicolumn{3}{|c|}{} & no & more & less & part of & reverse & other than & early & late\\
\hline
\multirow{6}{*}{Create} &
  \multirow{3}{*}{Internal data} & Simple Item &&&&&&&&\\
\cline{3-11}
& & Compound Item &&&&&&&& \\
\cline{3-11}
& & Set &&&&&&&& \\
\cline{2-11}
& \multirow{3}{*}{External data} & Simple Item &&&&&&&&\\
\cline{3-11}
& & Compound Item &&&&&&&& \\
\cline{3-11}
& & Set &&&&&&&& \\
\hline
\end{tabularx}
\end{table}
\end{document}
Mico
  • 506,678
  • Thanks! This looks much better than my approaches :) I need to put text into the cells of the table (the text might be pretty long on some cases, like 100 characters). Now it looks that the cells cannot handle long strings. – Jakub Oct 16 '13 at 20:48
  • @Jakub - The material in columns 4 thru 11 will be wrapped automatically because of the use of the Y column type. However, if what you need to enter long, unbroken strings, then the use of this column type isn't going to help you appreciably. You will probably need to set the table in landscape mode to gain some more space and/or switch to a smaller font size (say, \footnotesize). You could also try reducing the value of \tabcolsep a bit more, say to 3pt. Not knowing more details about your table's contents, I'm afraid I can't provide more-specific advice. – Mico Oct 16 '13 at 20:51
  • I tried the landscape mode and tabcolsep but it did not help. I'm trying to achieve something like this: https://www.dropbox.com/s/3iy1h0wtynhq74y/table.jpg

    Thanks for you help!

    – Jakub Oct 17 '13 at 16:32
  • @Jakub - Please be a bit more specific about what you mean by "... did not help." Are the cells still not large enough for your purpose, or is there a different issue? Incidentally, I can't help but remark that the table design you're looking to implement is rather oppressive. Do you aspire to have your readers remember three (and maybe more) concrete pieces of information from reading the table? If so, please try hard to simplify the design. As it stands, your table is most likely to be remembered merely as "Oh yeah, a really confusing and mindboggling table - can't remember its contents". – Mico Oct 17 '13 at 17:57