
나는 이 행렬을 내 비머에 직접 포함시키려고 하므로 새 코드는 다음과 같습니다.
(\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning,fit}
\begin{document}
\begin{frame}
[code]
\end{frame}
\end{document})
하지만 작동하지 않았습니다. 이유가 무엇인지 아시나요?
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning,fit}
\begin{document}
%%code
\begin{tikzpicture}[>=stealth,thick,baseline]
\matrix [matrix of math nodes,left delimiter=(,right delimiter=)](A){
a_{1,1} & a_{1,2} & \dots & a_{1,j} & \dots & a_{1,n}\\
a_{2,1} & a_{2,2} & \dots & a_{2,j} & \dots & a_{2,n}\\
\vdots & \vdots & & \vdots & & \vdots\\
a_{i,1} & a_{i,2} & \dots & a_{i,j} & \dots & a_{i,n}\\
\vdots & \vdots & & \vdots & & \vdots\\
a_{n,1} & a_{n,2} & \dots & a_{n,j} & \dots & a_{n,n}\\
};
\node[
fit=(A-4-6)(A-4-6),
inner xsep=20pt,inner ysep=0,
label=right: $i$-ième ligne
](L) {};
\node[
fit=(A-6-4)(A-6-4),
inner xsep=20pt,inner ysep=20pt,
label=below: $j$-ième colonne
](C) {};
\draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
\draw[->](C.south)-- (A-6-4);
\end{tikzpicture}
\end{document}
답변1
나에게 다음을 사용하면 코드가 작동합니다 ampersand replacement=\&
.
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning,fit}
\begin{document}
%%code
\begin{frame}
\begin{tikzpicture}[>=stealth,thick,baseline]
\matrix [matrix of math nodes,left delimiter=(,right delimiter=),ampersand replacement=\&](A){
a_{1,1} \& a_{1,2} \& \dots \& a_{1,j} \& \dots \& a_{1,n}\\
a_{2,1} \& a_{2,2} \& \dots \& a_{2,j} \& \dots \& a_{2,n}\\
\vdots \& \vdots \& \& \vdots \& \& \vdots\\
a_{i,1} \& a_{i,2} \& \dots \& a_{i,j} \& \dots \& a_{i,n}\\
\vdots \& \vdots \& \& \vdots \& \& \vdots\\
a_{n,1} \& a_{n,2} \& \dots \& a_{n,j} \& \dots \& a_{n,n}\\
};
\node[
fit=(A-4-6)(A-4-6),
inner xsep=20pt,inner ysep=0,
label=right: $i$-ième ligne
](L) {};
\node[
fit=(A-6-4)(A-6-4),
inner xsep=20pt,inner ysep=20pt,
label=below: $j$-ième colonne
](C) {};
\draw[->](L.east)-- ([xshift=12pt]A-4-6.east);
\draw[->](C.south)-- (A-6-4);
\end{tikzpicture}
\end{frame}
\end{document}