2열 페이지의 테이블에 있는 Vspace

2열 페이지의 테이블에 있는 Vspace

2열 페이지의 상단에 걸쳐 있는 테이블을 만들었는데, 마지막 열에 $j$가 위의 hline에 매우 가깝고 같은 행의 다른 요소는 동일한 수직 높이를 갖는 문제가 있습니다. 마지막 열의 "전환" 헤더에서도 동일한 문제가 발생합니다. 그리고 첫 번째 행($\lambda$ 및 전환이 있는 행)을 조금 더 넓게 만드는 방법이 있나요? 이러한 문제를 해결하는 방법은 무엇입니까?

\newcolumntype{M}{>{\centering\arraybackslash}m{\dimexpr.096\linewidth-2\tabcolsep}}

  \begin{table*}[t!]
    \footnotesize
    \centering
    \begin{tabular}{|| M | M || M | M || M | M || M | M || M | M ||}
    \multicolumn{2}{c}{\bf Lyman} & \multicolumn{2}{c}{\bf Balmer} & \multicolumn{2}{c}{\bf Paschen} & \multicolumn{2}{c}{\bf Brackett} & \multicolumn{2}{c}{\bf Pfund} \\
    \hline
    $\lambda$(nm) & transition & $\lambda$(nm) & transition & $\lambda$(nm) & transition & $\lambda$(nm) & transition & $\lambda$(nm) & transition \\[1mm]
    \hline
    93.78 & 6$\rightarrow$1 & 410.2 & 6$\rightarrow$2 & 1094 & 6$\rightarrow$3 & 2630 & 6$\rightarrow$4 & 7400 & 6$\rightarrow$5 \\[1mm]
    94.98 & 5$\rightarrow$1 & 434.0 & 5$\rightarrow$2 & 1282 & 5$\rightarrow$3 & 4050 & 5$\rightarrow$4 &  & \\[1mm]
    97.25 & 4$\rightarrow$1 & 486.1 & 4$\rightarrow$2 & 1875 & 4$\rightarrow$3 &  &  &  & \\[1mm]
    102.6 & 3$\rightarrow$1 & 656.3 & 3$\rightarrow$2 &  &  &  &  &  & \\[1mm]
    121.6 & 2$\rightarrow$1 &  &  &  &  &  &  &  & \\[1mm]
    \hline
    $\frac{\lambda_{1,j}}{\lambda_{1,j+1}}$ & $j$ & $\frac{\lambda_{2,j}}{\lambda_{2,j+1}}$ & $j$ & $\frac{\lambda_{3,j}}{\lambda_{3,j+1}}$ & $j$ & $\frac{\lambda_{4,j}}{\lambda_{4,j+1}}$ & $j$ & $\frac{\lambda_{5,j}}{\lambda_{5,j+1}}$ & $j$ \\[4mm]
    \hline
    1.01 & 5 & 1.05 & 5 & 1.17 & 5 & 1.54 & 5 &  & \\[1mm]
    1.02 & 4 & 1.12 & 4 & 1.46 & 4 &  &  &  & \\[1mm]
    1.05 & 3 & 1.35 & 3 &  &  &  &  &  & \\[1mm]
    1.18 & 2 &  &  &  &  &  &  &  & \\[1mm]
    \hline
    \end{tabular}
    \caption{Expected hydrogen wavelengths, transitions and wavelength ratios.} 
    \end{table*}

여기에 전문이 있습니다.
\documentclass[aps,prl,reprint,twocolumn,secnumarabic,nobalancelastpage,amsmath,amssymb,nofootinbib]{revtex4}

        % nofootinbib is another document class option that allows you to put
        % footnotes on the page where they occur rather than at the end of the
        % paper.  This makes for easier reading!

        % secnumarabic is a particularly nice way of identifying sections by
        % number to aid electronic review and commentary.

        % amsmath and amssymb are necessary for the subequations environment
        % among others

        \usepackage{graphics}      % standard graphics specifications
        \usepackage{graphicx}      % alternative graphics specifications
        \usepackage{longtable}     % helps with long table options
        \usepackage{url}           % for on-line citations
        \usepackage{bm}            % special 'bold-math' package
        \usepackage{comment}
        \usepackage{fancyhdr}% http://ctan.org/pkg/{fancyhdr,graphicx,lastpage}
        \usepackage{color} 
        \usepackage{atbegshi}
        \usepackage{textcomp}
        \usepackage{siunitx}
        \usepackage{lipsum}
        \usepackage{float}
        \usepackage{array}
        \usepackage{tabularx}   % for 'tabularx' environment
        \newcolumntype{C}{>{\centering\arraybackslash}X}
        \usepackage{booktabs}   % for '\toprule', '\midrule', etc
        \usepackage{amsmath}    % for '\dfrac' macro 




        \newcommand \widebox [1]{\setlength\fboxsep{6pt} \boxed { #1}}
        \newcommand \ev [1]{\left\langle #1 \right\rangle}
        \newcommand \evd {\operatorname{E}\evdel}
        \newcommand \bbrac [1] {\left ( #1 \right)}
        \newcommand \bl {\biggr | }
        \newcommand \espa {\\[2.5 mm]}
        \newcommand \vbrac [1] {\left [ \,#1 \,\right]}
        \newcommand \dpart [2] {\frac{\partial{#1}}{\partial{#2}}}
        \newcommand \kai [2] {\chi_{#1}^{\, (#2)}}
        \newcommand \ud {\uparrow \,\downarrow}
        \newcommand \du {\downarrow\,\uparrow }

        \fancyhf{}
        \pagestyle{fancy}
        \chead{MODERN \,\,\,PHYSICS\,\,\, LABOTORARY \\[-0.9em]} 
        \lhead{PHYSICS \textbf{18L}   \\[-1.1em]}
        \rhead{23 APRIL 2015 \\[-1.1em]}
        \cfoot{\thepage}
        \AtBeginDocument{%
          \rfoot{\raisebox{1.5pt}{\scalebox{0.7}{\textcopyright}} 2015  Physics Department}%
          \AtBeginShipoutNext{%
            \rfoot{}%
          }%
        }
        \renewcommand{\headrulewidth}{1pt}

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

답변1

m이 테이블에는 열 유형을 사용하지 않을 것입니다 . 대신에 나는 부분적으로 LaTeX가 열 너비를 결정하는 일을 처리하도록 하기 위해 중앙에 정렬된 X열 제공(패키지에서 제공 ) 형식을 사용할 것입니다. tabularx별도로, 저는 패키지의 선 그리기 매크로를 사용하여 booktabs적당한 간격의 수평선을 얻었습니다. 게다가 모든 수직선을 생략하겠습니다.

테이블의 유일한 "까다로운" 측면은 대부분의 셀 내용이 중앙에 정렬되어야 하는 반면, 첫 번째 열의 처음 5개 데이터 행의 내용은 소수 구분 기호에 정렬하면 이점이 있다는 것입니다. 이는 (i) 첫 번째 열에 대해 S열 유형(패키지에서 제공 siunitx)을 사용하고 (ii) 첫 번째 열에서 가운데에 배치되어야 하는 항목을 중괄호 쌍으로 묶어서 달성할 수 있습니다 .

마지막으로, 각 행에 수동으로 추가 행 높이를 1mm 추가하는 것보다 매크로를 \extrarowheight해당 값으로 설정하는 것이 더 쉽다고 생각합니다.

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

\documentclass[twocolumn]{article}
\usepackage{tabularx}   % for 'tabularx' environment
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{booktabs}   % for '\toprule', '\midrule', etc
\usepackage{amsmath}    % for '\dfrac' macro 
\usepackage{siunitx}    % for "S" column type

\begin{document}
\begin{table*}
   \setlength\tabcolsep{2pt}  % default value: 6pt
   \setlength\extrarowheight{1mm}
   \small
    \begin{tabularx}{\textwidth}{@{} S[table-format=3.2] *{9}{C} @{}}
    \toprule
    \multicolumn{2}{@{}c}{\bfseries Lyman} &
    \multicolumn{2}{c}{\bfseries Balmer} &
    \multicolumn{2}{c}{\bfseries Paschen} &
    \multicolumn{2}{c}{\bfseries Brackett} &
    \multicolumn{2}{c@{}}{\bfseries Pfund} \\
    \cmidrule(r){1-2} \cmidrule(lr){3-4} \cmidrule(lr){5-6}
        \cmidrule(lr){7-8} \cmidrule(l){9-10}
    \multicolumn{1}{C}{$\lambda$ (nm)} & transition &
    $\lambda$ (nm) & transition & $\lambda$ (nm) & transition &
    $\lambda$ (nm) & transition & $\lambda$ (nm) & transition \\
    \midrule
    93.78 & 6$\to$1 & 410.2 & 6$\to$2 & 1094 & 6$\to$3 & 2630 & 6$\to$4 & 7400 & 6$\to$5 \\
    94.98 & 5$\to$1 & 434.0 & 5$\to$2 & 1282 & 5$\to$3 & 4050 & 5$\to$4 \\
    97.25 & 4$\to$1 & 486.1 & 4$\to$2 & 1875 & 4$\to$3 \\
    102.6 & 3$\to$1 & 656.3 & 3$\to$2  \\
    121.6 & 2$\to$1 \\
    \midrule
     {$\dfrac{\lambda_{1,j}}{\lambda_{1,j+1}}$} & $j$ &
      $\dfrac{\lambda_{2,j}}{\lambda_{2,j+1}}$  & $j$ &
      $\dfrac{\lambda_{3,j}}{\lambda_{3,j+1}}$  & $j$ &
      $\dfrac{\lambda_{4,j}}{\lambda_{4,j+1}}$  & $j$ &
      $\dfrac{\lambda_{5,j}}{\lambda_{5,j+1}}$  & $j$ \\
    \cmidrule(r){1-2} \cmidrule(lr){3-4} \cmidrule(lr){5-6}
        \cmidrule(lr){7-8} \cmidrule(l){9-10}
    {1.01} & 5 & 1.05 & 5 & 1.17 & 5 & 1.54 & 5 \\
    {1.02} & 4 & 1.12 & 4 & 1.46 & 4 \\
    {1.05} & 3 & 1.35 & 3  \\
    {1.18} & 2 \\
    \bottomrule
    \end{tabularx}
    \caption{Expected hydrogen wavelengths, transitions and wavelength ratios.}
\end{table*}
\end{document}

부록OP는 패키지 및 해당 규칙 그리기 매크로 revtex4와 호환되지 않는 것으로 보이는 문서 클래스를 사용하고 있다고 나에게 알렸습니다. booktabs:-(

revtex4다음은 문서 클래스뿐만 아니라 다른 많은 문서 클래스에서도 작동하는 대체 솔루션입니다 . tabular*환경 대신 환경을 사용하며 , 와 에 의해 그려진 선과 선 위와 아래의 재료 tabularx사이에 더 나은 수직 분리를 얻기 위해 선택한 위치에 (인쇄상의) 스트러트를 삽입합니다 .\hline\cline

그런데 나는 여전히 이 솔루션에 수직선을 사용하지 않을 것입니다.

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

\documentclass{revtex4}
%% define a few struts
%% (from code by Claudio Beccari in TeX and TUG News, Vol. 2, 1993)
\newcommand\Tstrut{\rule{0pt}{2.9ex}}       % "top" strut
\newcommand\Bstrut{\rule[-1.2ex]{0pt}{0pt}} % "bottom" strut
\newcommand\TBstrut{\Tstrut\Bstrut}         % "top and bottom" strut

\usepackage{array}      % for '\extrarowheight' macro
\usepackage{amsmath}    % for '\dfrac' macro
\usepackage{siunitx}    % for "S" column type

\begin{document}
\begin{table*}
   \setlength\tabcolsep{0pt}  % default value: 6pt
   \setlength\extrarowheight{1mm}
    \begin{tabular*}{\textwidth}{ S[table-format=3.2] @{\extracolsep{\fill}} *{9}{c} }
    \hline
    \multicolumn{2}{c}{\bfseries Lyman\TBstrut} &
    \multicolumn{2}{c}{\bfseries Balmer} &
    \multicolumn{2}{c}{\bfseries Paschen} &
    \multicolumn{2}{c}{\bfseries Brackett} &
    \multicolumn{2}{c}{\bfseries Pfund} \\
    \cline{1-2} \cline{3-4} \cline{5-6} \cline{7-8} \cline{9-10}
    {$\lambda$ (nm)\TBstrut} & transition &
    $\lambda$ (nm) & transition & $\lambda$ (nm) & transition &
    $\lambda$ (nm) & transition & $\lambda$ (nm) & transition \\
    \hline
    93.78 \Tstrut& 6$\to$1 & 410.2 & 6$\to$2 & 1094 & 6$\to$3 & 2630 & 6$\to$4 & 7400 & 6$\to$5 \\
    94.98 & 5$\to$1 & 434.0 & 5$\to$2 & 1282 & 5$\to$3 & 4050 & 5$\to$4 \\
    97.25 & 4$\to$1 & 486.1 & 4$\to$2 & 1875 & 4$\to$3 \\
    102.6 & 3$\to$1 & 656.3 & 3$\to$2  \\
    121.6 \Bstrut & 2$\to$1 \\
    \hline
     {$\dfrac{\lambda_{1,j}\Tstrut}{\lambda_{1,j+1}\Bstrut}$} & $j$ &
      $\dfrac{\lambda_{2,j}}{\lambda_{2,j+1}}$ & $j$ &
      $\dfrac{\lambda_{3,j}}{\lambda_{3,j+1}}$ & $j$ &
      $\dfrac{\lambda_{4,j}}{\lambda_{4,j+1}}$ & $j$ &
      $\dfrac{\lambda_{5,j}}{\lambda_{5,j+1}}$ & $j$ \\
    \cline{1-2} \cline{3-4} \cline{5-6} \cline{7-8} \cline{9-10}
    {1.01\Tstrut} & 5 & 1.05 & 5 & 1.17 & 5 & 1.54 & 5 \\
    {1.02} & 4 & 1.12 & 4 & 1.46 & 4 \\
    {1.05} & 3 & 1.35 & 3  \\
    {1.18\Bstrut} & 2 \\
    \hline
    \end{tabular*}
    \caption{Expected hydrogen wavelengths, transitions and wavelength ratios.}
\end{table*}
\end{document} 

답변2

David는 m-specifier를 언급하고 있습니다.

\newcolumntype{M}{>{\centering\arraybackslash}m{\dimexpr.096\linewidth-2\tabcolsep}}

다음과 같은 레이아웃은 어떻습니까?

\documentclass[a4paper,10pt]{article}
\usepackage{tabularx,booktabs,geometry}
\geometry{textwidth=15cm}

\begin{document}
\noindent
\footnotesize
\begin{tabularx}{\linewidth}{@{}*{5}{>{\centering}p{.9cm}>{\hfil}X<{\hfil}}@{}}
  \toprule
  \multicolumn{2}{@{}l}{Lyman} & \multicolumn{2}{l}{Balmer} & 
  \multicolumn{2}{l}{Paschen}  & \multicolumn{2}{l}{Brackett} & 
  \multicolumn{2}{l}{Pfund} \\\cmidrule(r){1-2}%
  \cmidrule(lr){3-4}\cmidrule(lr){5-6}%
  \cmidrule(lr){7-8}\cmidrule(l){9-10}
  $\lambda$(nm) & transition & $\lambda$(nm) & transition & 
  $\lambda$(nm) & transition & $\lambda$(nm) & transition & 
  $\lambda$(nm) & transition \\\cmidrule(r){1-1}%
  \cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}%
  \cmidrule(lr){5-5}\cmidrule(lr){6-6}\cmidrule(lr){7-7}%
  \cmidrule(lr){8-8}\cmidrule(lr){9-9}\cmidrule(l){10-10}
  %%
  93.78 & 6$\rightarrow$1 & 410.2 & 6$\rightarrow$2 & 
  1094  & 6$\rightarrow$3 & 2630  & 6$\rightarrow$4 & 
  7400  & 6$\rightarrow$5                               \\
  94.98 & 5$\rightarrow$1 & 434.0 & 5$\rightarrow$2 & 
  1282  & 5$\rightarrow$3 & 4050  & 5$\rightarrow$4 &   \\
  97.25 & 4$\rightarrow$1 & 486.1 & 4$\rightarrow$2 & 
  1875  & 4$\rightarrow$3 &                             \\
  102.6 & 3$\rightarrow$1 & 656.3 & 3$\rightarrow$2 &   \\
  121.6 & 2$\rightarrow$1 \\ \cmidrule{1-10}
  %%
  $\frac{\lambda_{1,j}}{\lambda_{1,j+1}}$ & $j$ & 
  $\frac{\lambda_{2,j}}{\lambda_{2,j+1}}$ & $j$ & 
  $\frac{\lambda_{3,j}}{\lambda_{3,j+1}}$ & $j$ & 
  $\frac{\lambda_{4,j}}{\lambda_{4,j+1}}$ & $j$ & 
  $\frac{\lambda_{5,j}}{\lambda_{5,j+1}}$ & $j$ \\ \cmidrule{1-10}
  1.01 & 5 & 1.05 & 5 & 1.17 & 5 & 1.54 & 5  \\
  1.02 & 4 & 1.12 & 4 & 1.46 & 4             \\
  1.05 & 3 & 1.35 & 3                        \\
  1.18 & 2                                   \\
  \bottomrule
\end{tabularx}
\end{document}

관련 정보