
다음과 같은 공식이나 그림을 만들고 싶습니다.
pmatrix
간단하게 환경과 명령 으로 시도해 보았 \boxed
으나 간격이 끔찍해 보였습니다. TikZ를 사용하면 가능할 것 같지만 그것에 대해 아는 바는 많지 않습니다.
편집하다:
오른쪽에 대해 지금까지 얻은 내용은 다음과 같습니다.
\documentclass{article}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows,matrix,positioning}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of math nodes,left delimiter=(,right delimiter=)] (m)
{
A_1 & \phantom{A_1} & \phantom{A_1} & \\
\phantom{A_1} & \phantom{A_1} & & \\
\phantom{A_1} & & A_2 & \\
& & & A_2 & \phantom{A_3}\\
& & & \phantom{A_2} & A_3 \\
};
\draw (m-1-1.north west) -- (m-1-2.north east) -- (m-2-2.south east) -- (m-2-1.south west) -- (m-1-1.north west);
\draw (m-3-3.north west) -- (m-3-3.north east) -- (m-3-3.south east) -- (m-3-3.south west) -- (m-3-3.north west);
\draw (m-4-4.north west) -- (m-4-4.north east) -- (m-4-4.south east) -- (m-4-4.south west) -- (m-4-4.north west);
\draw (m-1-1.north west) -- (m-1-3.north east) -- (m-3-3.south east) -- (m-3-1.south west) -- (m-1-1.north west);
\draw (m-5-5.north west) -- (m-5-5.north east) -- (m-5-5.south east) -- (m-5-5.south west) -- (m-5-5.north west);
\draw (m-4-4.north west) -- (m-4-5.north east) -- (m-5-5.south east) -- (m-5-4.south west) -- (m-4-4.north west);
\end{tikzpicture}
\end{document}
내가 이루고 싶은 것은
- 정사각형 상자,
$A_1$
상자 중앙에$2\times 2$
,- 또한 왼쪽과
$\subset$
중앙에 표지판이 있습니다.
댓글: 이 질문의 형식을 잘못 지정했는지 전혀 모르겠습니다.
답변1
TikZ 솔루션:
\documentclass{article}
\usepackage{amsmath,tikz}
\usetikzlibrary{matrix}
\begin{document}
\[
\begin{tikzpicture}[baseline=(current bounding box.center)]%
\matrix[matrix of math nodes,
inner sep=0,
nodes={draw,outer sep=0,inner sep=2pt},
every left delimiter/.style={xshift=1ex},%tighter delimiter spacing
every right delimiter/.style={xshift=-1ex},
left delimiter={(},right delimiter={)},
column sep=-\pgflinewidth,row sep=-\pgflinewidth] (r) {
|[inner sep=5mm]|A_1&&\\&A_2&\\&&A_3\\};
\end{tikzpicture}
\subset
\begin{tikzpicture}[baseline=(current bounding box.center)]%
\matrix[matrix of math nodes,
inner sep=0,
nodes={draw,outer sep=0,inner sep=2pt},
every left delimiter/.style={xshift=1ex},%tighter delimiter spacing
every right delimiter/.style={xshift=-1ex},
left delimiter={(},right delimiter={)},
column sep=-\pgflinewidth,row sep=-\pgflinewidth] (l) {
|[inner sep=5mm]|A_1&&&\\&A_2&&\\&&A_2&\\&&&A_3\\};
\draw (l-2-2.north east) |- (l-1-1.north east) (l-2-2.south west) -| (l-1-1.south west)
(l-3-3.north east) -| (l-4-4.north east) (l-3-3.south west) |- (l-4-4.south west);
\end{tikzpicture}
\]
\end{document}
답변2
TikZ가 없는 솔루션은 다음을 사용합니다.easybmat
패키지:
\documentclass{article}
\usepackage{amsmath}
\usepackage{easybmat}
\begin{document}
\[
\left(
\begin{array}{c@{}c@{}c}
\begin{BMAT}{|ccc|}{|ccc|}
& & \\
& \mbox{\LARGE$A_1$} & \\
& &
\end{BMAT} & & \\
&
\begin{BMAT}{|c|}{|c|}
A_2
\end{BMAT} & \\
& &
\begin{BMAT}{|c|}{|c|}
A_3
\end{BMAT}
\end{array}
\right)
\subset
\left(
\begin{array}{c@{}c@{}c}
\begin{BMAT}{|ccc|c|}{|ccc|c|}
& & & \\
& \mbox{\LARGE$A_1$} & & \\
& & & \\
& & & A_2
\end{BMAT} & & \\
&
\begin{BMAT}{|c|c|}{|c|c|}
A_2 & \\
& A_3
\end{BMAT}
\end{array}
\right)
\]
\end{document}
답변3
{pNiceMatrix}
다음은 of 를 사용한 솔루션입니다 nicematrix
.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{center}
\renewcommand{\arraystretch}{1.5}
\NiceMatrixOptions{columns-width=5mm,margin=0.7em}
$\begin{pNiceMatrix}
\Block[draw]{2-2}{A_1} \\
\\
& & \Block[draw]{}{A_2} \\
& & & \Block[draw]{}{A_3}
\end{pNiceMatrix}
\subset
\begin{pNiceMatrix}
\Block[hvlines]{3-3}{}\Block{2-2}{A_1} & & \Block{2-1}{} \\
\\
\Block{1-2}{} & & A_2 \\
& & & \Block[hvlines]{2-2}{} A_2 \\
& & & & A_3
\end{pNiceMatrix}$
\end{center}
\end{document}
nicematrix
( 내부적으로 PGF/Tikz 노드를 사용하기 때문에) 여러 가지 컴파일이 필요합니다 .