![由于部分原因导致两列文档错位](https://linux22.com/image/408647/%E7%94%B1%E4%BA%8E%E9%83%A8%E5%88%86%E5%8E%9F%E5%9B%A0%E5%AF%BC%E8%87%B4%E4%B8%A4%E5%88%97%E6%96%87%E6%A1%A3%E9%94%99%E4%BD%8D.png)
我table*
在一篇twocolumn
文章中有一个环境。表格之后,两边的文本未对齐,这种情况只会在表格之后立即出现一个部分时发生。
我该如何摆脱它并完美对齐列?
\documentclass[twocolumn]{scrartcl}
\usepackage{blindtext}
\usepackage{placeins}
\begin{document}
\blindtext[1]
\begin{table*}[t]
\centering
\caption{Table A}
\begin{tabular}{c|c}
A & B \\
C & D
\end{tabular}
\end{table*}
\FloatBarrier
\section{Test}
\blindtext[4]
\end{document}
答案1
正如芭芭拉·比顿 (barbara beeton) 所说,\section
标题并没有占用整数行数。
您可以使用宏在标题后添加/减去空格\vspace
。下面是我使用过该宏的 MWE 编辑版本;我还使用了它,lipsum
因为它提供了多个段落。
% twocolprob.tex SE 530027 not grid set
\documentclass[twocolumn]{scrartcl}
\usepackage{blindtext}
\usepackage{lipsum}
\usepackage{placeins}
\raggedbottom % need this because of changing vertical spacing(?)
\begin{document}
\blindtext[1]
\begin{table*}[t]
\centering
\caption{Table A}
\begin{tabular}{c|c}
A & B \\
C & D
\end{tabular}
\end{table*}
\FloatBarrier
\section{Test}
%\vspace{-10pt} % moves text up after heading
\vspace{3pt} % moves text down after heading
%\blindtext[4]
\lipsum
\end{document}
一般来说,\vspace
宏长度需要根据特定的文档样式进行调整。