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}

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

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

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

관련 정보