我想在我的回忆录中使用下面的图画:
\begin{figure}[!h]
\centering
\begin{ytableau}
~ & \none & \none & \none & \none \\
\none[\vdots] & \none & \none & \none & \none \\
~ & \none & \none & \none & \none \\
~ & & \none & \none & \none \\
~ & & & \none[\dots] &
\end{ytableau}
\caption{Diagram of $\lambda = (2 + u, 2, 1^v)$}
\end{figure}
我想在前三个案例(表示有 $u$ 个案例)和最左边的三个案例上添加括号编辑:最右边案例(表示有 v 个案例)。我该怎么做?通常的 \left{ 和 \right. 在 \ytableau 中不起作用。
提前致谢!
答案1
如果您不介意调整的话,那么您就不需要额外的包。
\documentclass{article}
\usepackage{ytableau}
\begin{document}
\begin{figure}[!h]
\centering
\begin{tabular}{r@{}l}
\raisebox{-2.5ex}{$u\left\{\vphantom{\begin{array}{c}~\\[6ex] ~
\end{array}}\right.$} &
\begin{ytableau}
~ & \none & \none & \none & \none \\
\none[\vdots] & \none & \none & \none & \none \\
~ & \none & \none & \none & \none \\
~ & & \none & \none & \none \\
~ & & & \none[\dots] &
\end{ytableau}\\[-1.5ex]
&\hspace{3em}$\underbrace{\hspace{4.8em}}_{\displaystyle v}$
\end{tabular}
\caption{Diagram of $\lambda = (2 + u, 2, 1^v)$}
\end{figure}
\end{document}
或者,作为ytableau
负载pgf
,使用可能不会太过牵强tikzmark
,但如果您无论如何都在负载的话,这可能更有意义tikz
。
\documentclass{article}
\usepackage{tikz}
\usepackage{ytableau}
\usetikzlibrary{tikzmark,decorations.pathreplacing}
\begin{document}
\begin{figure}[!h]
\centering
\begin{tabular}{c}
\begin{ytableau}
\tikzmarknode{v1}{~} & \none & \none & \none & \none \\
\none[\vdots] & \none & \none & \none & \none \\
\tikzmarknode{v2}{~} & \none & \none & \none & \none \\
~ & & \none & \none & \none \\
~ & & \tikzmarknode{u1}{~} & \none[\dots] & \tikzmarknode{u2}{~}
\\
\end{ytableau}\\[-1ex]
~
\end{tabular}
\caption{Diagram of $\lambda = (2 + u, 2, 1^v)$}
\begin{tikzpicture}[overlay,remember picture,decoration=brace]
\draw[decorate,thick] ([xshift=-1em,yshift=-0.5em]v2.south west) --
([xshift=-1em,yshift=1em]v1.north west) node[midway,left]{$v$};
\draw[decorate,thick] ([xshift=1em,yshift=-0.75em]u2.south west) --
([xshift=-1em,yshift=-0.75em]u1.south west) node[midway,below]{$u$};
\end{tikzpicture}
\end{figure}
\end{document}
答案2
使用ytableu
有一些优点,但是在您的特定情况下,值得考虑纯tikz
解决方案:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,
calligraphy,% must be loaded after decorations.pathreplacing
matrix}
\begin{document}
\begin{figure}[htb]
\centering
\begin{tikzpicture}[
BC/.style = {decorate, % for fancy calligraphic braces
decoration={calligraphic brace, amplitude=5pt, raise=1mm},
very thick, pen colour={black}
},
]
\matrix (m) [matrix of math nodes,
nodes={draw, minimum size=6mm, anchor=center},
column sep=-\pgflinewidth,
row sep=-\pgflinewidth
]
{
~ & & & & \\
|[draw=none,text height=3mm]| \vdots
& & & & \\
~ & & & & \\
~ & ~ & & & \\
~ & ~ & ~ & |[draw=none]|\dots
& ~ \\
};
\draw[BC] (m-3-1.south west) -- node[left =2.2mm] {$v$} (m-1-1.north west);
\draw[BC] (m-5-5.south east) -- node[below=2.2mm] {$u$} (m-5-3.south west);
\end{tikzpicture}
\caption{Diagram of $\lambda = (2 + u, 2, 1^v)$}
\end{figure}
\end{document}