Wrapfig 包装部分文本,但不是全部

Wrapfig 包装部分文本,但不是全部

我在使用 时遇到了问题wrapfig。不知出于什么原因,即使使用负数\vspace和较小的“窄线数”参数,此图下方仍有大量令人讨厌的空白。更糟糕的是,有一行本应换行,但实际上却没有换行!这是一张图片。

有些行会换行,有些则不会,但我说不出为什么

我不知道如何诱发或隔离这个错误——我试过的所有非平凡方法都无济于事——所以我的 MWE 只是在我知道如何安全地做到这一点的情况下尽可能地小。这是一个更大的文档的一部分,这个问题以前也出现过,但直到现在我才想不出更好的办法来放置东西。

\documentclass[letterpaper,oneside]{article}
\usepackage[margin=2.25cm]{geometry}
\usepackage{amsmath}
\usepackage{parskip}
\usepackage{wrapfig}

\newenvironment{exer}{\textit{Exercise}.\,}{\par}

\begin{document}

To reduce to the 3-connected case, first observe the easy reduction to the 
connected case: a matroid is graphic iff its components are. Then, consider a 
2-separation $(X,Y)$ of a binary $M = M(A)$. Since ${\sqcap}(X,Y) = 1$, there 
is a unique nonzero $v \in \mathrm{Col}(A|X) \cap \mathrm{Col}(A|Y)$. Define 
$M^+ = M([\,A~v\,])$ with $E(M^+) = E(M) \sqcup \{\bullet\}$. Then let $M_X = 
M^+ | (X \cup \{\bullet\})$ and $M_Y = M^+ | (Y \cup \{\bullet\})$. Up to row 
operations, $M^+$ has a representation of the form at right (where parts marked 
$\cdots$ are part of the nonzero submatrix above or below it).

\begin{wrapfigure}{r}[1em]{0.25\textwidth}
  \vspace{-4ex}
  \begin{center}
    $\begin{bmatrix} M_X\backslash\bullet & 0 & 0 \\
                     {\cdots} & 1 & {\cdots} \\
                     0 & 0 & M_Y\backslash\bullet \end{bmatrix}$
  \end{center}
  \vspace{-5ex}
\end{wrapfigure}

\begin{exer} Show that $M$ has an $M_X$-minor and an $M_Y$-minor. \end{exer}

\begin{exer} Show that $M$ is graphic iff $M_X$ and $M_Y$ are. \end{exer}

The existence of a sequence of minors beginning from a wheel is handled by 
Tutte's Wheels and Whirls---observe that whirls are not graphic, so if the 
sequence begins there, the matroid fails to be graphic.

Consider the inductive case where $M$ is a 3-connected binary matroid, and $M 
\backslash e = M(G)$ is 3-connected and graphic for some $e \in E(M)$. The 
incidence matrix of $G$ is a representation of $M \backslash e$, so we may 
suppose that the representation of $M$ is exactly that with a new vector $t$ 
appended representing $e$.

\end{document}

能解释一下到底出了什么问题吗?我该怎么做才能避免以后再出现这个问题?

答案1

首先,你可以使用 来节省一些空间\centering。其次,给 wrapfig 指定行数可以减少不确定性。最后也是最重要的,\WFclear确保它保持死状态。

顺便说一句,如果你将行数减少到 1 并使用,\vspace(-6ex}你可以进一步减少保留的空间。只需记住顶部的空间恰好在那里。

WFclear

\documentclass[letterpaper,oneside]{article}
\usepackage[margin=2.25cm]{geometry}
\usepackage{amsmath}
\usepackage{parskip}
\usepackage{wrapfig}

\newenvironment{exer}{\textit{Exercise}.\,}{\par}

\begin{document}

To reduce to the 3-connected case, first observe the easy reduction to the 
connected case: a matroid is graphic iff its components are. Then, consider a 
2-separation $(X,Y)$ of a binary $M = M(A)$. Since ${\sqcap}(X,Y) = 1$, there 
is a unique nonzero $v \in \mathrm{Col}(A|X) \cap \mathrm{Col}(A|Y)$. Define 
$M^+ = M([\,A~v\,])$ with $E(M^+) = E(M) \sqcup \{\bullet\}$. Then let $M_X = 
M^+ | (X \cup \{\bullet\})$ and $M_Y = M^+ | (Y \cup \{\bullet\})$. Up to row 
operations, $M^+$ has a representation of the form at right (where parts marked 
$\cdots$ are part of the nonzero submatrix above or below it).

\begin{wrapfigure}[2]{r}[1em]{0.25\textwidth}
  \vspace{-4ex}
  \centering
    $\begin{bmatrix} M_X\backslash\bullet & 0 & 0 \\
                     {\cdots} & 1 & {\cdots} \\
                     0 & 0 & M_Y\backslash\bullet \end{bmatrix}$
\end{wrapfigure}

\begin{exer} Show that $M$ has an $M_X$-minor and an $M_Y$-minor. \end{exer}

\begin{exer} Show that $M$ is graphic iff $M_X$ and $M_Y$ are. \end{exer}

The existence of a sequence of minors beginning from a wheel is handled by 
Tutte's Wheels and Whirls---observe that whirls are not graphic, so if the 
sequence begins there, the matroid fails to be graphic.
\WFclear

Consider the inductive case where $M$ is a 3-connected binary matroid, and 
$M \backslash e = M(G)$ is 3-connected and graphic for some $e \in E(M)$. The 
incidence matrix of $G$ is a representation of $M \backslash e$, so we may 
suppose that the representation of $M$ is exactly that with a new vector $t$ 
appended representing $e$.

\end{document}

相关内容