4

I would like to make a table containing Young diagrams and some other text. Also I would like some of the diagrams to have subscripts or superscripts. Here is my first attempt. Does anyone know how to make it look better?

\documentclass[epic,11pt]{article}
 \usepackage{ytableau}
\begin{document}
\[ \begin{tabular}{|c|c|c|} \hline
$\emptyset$&$\ydiagram{ 1}$ &$\ydiagram{ 2}$ 
\\ \hline text &  &  $\ydiagram{ 2}^+  $  \\
  \hline
\end{tabular}\]\end{document}

enter image description here

1

3 Answers 3

4

I'd not use caged tables, see the second realization.

\documentclass[11pt]{article}
\usepackage[aligntableaux=center]{ytableau}
\usepackage{booktabs}
\usepackage{mathtools}
\usepackage{array}

\newcommand{\ydiagramstrut}{%
  \sbox0{\ydiagram{1}}%
  \vrule width 0pt
         height \dimexpr\ht0 + 3pt \relax
         depth  \dimexpr\dp0 + 3pt \relax
}

\begin{document}
\[
\begin{tabular}{|>{\ydiagramstrut}c|c|l|}
\hline
$\emptyset$ & \ydiagram{1} & \ydiagram{2} \\
\hline
text &  &  $\ydiagram{2}^{+}$ \\
\hline
\end{tabular}
\]

\[
\begin{tabular}{ccc}
\toprule
$\emptyset$ & \ydiagram{ 1} & \ydiagram{ 2} \\
\addlinespace
text &  &  $\ydiagram{ 2}^{\mathrlap{+}}$  \\
\bottomrule
\end{tabular}
\]

\end{document}

In the first case, I add to each row with a Young tableau a suitable strut. This is not necessary in the second case.

enter image description here

If, for some reasons, you don't want the tableaux always vertically centered, you can set them so locally.

\documentclass[11pt]{article}
\usepackage{ytableau}
\usepackage{booktabs}
\usepackage{mathtools}
\usepackage{array}

\newcommand{\ydiagramstrut}{%
  \sbox0{\ydiagram{1}}%
  \vrule width 0pt
         height \dimexpr\ht0 + 3pt \relax
         depth  \dimexpr\dp0 + 3pt \relax
}

\begin{document}
\[
\ytableausetup{centertableaux}
\begin{tabular}{|>{\ydiagramstrut}c|c|l|}
\hline
$\emptyset$ & \ydiagram{1} & \ydiagram{2} \\
\hline
text &  &  $\ydiagram{2}^{+}$ \\
\hline
\end{tabular}
\]

\[
\ytableausetup{centertableaux}
\begin{tabular}{ccc}
\toprule
$\emptyset$ & \ydiagram{ 1} & \ydiagram{ 2} \\
\addlinespace
text &  &  $\ydiagram{ 2}^{\mathrlap{+}}$  \\
\bottomrule
\end{tabular}
\]

\end{document}

By the way, the epic option to \documentclass just issues a warning that the option is unused. Remove it.

3

I just use the setting proposed by @samcarter_is_at_topanswers.xyz combined with tabularray.

\documentclass[epic,11pt]{article}
\usepackage[aligntableaux=center]{ytableau}
\usepackage{tabularray}

\begin{document}

\begin{tblr}{|c|c|l|} \hline
$\emptyset$&$\ydiagram{ 1}$ &$\ydiagram{ 2}$ 
\\ \hline text &  &  $\ydiagram{ 2}^+  $  \\
  \hline
\end{tblr}

\end{document}

enter image description here

2

You might get a better alignment if you use a left aligned third column instead of a center column.

It might also be worth testing the aligntableaux=center package option to get a nicer vertical alignment:

\documentclass{article}
\usepackage[aligntableaux=center]{ytableau}
\begin{document}
\begin{tabular}{|c|c|l|} \hline
$\emptyset$&$\ydiagram{ 1}$ &$\ydiagram{ 2}$ 
\\ \hline text &  &  $\ydiagram{ 2}^+  $  \\
  \hline
\end{tabular}
\end{document}

You must log in to answer this question.

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