오류: 패키지 배열 오류: 잘못된 프리암 토크([): `c`가 사용되었습니다.

오류: 패키지 배열 오류: 잘못된 프리암 토크([): `c`가 사용되었습니다.

왜 이 오류가 발생하나요?

여기에 이미지 설명을 입력하세요

내 MWE:

\documentclass[12pt,oneside]{book}

\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, multirow, tabularx,
            threeparttable, tabulary}
\renewcommand\theadfont{\small\bfseries} % for bold in table using \small
\renewcommand\theadgape{}
\usepackage[svgnames, table]{xcolor}
\usepackage{siunitx} %for table spacing to second row
\usepackage{graphicx}

\usepackage[font=small,
            labelfont={bf,sf}, textfont={sf}, 
            justification=centering]{caption}

\begin{document}


\begin{table}[h!]
\centering 
\begin{tabular*}{0.80\textwidth}{
  @{}
  l
  c[table-format=6]
  c[table-format=6]
  c[table-format=6]
  c[table-format=6]
  @{}  
}
\toprule
{\thead{Sample Setting \\ Configuration}} 
  & {\thead{Verification \\ 
  Status}}
  & {\thead{Precision \\ (\textit{P})}}
  & {\thead{Recall \\ (\textit{R}) }}
  & {\thead{\textit{F}-samples }} \\
\midrule

No. 4   &   66.07   &   0.6786  &   0.6552  &   0.6667  \\
No. 5   &   71.43   &   0.7097  &   0.7586  &   0.7333  \\


\bottomrule
\end{tabular*}
\end{table}



\end{document}

답변1

유형 c열은 선택적 인수를 허용하지 않으므로 오류 메시지가 표시됩니다. 코드를 컴파일 가능하게 만들려면 cS. 후자는 패키지에 의해 정의된 열 유형으로 siunitx, 특히 table-format사용자가 사용한 옵션을 허용합니다. 숫자의 올바른 정렬과 올바른 열 너비를 얻으려면 table-format해당 테이블 열의 내용에 따라 값도 수정해야 합니다. 다음 예에서는 @{\extracolsep{\fill}}테이블이 지정된 너비만큼 넓고 열이 고르게 퍼지도록 추가했습니다 .

여기에 이미지 설명을 입력하세요

\documentclass[12pt,oneside]{book}

\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, multirow, tabularx,
            threeparttable, tabulary}
\renewcommand\theadfont{\small\bfseries} % for bold in table using \small
\renewcommand\theadgape{}
\usepackage[svgnames, table]{xcolor}
\usepackage{siunitx} %for table spacing to second row
\usepackage{graphicx}

\usepackage[font=small,
            labelfont={bf,sf}, textfont={sf}, 
            justification=centering]{caption}

\begin{document}


\begin{table}[h!]
\centering 
\begin{tabular*}{0.80\textwidth}{
  @{}
  @{\extracolsep{\fill}}
  l
  S[table-format=2.2]
  S[table-format=1.4]
  S[table-format=1.4]
  S[table-format=1.4]
  @{}  
}
\toprule
{\thead{Sample Setting \\ Configuration}} 
  & {\thead{Verification \\ 
  Status}}
  & {\thead{Precision \\ (\textit{P})}}
  & {\thead{Recall \\ (\textit{R}) }}
  & {\thead{\textit{F}-samples }} \\
\midrule

No. 4   &   66.07   &   0.6786  &   0.6552  &   0.6667  \\
No. 5   &   71.43   &   0.7097  &   0.7586  &   0.7333  \\


\bottomrule
\end{tabular*}
\end{table}



\end{document}

관련 정보