감동, 마음이 움직이는 것

[latex] matrix with dashed lines and large symbols 본문

Tips (Utility, Computer Language, and etc.)

[latex] matrix with dashed lines and large symbols

Struggler J. 2020. 5. 21. 12:20

이것도 어디서 본건데 못 찾겠다. 

그분이 템플렛을 엄청 잘 만들어주셔서 그냥 맨날 그거 바꿔서 쓰고 있음

\usepackage{arydshln}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing,calc}
\begin{tikzpicture}
\matrix [matrix of math nodes,left delimiter=(,right delimiter=),row sep=0.5cm,column sep=0.5cm] (m) {
~&~&~&~\\
~&~&~&~\\
~&~&~&~\\
~&~&~&~\\};
\draw[dashed] ($0.5*(m-1-2.north east)+0.5*(m-1-3.north west)$) --
      ($0.5*(m-4-2.south east)+0.5*(m-4-3.south west)$);
\draw[dashed] ($0.5*(m-2-1.south west)+0.5*(m-3-1.north west)$) --
      ($0.5*(m-2-4.south east)+0.5*(m-3-4.north east)$);
\node[above=5pt of m-1-1] (top-1) { };
\node[above=5pt of m-1-2] (top-2) { };
\node[above=5pt of m-1-3] (top-3) { };
\node[above=5pt of m-1-4] (top-4) { };
%
\node[left=5pt of m-1-1] (left-1) {$ $};
\node[left=5pt of m-2-1] (left-2) {$ $};
\node[left=5pt of m-3-1] (left-3) {$ $};
\node[left=5pt of m-4-1] (left-4) {$ $};
%
\node[below right =1pt of m-1-1] (r-1) {$\Scale[1.8]{\kappa}$};
\node[below right =1pt of m-1-3] (r-2) {$l^{^{-1}}\Scale[1.8]{\kappa}$};
\node[below right =1pt of m-3-1] (r-3) {$l\Scale[1.8]{\kappa}$};
\node[below right =1pt of m-3-3] (r-4) {$\Scale[1.8]{\kappa}$};
%
\node[rectangle,above delimiter=\{] (del-top-1) at ($0.5*(top-1.south) +0.5*(top-2.south)$) {\tikz{\path (top-1.south west) rectangle (top-2.north east);}};
\node[above=10pt] at (del-top-1.north) {$W$};
\node[rectangle,above delimiter=\{] (del-top-2) at ($0.5*(top-3.south) +0.5*(top-4.south)$) {\tikz{\path (top-3.south west) rectangle (top-4.north east);}};
\node[above=10pt] at (del-top-2.north) {$M$};
%
\node[rectangle,left delimiter=\{] (del-left-1) at ($0.5*(left-1.east) +0.5*(left-2.east)$) {\tikz{\path (left-1.north east) rectangle (left-2.south west);}};
\node[left=10pt] at (del-left-1.west) {$W$};
\node[rectangle,left delimiter=\{] (del-left-2) at ($0.5*(left-3.east) +0.5*(left-4.east)$) {\tikz{\path (left-3.north east) rectangle (left-4.south west);}};
\node[left=10pt] at (del-left-2.west) {$M$};
%
\end{tikzpicture}

 

 

결과물

'Tips (Utility, Computer Language, and etc.)' 카테고리의 다른 글

[python]list 중복값 제거  (0) 2020.06.09
[diversity index]  (0) 2020.06.09
[latex] matrix with a large symbol  (0) 2020.05.21
[latex] \boldsymbol  (0) 2020.05.20
[qsub] 옵션들  (0) 2020.05.06