我对框前后的间距有些困扰tabular
。当我的表格只有一行时,一切都没问题。
\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}