表の問題: 1 つの列が表示されない

表の問題: 1 つの列が表示されない

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 Example) は次のとおりです。

\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、、lr列タイプの意味です中心そして列の内容の配置。それによってテーブルが指定されます。あなたの場合、lcrrテーブルには4つの列があり、最初の列は整列したセルの内容、2番目のセルの内容は中央揃えそして最後の2つの列には整列したコンテンツ。詳細については、wiki LaTeX テーブル

    ご覧のとおり、提案されたソリューションでは、代わりにS列タイプが使用されています。これにより、セル内の数値を小数点で揃えることができるほか、報告された測定値の許容値/不確実性を簡単に記述できます。

答え3

いくつかの観察とコメント:

  • あなたしなければならない\\改行が発生する場所を示す (「二重バックスラッシュ」) ディレクティブを指定します。入力フィル内の改行だけでは不十分です。

  • 「意味も説明できますか?」と質問されましたが、lcrrおそらく次の文のことを指していると思います。

    \begin{tabular}{lcrr}
    

    LaTeXカーネルは、tabularおよびarray環境で使用するためにいくつかの列タイプを設定します。その中にはl、、、cおよびがrあり、これらは以下を表します。l左揃え、c入って、rそれぞれ右揃えです。

    あなたのテーブルの場合、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}

関連情報