Problema con la tabla: no se muestra una columna

Problema con la tabla: no se muestra una columna

Creé una tabla que tiene cuatro columnas y quince filas. Sin embargo, algo puntual, la columna de ángulo: 0,10,20,30,40,.... 120 no se muestra.

documentclass[%
 preprint,
 doublecolumn
%superscriptaddress,
%groupedaddress,
%unsortedaddress,
%runinaddress,
%frontmatterverbose, 
%preprint
%preprintnumbers,
%nofootinbib,
%nobibnotes,
%bibnotes,
 amsmath,amssymb,
 aps,
%pra,
prc,
%rmp,
%prstab,
%prstper,
%floatfix,
]{revtex4-2}
\usepackage{anyfontsize}
\usepackage{float}
\usepackage{mathtools, nccmath}
\usepackage{graphicx}% Include figure files
\usepackage{tabularx}
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
%\usepackage{hyperref}% add hypertext capabilities
\usepackage[mathlines]{lineno}% Enable numbering of text and display math
\usepackage{amsmath}
\linenumbers\relax % Commence numbering lines
%\usepackage{latexsym}
%\usepackage[showframe,%Uncomment any one of the following lines to test 
%%scale=0.7, marginratio={1:1, 2:3}, ignoreall,% default settings
%%text={7in,10in},centering,
%%margin=1.5in,
%%total={6.5in,8.75in}, top=1.2in, left=0.9in, includefoot,
%%height=10in,a5paper,hmargin={3cm,0.8in},
%]{geometry}

\begin{document}
\begin{table}
\caption{This table contains Cobalt's count rate:$R(\theta)$, count rate without background:$Y(\theta)$, and normalized count rate:$\frac{Y(\theta)}{Y(0)}$ their uncertainties. To obtain $R(\theta)$, divide "C" from Table.~\ref{Co_Count} by measured time, and its corresponding uncertainty:$\sigma R(\theta)$ is $\sigma C$ over time. For $\Y(\theta)$, subtract background count rate from$R(\theta)$. Its corresponding uncertainty is calculated by using Eq.~(\ref{eq:two}). Normalized count rate is divide $Y(\theta)$ by Y(0). Its uncertainty is from Eq.~(\ref{eq:one})}

\begin{ruledtabular}
\begin{tabular}{lcrr} 
\textrm{$\theta$}& \textrm{$R(\theta)\pm \sigma R(\theta)$ }& \textrm{$Y(\theta) \pm \sigma {Y(\theta)}$} & \textrm{$\frac{Y(\theta)}{Y(0)}$ $\pm \sigma$ $\frac{Y(\theta)}{Y(0)}$ }\\
\textrm{($^{\circ}$)}&\textrm{$\frac{Count}{second}$}&\texrm{$\frac{Count}{second}$}& \\
\colrule
0& 2.970$\pm$0.070 &2.967$\pm$0.070&1.000$\pm$0.033
10&2.774$\pm$0.068 & 2.771$\pm$0.068&0.934$\pm$0.032
20&2.800$\pm$0.068 & 2.797$\pm$0.068&0.943$\pm$0.032
30&2.526$\pm$0.065 & 2.523$\pm$0.065&0.850$\pm$0.030
40&2.401$\pm$0.063 & 2.398$\pm$0.063&0.808$\pm$0.029
50&2.399$\pm$0.063 & 2.396$\pm$0.063&0.808$\pm$0.029
60&2.066$\pm$0.059 & 2.063$\pm$0.059&0.695$\pm$0.026
70&2.174$\pm$0.060 & 2.171$\pm$0.060&0.732$\pm$0.027
80&2.161$\pm$0.060 & 2.157$\pm$0.060&0.727$\pm$0.027
90&2.091$\pm$0.059 & 2.088$\pm$0.059&0.704$\pm$0.026
100&2.187$\pm$0.060 & 2.184$\pm$0.060&0.736$\pm$0.027
110&2.272$\pm$0.062 & 2.269$\pm$0.062&0.765$\pm$0.033
120&2.181$\pm$0.060 & 2.177$\pm$0.060&0.734$\pm$0.027
\end{tabular}
\end{ruledtabular}
\end{table}
\end{document)

Gracias de antemano. ¿Puedes explicar también qué significa lcrr?

Respuesta1

ingrese la descripción de la imagen aquí

\documentclass{article}
\usepackage[tmargin=1cm]{geometry}
\usepackage{tabulary,booktabs}
\begin{document}
\begin{table*}
\centering
\begin{tabular}{cccc}
\toprule
\textrm{$\theta$}& \textrm{$R(\theta)\pm \sigma R(\theta)$ }& \textrm{$Y(\theta) \pm \sigma {Y(\theta)}$} & \textrm{$\frac{Y(\theta)}{Y(0)}$ $\pm \sigma$ $\frac{Y(\theta)}{Y(0)}$ }\\
\textrm{($^{\circ}$)}&\textrm{$\frac{Count}{second}$}&\texrm{$\frac{Count}{second}$}& \\

\midrule
0& 2.970$\pm$0.070 &2.967$\pm$0.070&1.000$\pm$0.033\\
10&2.774$\pm$0.068 & 2.771$\pm$0.068&0.934$\pm$0.032\\
20&2.800$\pm$0.068 & 2.797$\pm$0.068&0.943$\pm$0.032\\
30&2.526$\pm$0.065 & 2.523$\pm$0.065&0.850$\pm$0.030\\
40&2.401$\pm$0.063 & 2.398$\pm$0.063&0.808$\pm$0.029\\
50&2.399$\pm$0.063 & 2.396$\pm$0.063&0.808$\pm$0.029\\
60&2.066$\pm$0.059 & 2.063$\pm$0.059&0.695$\pm$0.026\\
70&2.174$\pm$0.060 & 2.171$\pm$0.060&0.732$\pm$0.027\\
80&2.161$\pm$0.060 & 2.157$\pm$0.060&0.727$\pm$0.027\\
90&2.091$\pm$0.059 & 2.088$\pm$0.059&0.704$\pm$0.026\\
100&2.187$\pm$0.060 & 2.184$\pm$0.060&0.736$\pm$0.027\\
110&2.272$\pm$0.062 & 2.269$\pm$0.062&0.765$\pm$0.033\\
120&2.181$\pm$0.060 & 2.177$\pm$0.060&0.734$\pm$0.027\\
\bottomrule
\end{tabular}
\end{table*}
\end{document}

Respuesta2

  • Consideraría las respuestas a mis preguntas anteriores, especialmente si explican el contenido, cómo escribir la tabla, dónde cometí errores y si resuelven todos o al menos parte de mis (residuos) problemas (la mesa se ve fea)
  • en dicha tabla usaría todas las herramientas disponibles para escribir la incertidumbre según el SI (Sistema Internacional de Unidades, ver por ejemplowiki) estándares, especialmente si ofrecen un código más corto y consistente para mi tabla. Una herramienta de este tipo es el siunitxpaquete con excelente documentación sobre el uso de unidades SI.

ingrese la descripción de la imagen aquí

y MWE (ejemplo de trabajo mínimo), según el cual se genera la tabla anterior, es:

\documentclass[twocolumn]{revtex4-2}
\usepackage{nccmath, mathtools, amssymb}
\usepackage{makecell}
\usepackage{siunitx}

\begin{document}
\begin{table}
  \caption{This table contains Cobalt's count rate: $R(\theta)$,
         count rate without background: $Y(\theta)$, and normalized count rate:
         $Y(\theta)/Y(0)$ their uncertainties. To obtain $R(\theta)$,
         divide "C" from Table.~\ref{Co_Count} by measured time,
         and its corresponding uncertainty: $\sigma R(\theta)$ is $\sigma C$ over time.
         For $Y(\theta)$, subtract background count rate from $R(\theta)$.
         Its corresponding uncertainty is calculated by using Eq.~(\ref{eq:two}).
         Normalized count rate is divide $Y(\theta)$ by Y(0).
         Its uncertainty is from Eq.~(\ref{eq:one})
         }
  \label{tab:cobalt}
  \centering
\sisetup{table-format=1.3(2),
         table-figures-uncertainty=6,
         separate-uncertainty} 
\setcellgapes{3pt}
\makegapedcells
  \begin{tabular}{ S[table-format=3.0] @{\quad} *3{S} }
    \colrule
{$\theta$}    
   &   {$R(\theta) \pm \sigma R(\theta)$}
        &   {$Y(\theta) \pm \sigma Y(\theta)$} 
            &   {$\mfrac{Y(\theta)}{Y(0)} \pm \sigma\mfrac{Y(\theta)}{Y(0)}$}   \\
{\si{\degree}} 
    &   {$\mfrac{\text{Count}}
                {\text{second}}$}
        &   {$\mfrac{\text{Count}}
                    {\text{second}}$}
            &                                       \\

    \colrule
0   &   2.970(70)   &   2.967(70)   &   1.000(33)   \\
10  &   2.774(68)   &   2.771(68)   &   0.934(32)   \\
20  &   2.800(68)   &   2.797(68)   &   0.943(32)   \\
30  &   2.526(65)   &   2.523(65)   &   0.850(30)   \\
40  &   2.401(63)   &   2.398(63)   &   0.808(29)   \\
50  &   2.399(63)   &   2.396(63)   &   0.808(29)   \\
60  &   2.066(59)   &   2.063(59)   &   0.695(26)   \\
70  &   2.174(60)   &   2.171(60)   &   0.732(27)   \\
80  &   2.161(60)   &   2.157(60)   &   0.727(27)   \\
90  &   2.091(59)   &   2.088(59)   &   0.704(26)   \\
100 &   2.187(60)   &   2.184(60)   &   0.736(27)   \\
110 &   2.272(62)   &   2.269(62)   &   0.765(33)   \\
120 &   2.181(60)   &   2.177(60)   &   0.734(27)   \\
    \colrule
  \end{tabular}
\end{table}
\end{document}

Nota:

  • en el preámbulo de MWE del MWE se consideran solo los paquetes relevantes para la tabla
  • su problema se resuelve mediante filas de tabla terminadas correctamente. Esto ya se enfatizó en las respuestas a su pregunta anterior.
  • c, l, rson columnas tipo significadocentro,izquierdaybienalineación del contenido de las columnas. Por ellos se especifican las tablas. En su caso lcrrsignifica que su tabla tiene cuatro columnas de las cuales la primera tieneizquierdael contenido de las celdas alineadas, en la segunda celda el contenido escentradoy en las dos últimas columnas tenemosbiencontenidos alineados. Para más detalles verwiki Tablas LaTeX.

    Como puede ver, en las soluciones propuestas se utilizan Scolumnas de tipo en lugar de ellas. Permiten alinear números en celdas con sus puntos decimales, así como escribir de forma sencilla las tolerancias/incertidumbres de las mediciones informadas.

Respuesta3

Algunas observaciones y comentarios:

  • debeproporcione \\directivas ("doble barra invertida") para indicar dónde se supone que deben ocurrir los saltos de línea. Los saltos de línea en el relleno de entrada NO son suficientes.

  • Preguntaste: "¿Puedes explicar también qué lcrrsignifica?" Supongo que te refieres a la declaración.

    \begin{tabular}{lcrr}
    

    El kernel de LaTeX configura varios tipos de columnas para su uso en tabularentornos array. Entre ellos se encuentran l, c, y r, que significanyoalineado a la izquierda,Centró, yralineados a la derecha, respectivamente.

    En el caso de su tabla, no veo ninguna buena razón para usarla ren ninguna de las columnas. Lo usaría cpara las columnas de datos.

  • Deshágase del código inactivo, como los \textrm"envoltorios". No hacen absolutamente nada excepto agregar desorden de código.

  • Dado que todo el contenido del tabularentorno está en modo matemático, NO usaría un tabularentorno. En su lugar, utilice un arrayentorno.

  • Tal como está, su mesa será leída atentamente sólo por los glotones del castigo. Tenga siempre en cuenta que es más probable que las personas le presten atención si notan que se ha esforzado por organizar la información que desea presentar de forma atractiva.

    Aplicando este criterio a todo el tableentorno, diría que sería una buena idea organizar de forma más atractiva tanto la leyenda como el material tabular. Por supuesto, no "arroje" simplemente la leyenda en la cabeza de los lectores, en forma de un título largo y serpenteante. En su lugar, haga que el título sea breve y conciso, por ejemplo \caption{Count rates}, y organice la leyenda como si fuera texto corriente normal: utilice saltos de párrafo y utilice oraciones completas.

    En lugar de mostrar una masa sólida de 13 filas de números sin estructura en el entorno array(o tabular), proporcione algo de interés visual agregando un poco de espacio en blanco después de cada cuarta o quinta fila. Opcionalmente, utilice el Stipo de columna (proporcionado por el siunitxpaquete) para alinear los números de la primera columna con sus marcadores decimales (implícitos).

ingrese la descripción de la imagen aquí


\documentclass[twocolumn, % the option is "twocolumn", NOT "doublecolumn"
    amsmath,amssymb,aps,prc]{revtex4-2}
%% Simplified the preamble to include just the bare minimum needed:
\usepackage{booktabs} % for \toprule, \midrule, \bottomrule
\usepackage{siunitx}  % for 'S' column type
\usepackage{ragged2e} % for '\justifying' command

\begin{document}

\begin{table}
\caption{Count rates}

\justifying 
This table contains Cobalt's count rate, $R(\theta)$, the count rate without 
background, $Y(\theta)$, and the normalized count rate, $Y(\theta)/Y(0)$, 
along with their uncertainties. 

To obtain $R(\theta)$, divide ``C'' from Table~\ref{Co_Count} by measured 
time; its corresponding uncertainty, $\sigma R(\theta)$, is $\sigma C$ over 
time. For $Y(\theta)$, subtract background count rate from $R(\theta)$; its 
corresponding uncertainty is calculated by using Eq.~(\ref{eq:two}). The 
normalized count rate is $Y(\theta)$ divided by~$Y(0)$; its uncertainty is 
from Eq.~(\ref{eq:one}).

\medskip % insert a bit of vertical whitespace
\centering
$\begin{array}{@{} S[table-format=3.0] ccc @{}} 
\toprule
{\theta} & 
R(\theta)\pm \sigma R(\theta) & 
Y(\theta) \pm \sigma Y(\theta) & 
\frac{Y(\theta)}{Y(0)} \pm \sigma \frac{Y(\theta)}{Y(0)} \\[1ex]
{[^{\circ}]} 
& \bigl[\frac{\text{Count}}{\text{second}}\bigr] 
& \bigl[\frac{\text{Count}}{\text{second}}\bigr] 
& \\
\midrule
  0 & 2.970\pm0.070 & 2.967\pm0.070 & 1.000\pm0.033\\
 10 & 2.774\pm0.068 & 2.771\pm0.068 & 0.934\pm0.032\\
 20 & 2.800\pm0.068 & 2.797\pm0.068 & 0.943\pm0.032\\
 30 & 2.526\pm0.065 & 2.523\pm0.065 & 0.850\pm0.030\\
 40 & 2.401\pm0.063 & 2.398\pm0.063 & 0.808\pm0.029\\
 \addlinespace
 50 & 2.399\pm0.063 & 2.396\pm0.063 & 0.808\pm0.029\\
 60 & 2.066\pm0.059 & 2.063\pm0.059 & 0.695\pm0.026\\
 70 & 2.174\pm0.060 & 2.171\pm0.060 & 0.732\pm0.027\\
 80 & 2.161\pm0.060 & 2.157\pm0.060 & 0.727\pm0.027\\
 \addlinespace
 90 & 2.091\pm0.059 & 2.088\pm0.059 & 0.704\pm0.026\\
100 & 2.187\pm0.060 & 2.184\pm0.060 & 0.736\pm0.027\\
110 & 2.272\pm0.062 & 2.269\pm0.062 & 0.765\pm0.033\\
120 & 2.181\pm0.060 & 2.177\pm0.060 & 0.734\pm0.027\\
\bottomrule
\end{array}$
\end{table}
\end{document}

información relacionada