表、書式設定

表、書式設定

この表に苦労しています。助けていただければ幸いです。どうもありがとうございます

 \documentclass[a4paper,12pt]{report}
\usepackage{multirow}
\usepackage{siunitx,booktabs}%for table decimals number
\usepackage[export]{adjustbox} \begin{table}[!htbp]
\centering
\begin{tabular}{>{\bfseries}l 
               S[table-format=-1.2(2)] 
                S[table-format=table-format=1.1e1] } 
\toprule 
  {\textbf{Approach}} & $\boldsymbol{\beta}$ & $\boldsymbol{\chi^{2}}$ \\
   \midrule
1   &  -0.61(17)        & Inf. \\
2   &  -0.60(17)        & Inf. \\
3   &  -0.59(18)        & 3$\times$10$^6$\\ 
4   &  -0.56(20)        & Inf. \\
\bottomrule
\end{tabular}
\caption[]
 \label{}
\end{table}
\FloatBarrier

答え1

ヘッダーでは太字は使用しません。\bm{\beta}と は\beta2 つの異なる数学エンティティです。

また、最初の列は太字にする必要はありません。3 番目の列には数字が 1 つだけあるので、 とだけ書きc\num数字には を使用します。これが完全版のみである場合は、数字以外の項目を括弧で囲む必要があります。

\documentclass[a4paper,12pt]{report}

\usepackage{amsmath,bm}
\usepackage{siunitx,booktabs}%for table decimals number


\begin{document}

\begin{table}[!htbp]
\centering

\begin{tabular}{
  >{\bfseries}l 
  S[table-format=-1.2(2)] 
  c
}
\toprule 
Approach & {$\bm{\beta}$} & $\bm{\chi^{2}}$ \\
\midrule
1   &  -0.61(17)        & Inf. \\
2   &  -0.60(17)        & Inf. \\
3   &  -0.59(18)        & \num{3e6} \\ 
4   &  -0.56(20)        & Inf. \\
\bottomrule
\end{tabular}
\caption{A caption}
\label{label}
\end{table}

\begin{table}[!htbp]
\centering

\begin{tabular}{
  l 
  S[table-format=-1.2(2)] 
  c
}
\toprule 
Approach & {$\beta$} & $\chi^{2}$ \\
\midrule
1   &  -0.61(17)        & Inf. \\
2   &  -0.60(17)        & Inf. \\
3   &  -0.59(18)        & \num{3e6} \\ 
4   &  -0.56(20)        & Inf. \\
\bottomrule
\end{tabular}
\caption{A caption}
\label{label2}
\end{table}

\begin{table}[!htbp]
\centering

\begin{tabular}{
  l 
  S[table-format=-1.2(2)] 
  S[table-format=1.0e1]
}
\toprule 
Approach & {$\beta$} & $\chi^{2}$ \\
\midrule
1   &  -0.61(17)        & {Inf.} \\
2   &  -0.60(17)        & {Inf.} \\
3   &  -0.59(18)        & 3e6 \\ 
4   &  -0.56(20)        & {Inf.} \\
\bottomrule
\end{tabular}
\caption{A caption}
\label{label3}
\end{table}

\end{document}

ここに画像の説明を入力してください

答え2

これはテーブルであり、コンパイル可能であるはずです:

\documentclass[a4paper,12pt]{report}
\usepackage{multirow}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{amsmath}

\begin{document}
\begin{table}[!htbp]
\centering
\begin{tabular}{>{\bfseries}c % I think centred column looks better here
               S[table-format=-1.2(2)] 
                S[table-format=1.1e1] } 
\toprule 
  Approach & $\boldsymbol{\beta}$ & $\boldsymbol{\chi^{2}}$ \\
   \midrule
1   &  -0.61(17)        & {Inf.} \\
2   &  -0.60(17)        & {Inf.} \\
3   &  -0.59(18)        & 3e6 \\ 
3   &  -0.59(18)        & 3.0e6 \\ % for comparison
4   &  -0.56(20)        & {Inf.} \\
\bottomrule
\end{tabular}
\caption{test}
\label{tab:test}
\end{table}
\end{document}

ここに画像の説明を入力してください ご希望通りでない点はありますか?

答え3

ここに画像の説明を入力してください

\documentclass[a4paper,12pt]{report}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}
    \begin{table}[htbp]
    \centering
\caption[]{My nice table}
    \label{tab:mytable}
\begin{tabular}{>{\bfseries}l
                S[table-format=-1.2(2)]
                S[table-format= 1.0e1] }
    \toprule
Approach    & {$\boldsymbol{\beta}$}    & {$\boldsymbol{\chi^{2}}$}  \\
   \midrule
1           &  -0.61(17)                & {Inf.}                    \\
2           &  -0.60(17)                & {Inf.}                    \\
3           &  -0.59(18)                & 3e6                       \\
4           &  -0.56(20)                & {Inf.}                    \\
    \bottomrule
\end{tabular}
    \end{table}

or

    \begin{table}[htbp]
\sisetup{separate-uncertainty}%
    \centering
\caption[]{My nice table again}
    \label{tab:mytable}
\begin{tabular}{>{\bfseries}c
                S[table-format=-1.2(2)]
                S[table-format= 1.0e1] }
    \toprule
Approach    & {$\boldsymbol{\beta}$}    & {$\boldsymbol{\chi^{2}}$}  \\
   \midrule
1           &  -0.61(17)                & {Inf.}                    \\
2           &  -0.60(17)                & {Inf.}                    \\
3           &  -0.59(18)                & 3e6                       \\
4           &  -0.56(20)                & {Inf.}                    \\
    \bottomrule
\end{tabular}
    \end{table}
\end{document}

関連情報