테이블 문제: 하나의 열이 표시되지 않습니다.

테이블 문제: 하나의 열이 표시되지 않습니다.

저는 4개의 열과 15개의 행으로 구성된 테이블을 만들었습니다. 그러나 다소 점, 각도 열: 0,10,20,30,40,...120은 표시되지 않습니다.

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)

미리 감사드립니다. lcrr이 무엇을 의미하는지 설명해 주실 수 있나요?

답변1

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

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

답변2

  • 나는 이전 질문에 대한 답변을 고려할 것입니다. 특히 내용 설명, 표 작성 방법, 오류가 발생한 위치 및 내 (잔류) 문제의 전부 또는 적어도 일부를 해결하는 경우(테이블이 못생겨보여)
  • 그러한 표에서는 SI(국제 단위계)에 따라 불확실성을 작성하기 위해 사용 가능한 모든 도구를 사용합니다. 예를 참조하세요.위키) 표준, 특히 테이블에 더 짧고 일관된 코드를 제공하는 경우 더욱 그렇습니다. 이러한 도구는 siunitxSI 단위 사용에 대한 훌륭한 문서가 포함된 패키지 입니다.

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

위 표에서 생성된 MWE(Minimal Working 예제)는 다음과 같습니다.

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

메모:

  • MWE의 MWE 프리앰블에서는 테이블과 관련된 패키지만 간주됩니다.
  • 문제는 올바르게 종료된 테이블 행으로 해결됩니다. 이는 이전 질문에 대한 답변에서 이미 강조되었습니다.
  • c, l, r은 열 유형 의미입니다.센터,왼쪽그리고오른쪽열 내용 정렬. 그들에 의해 테이블이 지정됩니다. 귀하의 경우에는 lcrr테이블에 첫 번째 열이 있는 4개의 열이 있음을 의미합니다.왼쪽정렬된 셀의 내용, 두 번째 셀의 내용은중심마지막 두 열에는오른쪽정렬된 내용. 자세한 내용은 다음을 참조하세요.위키 LaTeX 테이블.

    보시다시피 제안된 솔루션에서는 대신 S열 유형이 사용됩니다. 이를 통해 셀의 숫자를 소수점에 정렬할 수 있을 뿐만 아니라 보고된 측정값의 허용 오차/불확도를 간단하게 작성할 수도 있습니다.

답변3

몇 가지 관찰 및 의견:

  • ~ 해야 하다\\줄 바꿈이 발생해야 하는 위치를 나타내는 공급 ("이중 백슬래시") 지시문입니다. 입력 채우기의 줄 바꿈으로는 충분하지 않습니다.

  • lcrr"무슨 뜻인지 설명해 주실 수 있나요?"라고 물으셨습니다. 해당 발언을 참고하신 것으로 추정됩니다

    \begin{tabular}{lcrr}
    

    LaTeX 커널은 tabulararray환경에서 사용할 수 있는 여러 열 유형을 설정합니다. 그 중에는 l, c, 가 있는데 r, 이는eft 정렬,입력했고,아르 자형각각 수직 정렬됩니다.

    r귀하의 테이블의 경우 어떤 열에도 사용할 이유가 없습니다 . c데이터 열에 사용하겠습니다 .

  • "래퍼" 와 같은 데드우드 코드를 제거하십시오 \textrm. 코드를 복잡하게 만드는 것 외에는 아무것도 하지 않습니다.

  • 환경 의 전체 내용이 tabular수학 모드에 있으므로 환경을 사용하지 않겠습니다 tabular. 대신 array환경을 사용하십시오.

  • 현재로서는, 벌을 탐하는 사람들만이 당신의 테이블을 주의 깊게 읽을 것입니다. 당신이 매력적으로 보여주고 싶은 정보를 정리하려고 노력했다는 사실을 사람들이 알아차리면 사람들이 당신에게 더 주의를 기울일 가능성이 더 높다는 점을 항상 명심하십시오.

    이 기준을 전체 table환경에 적용하면 범례와 표 자료를 모두 좀 더 보기 좋게 정리하는 것이 좋겠다고 생각합니다. 확실히, 길고 구불구불한 캡션의 형태로 독자의 머리에 범례를 "버려" 두지 마십시오. 대신, 캡션을 짧고 간결하게 만들고(예: ) \caption{Count rates}일반 실행 텍스트인 것처럼 범례를 구성하십시오. 단락 나누기를 사용하고 완전한 문장을 사용하십시오.

    array(또는 ) 환경 에서 구조 없이 13개 행의 숫자를 표시하는 대신 tabular매 4번째 또는 5번째 행 뒤에 약간의 공백을 추가하여 시각적인 흥미를 제공하십시오. 선택적으로 S열 유형(패키지에서 제공 siunitx)을 사용하여 (암시적) 소수점 표시의 첫 번째 열에 있는 숫자를 정렬합니다.

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


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

관련 정보