TeX のキャプションと表の間のスペース

TeX のキャプションと表の間のスペース

このコードを持っています

\begin{table}[h]
\caption{Numerical example geometry}
\label{tab_numerical_geo}
\begin{center}
\scalebox{0.9}{
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
$d^A$  & $d^B$  & $d^C$  & $l^A_{12}$ & $l^C_{12}$ & $h^A$ & $h^C$ \\
\hline
-0.4434 & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\
\hline
\end{tabular}
}
\end{center}
\end{table}

表のサイズを小さくするために使用しています\scaleboxが、キャプションと表の間のスペースが狭くなっています。使用しないとスペースができるので、記事には適しています。

スペースを維持しながらテーブルのサイズを縮小する方法を知っている人はいますか?\footnotesizeの代わりに を試してみました\reduceboxが、結果は同じでした。ありがとうございます!

答え1

いくつかの提案:

  • キャプションと表形式の資料の間にもう少しスペースを作るには、captionパッケージをロードし、オプション に必要な値を指定しますskip。以下の例では、 を設定していますskip=0.5\baselineskip

  • 使用しないでくださいcenter 環境;内ではtable、代わりに\centering 大きい

  • データ行の素材には負の数値が含まれる可能性があるので、array環境ではなく環境を使用します。そうすることで、ヘッダー行にtabularたくさんの記号を入力する必要がなくなります。$

  • より小さいフォント サイズを使用する必要がある場合は、 を使用しないでください\scalebox。使用すると、非常に「細長い」出力が作成されます。代わりに、\small(フォント サイズを 10% 線形に縮小する場合) または\footnotesize(フォント サイズを 20% 線形に縮小する場合) を使用します。

  • ヘッダー行とデータ行の間隔を広げるには、タイポグラフィック ストラットを挿入します。

ここに画像の説明を入力してください

\documentclass{article}
\usepackage[skip=0.5\baselineskip]{caption}
%% 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

\begin{document}

\begin{table}
\caption{Numerical example geometry}
\label{tab_numerical_geo}
\small % better than \scalebox{0.9}{...}
\centering
$\begin{array}{|*{7}{c|}}
\hline
d^A\TBstrut & d^B  & d^C  & l^{A}_{12} & l^C_{12} & h^A & h^C \\
\hline
-0.4434\TBstrut & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\
\hline
\end{array}$
\end{table}
\end{document}

答え2

\bigskipキャプションの後に追加してみてください。空白行が追加され、必要なスペースが作成されます。

\documentclass{article} 
\usepackage[utf8]{inputenc}
\begin{document}
\begin{table}[h]
\caption{Numerical example geometry}
\bigskip
\label{tab_numerical_geo}
\begin{center}
\scalebox{0.9}{
...

答え3

パッケージcaptionとを使用します\resizebox:

\documentclass[twocolumn]{article}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{blindtext}
\begin{document}
    \blindtext
    \begin{table}[!htb]
    \caption{Numerical example geometry\strut}\label{tab_numerical_geo}
    \centering
    \resizebox{\linewidth}{!}{%
    \begin{tabular}{@{}ccccccc@{}}\toprule
    $d^A$  & $d^B$  & $d^C$  & $l^A_{12}$ & $l^C_{12}$ & $h^A$ & $h^C$ \\   \midrule
    $-0.4434$ & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\\bottomrule
    \end{tabular}}
    \end{table}

    \blindtext
\end{document}

ここに画像の説明を入力してください

答え4

表の組版に関する提案をいくつか以下に示します。制約がわからないと、より具体的にすることは困難です。キャプションが表の上部に近づきすぎないようにするために、\strutキャプションの最後に を使用しました。

    \documentclass{article}
    \usepackage{booktabs}
    \begin{document}
    \begin{table}
        \caption{Numerical example geometry\strut}
        \label{tab_numerical_geo}
        \centering
        \begin{tabular}{@{}ccccccc@{}}
        \toprule
        $d^A$  & $d^B$  & $d^C$  & $l^A_{12}$ & $l^C_{12}$ & $h^A$ & $h^C$ \\
        \midrule
        $-0.4434$ & 0.3455 & 0.7798 & 0.1023 & 0.1523 & 0.04 & 0.023 \\
        \bottomrule
        \end{tabular}
    \end{table}

    \begin{table}
        \caption{Numerical example geometry\strut}
        \label{tab_numerical_geo2}
        \catcode`!=\active
        \def!{\phantom0}
        \centering
        \begin{tabular}{@{}lr@{}}
        \toprule
        $d^A$       &$-0.4434$ \\
        $d^B$       &0.3455  \\  
        $d^C$       &0.7798  \\
        $l^A_{12}$  &0.1023  \\     
        $l^C_{12}$  &0.1523  \\  
        $h^A$       &0.04!!  \\
        $h^C$       &0.023!  \\
        \bottomrule
        \end{tabular}
    \end{table}
    \begin{table}
        \caption{Numerical example geometry\strut}
        \label{tab_numerical_geo3}
        \catcode`!=\active
        \def!{\phantom0}
        \centering
        \begin{tabular}{@{}lr@{\qquad}lr@{}}
        \toprule
        $d^A$       &$-0.4434$ &
        $d^B$       &0.3455  \\  
        $d^C$       &0.7798   & 
        $l^A_{12}$  &0.1023  \\     
        $l^C_{12}$  &0.1523   & 
        $h^A$       &0.04!!  \\
        $h^C$       &0.023!  \\
        \bottomrule
        \end{tabular}
    \end{table}

    \end{document}

ここに画像の説明を入力してください

ここに画像の説明を入力してください

ここに画像の説明を入力してください

関連情報