TeX - LaTeX Asked by Yura Holubeu on November 18, 2020
I tried to use wrapfigure
, and I had some problems.
After compiling I got
The text of this picture was:
begin{wrapfigure}{R}{0.5textwidth}
centering
includegraphics[width=0.5textwidth]{reactdvig.png}
caption{label{fig:frog1}This is a figure caption.}
vspace{-baselineskip}
end{wrapfigure}
I disliked at all these blank spaces, so I googled and I found that I need to put ~vspace{-baselineskip}
after end{wrapfigure}
. Unfortunately, I got
So nothing is good, I have formulas on place, which is devoted to space between picture and caption.
How can I make it working properly?
Why I have such problems? Is wrapfigure so undeveloped, or I just don’t know how to use it?
Thanks in advance.
Ok, this was a stupid question, I forgot that there should be a parameter [14]
, so code should like:
begin{wrapfigure}[14]{R}{0.5textwidth}
centering
includegraphics[width=0.5textwidth]{reactdvig.png}
caption{примерный вид реактивного сопла}
vspace{-baselineskip}
end{wrapfigure}
Correct answer by Yura Holubeu on November 18, 2020
You don't show the critical input text, but it appears you have blank lines (par
) around your equations:
text text text
begin{equation}
math math math
end{equation}
because more text text
That is wrong! It is giving you indented paragraphs on the lines between equations when you are in the middle of a sentence. It may also lead to poor page breaks (having a page start with an equation). It also hurts the operation of wrapfig in two ways:
As you found early on, when the wrapping paragraph begins inside an equation environment (or other local group) the wrapping may get stuck "on". If you eliminate the blank lines you won't need the hack of ~vspace{-baselineskip}
(which functions to start the paragraph with a hidden line of no-text).
LaTeX also does something like ~vspace{-baselineskip}
internally when you put an equation at the beginning of a paragraph (still within the equation local group) which counts as a line and so messes up the line count for wrapping. For 3 equations in the wrapped segments, it would give a miscount of 3. Since a value of 14 looks right, my guess is that wrapfig should have chosen 11, which came out too short.
So use
text text text
%
begin{equation}
math math math
end{equation}
%
because more text text
Answered by Donald Arseneau on November 18, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP