KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당

다음 예에서 보듯이 이미 table 환경이 위 아래 간격을 조정해 놓은 상태에서 center 환경은 더이상 간격을 조정하지 않아서 \centering과 큰 차이가 보이지 않습니다. 물론 table 환경이나 figure 환경을 사용하지 않을 때는 프로그레스님의 설명처럼 차이가 나는 것이 맞지요.

하지만 혹시 페이지를 넘어간 다음에 한 페이지 안에서 간격을 다시 미세조정(?)할 때는 center 환경과 \centering에 차이가 있는지 모르겠습니다. 귀찮아서 더 해보지 않았어요.ㅠㅠ

\documentclass{article}
\usepackage{indentfirst}

\begin{document}

\section*{\textbackslash centering vs. center environment}

\textsf{this is the loooooooooooonoooog text.}\par
\begin{table}[h]
\begin{center}
this is the loooooooooooonoooog text.\par
%\begin{center}
\begin{tabular}{lr}\hline
Dummy&Dummy\\\hline
Dummy&Dummy\\
Dummy&Dummy\\\hline
\end{tabular}
\end{center}
\caption{center environment}
\end{table}

\textsf{this is the loooooooooooonoooog text.}\par
\begin{table}[h]
\centering
this is the loooooooooooonoooog text.\par
%\centering
\begin{tabular}{lr}\hline
Dummy&Dummy\\\hline
Dummy&Dummy\\
Dummy&Dummy\\\hline
\end{tabular}
\caption{\textbackslash centering}
\end{table}

\textsf{this is the loooooooooooonoooog text.}\par
\begin{table}[h]
\begin{center}
\begin{tabular}{lr}\hline
Dummy&Dummy\\\hline
Dummy&Dummy\\
Dummy&Dummy\\\hline
\end{tabular}
\caption{center environment}
\end{center}
\end{table}

\textsf{this is the loooooooooooonoooog text.}\par
\begin{table}[h!]
\centering
\begin{tabular}{lr}\hline
Dummy&Dummy\\\hline
Dummy&Dummy\\
Dummy&Dummy\\\hline
\end{tabular}
\caption{\textbackslash centering}
\end{table}

\textsf{this is the loooooooooooonoooog text.}

\end{document}

 

KTUG 한국 텍 사용자 그룹