
\caption{Tabel penugasan bilangan tegas (\textit{crips}) PT. KSM}
\label{T2}
\begin{center}
$\begin{NiceMatrix}
& M_1 & M_2 & M_3 & M_4 \\
J_1 & 1.67 & 2.33 & 3.67 & 2 \\
J_2 & 2.67 & 2.67 & 2.89 & 2 \\
J_3 & 1.33 & 2.33 & 3.33 & 2.33 \\
J_4 & 3.33 & 1.33 & 2.67 & 1 \\
\CodeAfter
\tikz{
\node (f) [draw, inner xsep=0.7em, inner ysep=1em, fit=(2-2) (5-5)] {};
}
\end{NiceMatrix}$
\end{center}
- 이 테이블의 캡션과 레이블을 만드는 방법을 알려드리겠습니다. 이 알고리즘을 실행하면 \caption 및 \label에 오류가 발생합니다.
- M_ij와 J_ij의 행과 열이 동일한 너비를 갖도록 테이블 라인을 균등화하는 방법
답변1
귀하의 첫 번째 질문에 대한 답변을 다음과 같이 변경하여 다시 사용하겠습니다.
- 사용된
article
문서 클래스는 figure
이미지가 환경 에 배치됩니다.
\documentclass{article}
\usepackage{nicematrix}
\usepackage{tikz}
\usetikzlibrary{fit}
\newcommand\mcc[1]{\multicolumn{1}{c}{#1}}
\begin{document}
\begin{figure}[!ht]
\caption{Tabel penugasan bilangan tegas (\textit{crips}) PT. KSM}
\label{T2}
\[
\begin{NiceMatrix}
& M_1 & M_2 & M_3 & M_4 \\
J_1 & 0 & 0.66 & 2 & 0.33 \\
J_2 & 1 & 0 & 1.22 & 0.33 \\
J_3 & 0 & 1 & 2 & 1 \\
J_4 & 2.33 & 0.33 & 1.67 & 0 \\
\CodeAfter
\tikz{
\node (f) [draw, inner xsep=1em, fit=(2-2) (5-5)] {};
\draw[line width=3pt, opacity=0.2]
(2-2 |- f.north) -- (5-2 |- f.south)
(3-2 -| f.west) -- (3-5 -| f.east)
(5-2 -| f.west) -- (5-5 -| f.east);
}
\end{NiceMatrix}
\]
\end{figure}
See figure \ref{T2} ...
\end{document}