Latex Tex:wrapfig包对齐文本时出现问题

Latex Tex:wrapfig包对齐文本时出现问题,latex,tex,Latex,Tex,使用wrapfig包,在节中包含一个表,表的第一行与包装它的文本不对齐。在区段外工作时不存在此问题 \documentclass{article} \usepackage{wrapfig} \usepackage{lipsum} \begin{document} \section{Section} \begin{wraptable}{l}{0pt} \begin{tabular}{cccc} A & B & C &

使用
wrapfig
包,在节中包含一个表,表的第一行与包装它的文本不对齐。在区段外工作时不存在此问题

\documentclass{article}

\usepackage{wrapfig}
\usepackage{lipsum}

\begin{document}

    \section{Section}

    \begin{wraptable}{l}{0pt}
        \begin{tabular}{cccc}
        A & B & C & D \\
        E & F & G &  H\\        
        \end{tabular}
    \label{Mytable}\caption{This is my table.}
    \end{wraptable}

\textbf{This bit of text should be aligned with the table's top row.}
\lipsum[2]

\end{document}
这样做的结果是:

而理想情况下,我希望得到如下结果:


您可以尝试调整
\intextsep

\documentclass{article}

\usepackage{wrapfig}
\usepackage{lipsum}




\begin{document}

    \section{Section}

{
\setlength\intextsep{-0.4ex}
    \begin{wraptable}{l}{0pt}
        \begin{tabular}{cccc}
        A & B & C & D \\
        E & F & G &  H\\        
        \end{tabular}
    \label{Mytable}\caption{This is my table.}
    \end{wraptable}

\textbf{This bit of text should be aligned with the table's top row.}
\lipsum[2]

}

\end{document}

那很有效,谢谢!如果我可以的话,你是如何选择.4ex度量的?@lomper.4ex只是一种尝试和错误。您可能需要微调该值。