Graphics, Figures & TablesHelp with a nasty table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
ncant
Posts: 2
Joined: Mon Jun 03, 2024 9:58 pm

Help with a nasty table

Post by ncant »

Hello,
I'm trying to replicate the following table:
Image
At first I was thinking of making it by dividing all the content into single cells, but since there are those numbers enclosed in curly brackets, I told myself it was not very convenient (especially considering the numbers on the left of each curly bracket are actually vertically aligned). Then I thought of dividing the table into "groups" of cells

Code: Select all

\documentclass{article}

\usepackage{multirow}
\usepackage{amsmath}

\title{Table}
\author{Dude}

\begin{document}

\begin{table}[]
\centering
\begin{tabular}{|l|l|l|l|}
\hline
\multicolumn{1}{|c|}{I} & \multicolumn{1}{c|}{\multirow{2}{*}{II}} & \multicolumn{1}{c|}{\multirow{2}{*}{III}} & \multicolumn{1}{c|}{\multirow{2}{*}{IV}} \\ \cline{1-1}
n \qquad l \qquad m & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{} \\ \hline
\multirow{5}{*}{1} & \multirow{14}{*}{} & 1 orbitale & 1 \\ \cline{3-4} 
 &  & 1 orbitale & \multirow{4}{*}{4} \\
 &  & \multirow{3}{*}{3 orbitali} &  \\
 &  &  &  \\
 &  &  &  \\ \cline{1-1} \cline{3-4} 
\multirow{9}{*}{3} &  & 1 orbitale & \multirow{9}{*}{9} \\
 &  & \multirow{3}{*}{3 orbitali} &  \\
 &  &  &  \\
 &  &  &  \\
 &  & \multirow{5}{*}{5 orbitali} &  \\
 &  &  &  \\
 &  &  &  \\
 &  &  &  \\
 &  &  &  \\ \hline
\end{tabular}
\end{table}

\end{document}

, artificially make the n, l, m columns with \qquad and then handle the aligned stuff using the align environment. However, pdfTeX immediately throws out an error saying I can't use it inside a tabular environment. So now I'm stuck.

Any help on how to proceed would be appreciated. Thank you

P.S.: the reason I thought about using the align environment is because I need the braces of the original pic and I also need the numbers aligned.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Help with a nasty table

Post by Stefan Kottwitz »

Hi,
ncant wrote:handle the aligned stuff using the align environment. However, pdfTeX immediately throws out an error saying I can't use it inside a tabular environment.
you could use the aligned environment (in math mode) within the tabular environment.

Good minimal example, just the image cannot be opened. You can also post images as attachment here in the forum. The attachment link is below the text edit field, when editing a post.

Stefan
LaTeX.org admin
Post Reply