\documentclass[10pt, twoside]{ctexbook}
\usepackage[paperwidth=185mm, paperheight=260mm, left=18.5mm, right=18.5mm, top=25.5mm, bottom=25.5mm]{geometry}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{wrapstuff}
\begin{document}
\begin{wrapstuff}[r,top=2]
\parbox{0.3\linewidth}{
\centering
\includegraphics[width=\linewidth]{example-image}
\captionof{figure}{什么原因}
\label{fig:4-3-2}
}
\end{wrapstuff}
如图 \ref{fig:4-3-2} 所示,在图片的左侧,公式的编号是不连续的,不知道什么原因呢:
\begin{equation}
1 +1 = 2
\label{eq:1}
\end{equation}
上面是第一个公式编号是 $1$。
我隐身了吗?
\begin{equation}
2 +2 =4
\label{eq:}
\end{equation}
我也隐身了呢
\begin{equation}
3 + 3= 6
\label{eq:3}
\end{equation}
下面的公式怎么回事呢,上面的内容都没了呢
\begin{equation}
4 + 4 = 8
\label{eq:4}
\end{equation}
怎么跳跃这么大呢。
\end{document}编译结果:
预期结果:
希望公式编号正常, 内容正常。
wrapstuff没那么聪明,需要自行根据情况在合适的位置加上\wrapstuffclear:
\documentclass[10pt, twoside]{ctexbook}
\usepackage[paperwidth=185mm, paperheight=260mm, left=18.5mm, right=18.5mm, top=25.5mm, bottom=25.5mm]{geometry}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{wrapstuff}
\begin{document}
\begin{wrapstuff}[r,top=2]
\parbox{0.3\linewidth}{
\centering
\includegraphics[width=\linewidth]{example-image}
\captionof{figure}{什么原因}
\label{fig:4-3-2}
}
\end{wrapstuff}
如图 \ref{fig:4-3-2} 所示,在图片的左侧,公式的编号是不连续的,不知道什么原因呢:
\begin{equation}
1 +1 = 2
\label{eq:1}
\end{equation}
上面是第一个公式编号是 $1$。
我隐身了吗?
\begin{equation}
2 +2 =4
\label{eq:}
\end{equation}
我也隐身了呢
\wrapstuffclear%<---------
我也隐身了吗
\begin{equation}
3 + 3= 6
\label{eq:3}
\end{equation}
下面的公式怎么回事呢,上面的内容都没了呢
\begin{equation}
4 + 4 = 8
\label{eq:4}
\end{equation}
怎么跳跃这么大呢。
\end{document}
另外,可以避免一些冗余代码:
ctexbook,它的twoside是默认选项,可忽略geometry,可以用hmargin和vmargin选项避免重复写18.5和25.5