
ボックスの前後のスペースに問題がありますtabular
。テーブルに 1 行しかない場合は、すべて問題ありません。
\documentclass{article}
\usepackage{setspace}
\begin{document}
\doublespacing
Some text.
\begin{tabular}{|l|}
\hline
Some text.\\
\hline
\end{tabular}
Some text.
\end{document}
しかし、新しい行を追加すると、表の前後の間隔が消えてしまいます。
\begin{tabular}{|l|}
\hline
Some text.\\ \hline
Some text.\\
\hline
\end{tabular}
これを修正するにはどうすればいいでしょうか?
答え1
flushleft
または が気に入らない場合はcenter
、 を使用できます\vspace
。
\documentclass{article}
\usepackage{setspace}
\begin{document}
\doublespacing
\noindent I think the best solution is with \texttt{flushleft} (or \texttt{center}) environment:
\begin{flushleft}
\begin{tabular}{|l|}
\hline
Some text.\\
\hline
Some text.\\
\hline
\end{tabular}
\end{flushleft}
Some text.
\noindent However, you could use \textbackslash\texttt{vspace*} and set any spacing you want:\vspace*{.1\baselineskip}
\noindent
\begin{tabular}{|l|}
\hline
Some text.\\
\hline
Some text.\\
\hline
\end{tabular}\vspace*{.2\baselineskip}
\noindent Some text.
\end{document}