
可能的重複:
如何將文字環繞在圖形周圍?
換行後文字寬度錯誤
我有以下問題:我使用包裝圖來包含浮動圖片。但問題是,下面的公式也會受到wrapfigure的textwidth的影響,所以圖形不會超過整行,而只是wrapfigure中設定的一半textwidth!
這是我的程式碼
\documentclass{book}
\usepackage{wrapfigure}
\usepackage{shadethm}
\usepackage{mdframed}
\newtheoremstyle{mystyle}
{\topsep}{\topsep}{}{}%
{\bfseries}{:}{.5em}{}%
\theoremstyle{mystyle}
\newmdtheoremenv[hidealllines=true,backgroundcolor=red,skipabove=\topsep,
skipbelow=\topsep]{example}{Example}
\newmdtheoremenv[hidealllines=true,
backgroundcolor=blue,skipabove=\topsep,
skipbelow=\topsep]{formula}{Formula}
\begin{document}
\subsection{Subsection with wrapfigure}
text text text text wich goes around the picture text text text text text text text
\begin{wrapfigure}{l}{0.5\textwidth}
\begin{center}
\includegraphics[scale=1]{picure.png}%width=0.48\textwidth
\end{center}
\caption{Caption}
\label{fig:zins}
\end{wrapfigure}
\noindent text text text
\begin{formel}[formula name] \label{geom}
$\\ \x + y +h+f+d+s+c+x+c+s+e+w+q+d+s+d+e=2323232323 +231231231 = 44$\\
or\\
$\bar{x}_{Geom}=\sqrt[n]{\frac{end}{begin}}$
\end{formel}
text text text text text text text text text text
\end{document}
所以正如我所說,公式看起來是錯誤的,它只是寫了一半的空間,就像在wrapfigure中設置的textwidth一樣,當我添加一個
\begin{wrapfigure}{l}{0cm}\end{wrapfigure}
在公式之前,那麼公式是正確的,但是下面的文字和項目的縮排是錯誤的?
好的,解決方法:前面加上\par,謝謝!