Graphics, Figures & TablesDouble entrance tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gigiovena
Posts: 3
Joined: Sun Aug 22, 2021 4:11 pm

Double entrance tables

Post by gigiovena »

Hi to everyone,
I have to make a table as in the png example below.
tabella.PNG
tabella.PNG (6.77 KiB) Viewed 3460 times
Sincerly, i tried in many ways and with some online converter but i can't find a feasible solution.
Is there anyone who can help me, please?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Double entrance tables

Post by Stefan Kottwitz »

Hi,

welcome to the forum!
i tried in many ways
And what was not working? Can you perhaps post your code here and we help improving it?

Stefan
LaTeX.org admin
gigiovena
Posts: 3
Joined: Sun Aug 22, 2021 4:11 pm

Double entrance tables

Post by gigiovena »

Thanks for the welcome! And sorry if I didn't post the code right away.
The code that returns me the best result is the following one:

Code: Select all

% \usepackage{makecell}
% \usepackage{graphicx}
% \usepackage{multirow}


\begin{table}[H]
\centering
\caption{cap}
\resizebox{\linewidth}{!}{%
\begin{tabular}{|c|c|cc|c|c|c|} 
\cline{3-7}
\multicolumn{1}{c}{} & & \multicolumn{5}{c|}{\textbf{Text 1}} \\ 
\cline{3-7}
\multicolumn{1}{c}{} & & \multicolumn{1}{c|}{AAAAAA} & BBBBBB & CCCCC & DDDDDD & EEEEEE \\ 
\hline
\multirow{5}{*}{\rotcell{A long sentence that isn't put in the cell in a nice way}} & aaaaaaa  & \multicolumn{1}{c|}{A} & & & & \\ 
\cline{2-3}
  & bbbbbbb & & B & & & \\ 
\cline{2-4}
  & cccccccc & & \multicolumn{1}{c}{} & C & & \\ 
\cline{2-5}
  & dddddddd & & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & D & \\ 
\cline{2-6}
  & eeeeeee  & & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & E \\
\hline
\end{tabular}
}
\end{table}
The result is in the figure.
tabella.PNG
tabella.PNG (21.72 KiB) Viewed 3436 times
As you can see, the multirow cell is not headed very well and it's too large for me and I don't know why.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Double entrance tables

Post by Stefan Kottwitz »

Thank you for posting the code! I'm too tired and can look at it tomorrow. Perhaps somebody else is faster.

Stefan
LaTeX.org admin
gigiovena
Posts: 3
Joined: Sun Aug 22, 2021 4:11 pm

Double entrance tables

Post by gigiovena »

Ok, thanks, I'll wait because i don't understand how to fix the problem.
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Double entrance tables

Post by Bartman »

A complete Infominimal working example would save us guessing and may even allow compilation in the forum.

According to the manual, the \rotcell command requires the rotating package to enable rotation and a (local) change of \rotheadsize sets the width of the cell.

Another solution: Using the \rotatebox and \parbox commands would work without the makecell package.

OT: You can replace the table by the minipage environment and the \captionof command if you don't want the table to float. At least with one of the standard classes, the caption package must be loaded to use the command.
Post Reply