tablas, formateo

tablas, formateo

Luchando con esta mesa, se agradece cualquier ayuda. Muchas gracias

 \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

Respuesta1

No usaría negrita en el encabezado: \bm{\beta}y \betason dos entidades matemáticas diferentes.

Además, la primera columna no tiene por qué estar en negrita. La tercera columna, que tiene un solo número, puede ser simplemente c, con \numel número; Si se trata sólo de una versión íntegra, debe poner entre llaves las entradas no numéricas.

\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}

ingrese la descripción de la imagen aquí

Respuesta2

Esta debería ser tu tabla y ser compilable:

\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}

ingrese la descripción de la imagen aquí ¿Hay algo que no es como lo deseas?

Respuesta3

ingrese la descripción de la imagen aquí

\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}

información relacionada