我尝试使用bigdelim
和multirow
包重现下图,但第一个括号包含$\mathbb{C}$ Complejos
因为与第二个括号重叠,因此出现了问题$\mathbb{R}$ Reales
。我尝试修复它,但无法将列放在正确的位置。
这是我的尝试
\documentclass{minimal}
\usepackage{multirow,bigdelim}
\usepackage{amsmath, amssymb}
\begin{document}
\begin{tabular}{llllll}
\ldelim\{{9}{3mm}[$\mathbb{C}$ Complejos] & \ldelim\{{8}{3mm}[$\mathbb{R}$ Reales] & \ldelim\{{7}{3mm}[$\mathbb{Q}$ Racionales] & \ldelim\{{6}{3mm}[$\mathbb{Z}$ Enteros] & \ldelim\{{2}{3mm}[$\mathbb{N}$ Naturales] & $\mathbb{P}$ Primos \\
& & & & & Compuestos \\
& & & & & \\
& & & & $\{0\}$ & \\
& & & & & \\
& & & & $\mathbb{Z}^-$ Enteros negativos & \\
& & & Fraccionarios & & \\
& & $\mathbb{I}$ Irracionales & & & \\
& Imaginarios & & & & \\
\end{tabular}
\end{document}
这就是我得到的结果。如您所见,前两列重叠,并且最后一列还有一个额外的空格。代码需要进行哪些更改?
答案1
稍微修正一下你的代码:
\documentclass{minimal}
\usepackage{multirow,bigdelim}
\usepackage{amssymb}% added
\begin{document}
\begin{tabular}{p{24mm}l p{24mm}l l@{\hspace{-7ex}}l}% changed
\ldelim\{{9}{3mm}[$\mathbb{C}$ Complejos]
& \ldelim\{{8}{3mm}[$\mathbb{R}$ Reales]
& \ldelim\{{7}{3mm}[$\mathbb{Q}$ Racionales]
& \ldelim\{{6}{3mm}[$\mathbb{Z}$ Enteros]
& \ldelim\{{2}{3mm}[$\mathbb{N}$ Naturales]
& $\mathbb{P}$ Primos \\
& & & & & Compuestos \\
& & & & & \\
& & & & $\{0\}$ & \\
& & & & & \\
& & & & $\mathbb{Z}^-$ Enteros negativos & \\
& & & Fraccionarios & & \\
& & $\mathbb{I}$ Irracionales & & & \\
& Imaginarios & & & & \\
\end{tabular}
\end{document}
如图tikz
(编辑版本):
\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{calc,
decorations.pathmorphing,%
calligraphy,% had to be after decorations.pathreplacing
positioning,
}
\usepackage{amssymb,bbm}
\begin{document}
\begin{tikzpicture}[
node distance=0mm and 3mm,
every node/.style = {minimum height=4mm, text depth=0.3ex, inner sep=1pt, align=left},
BC/.style = {decorate,
decoration={calligraphic brace, amplitude=6pt,
mirror},
very thick,
pen colour={red}
},
]
\node (n1) {$\mathbb{C}$ Complejos};
\node (n2) [above right=of n1] {$\mathbb{R}$ Reales};
\node (n3) [above right=of n2] {$\mathbb{Q}$ Racionales};
\node (n4) [above right=of n3] {$\mathbb{Z}$ Enteros};
\node (n5) [above right=of n4] {$\mathbb{N}$ Naturales};
\node (n6) [right=of n5] {$\mathbb{P}$ Primos \\
Compuestos};
\path let \p1 = (n1.east),
\p2 = (n6.north west),
\n1 = {veclen(\y2-\y1,\x2-\x1)} in
coordinate[below=\y2-\y1 of n1.east -| n2.west] (c1);
\node (n7) [above right=of c1 -| n1.east]
{Imaginarios};
\node (n8) [above right=4mm and 3mm of n7.north -| n2.east]
{$\mathbb{I}$ Irracionales};
\node (n9) [above right=4mm and 3mm of n8.north -| n3.east]
{Fraccionarios};
\node (n10) [right=of n4] {$\{0\}$};
\node (n11) [right=of n3 -| n4.east]
{$\mathbb{Z}^-$ Enteros negativos};
%
\draw[BC] (n6.north -| n2.west) -- (c1);
\draw[BC] (n6.north -| n3.west) -- (n8.south west);
\draw[BC] (n6.north -| n4.west) -- (n9.south west);
\draw[BC] (n6.north -| n5.west) -- (n11.south west);
\draw[BC] (n6.north west) -- (n6.south west);
\end{tikzpicture}
\end{document}
答案2
最近,我发现了这个简单的cases
环境解决方案
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{displaymath}
\mathbb{C}\text{ Complejos}
\begin{cases}
\mathbb{R}\text{ Reales}
\begin{cases}
\mathbb{Q}\text{ Racionales}
\begin{cases}
\mathbb{Z}\text{ Enteros}
\begin{cases}
\mathbb{N}\text{ Naturales}
\begin{cases}
\mathbb{P}\text{ Primos} \\
\text{Compuestos}
\end{cases} \\
\{0\} \\[2ex]
\mathbb{Z}^-\text{ Enteros Negativos}
\end{cases} \\
\text{Fraccionarios}
\end{cases} \\
\text{Irracionales}
\end{cases} \\
\text{Imaginarios}
\end{cases}
\end{displaymath}
\end{document}
答案3
定义一个合适的环境,然后顺其自然。
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{amssymb}
\newenvironment{textbrace}
{$\renewcommand{\arraystretch}{1.5}\left\lbrace\begin{tabular}{@{}l@{}}}
{\end{tabular}\right.$}
\begin{document}
\begin{table}
\centering\small
$\mathbb{C}$ Complejos
\begin{textbrace}
$\mathbb{R}$ Reales
\begin{textbrace}
$\mathbb{Q}$ Racionales
\begin{textbrace}
$\mathbb{Z}$ Enteros
\begin{textbrace}
$\mathbb{N}$ Naturales
\begin{textbrace}
Primos
\\
Compuestos
\end{textbrace}
\\
$\{0\}$ Cero
\\
Enteros negativos
\end{textbrace}
\\
Fraccionarios
\end{textbrace}
\\
$\mathbb{I}$ Irracionales
\end{textbrace}
\\
Imaginarios
\end{textbrace}
\caption{Jerarquía de números}
\end{table}
\end{document}