In the image below, you can see a gap in the text which starts at the point where I begin the wrapfigure environmment. How do I remove that gap?
Preamble includes:
\usepackage{wrapfig}
\setlength\intextsep{10pt}
Body:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras risus nunc, tincidunt a euismod malesuada, placerat vitae massa. Proin feugiat nibh a neque vestibulum ultricies. In ex augue,
\begin{wrapfigure}{r}{0.3\textwidth}
\centering
\textcolor{Maroon4}{\rule{1pt}{108pt}}
\includegraphics[width=.85\linewidth]{~/Library/Mobile Documents/iCloud~md~obsidian/Documents/williamfeeney/Assets/Attachments/gold F copy.png}
\caption{Caption text Caption text may Caption text.}
\end{wrapfigure}varius id vulputate aliquet, vehicula id dolor. Praesent ultrices lacinia suscipit. Quisque cursus iaculis risus eu pellentesque. Maecenas mattis pretium justo, nec accumsan ipsum. Nam purus purus, elementum sed lorem vitae, fermentum hendrerit ex. Vivamus velit neque, interdum non efficitur at, euismod id quam.
Graphics, Figures & Tables ⇒ how to remove gap between text in wrapfigure environment
how to remove gap between text in wrapfigure environment
- Attachments
-
- Screenshot 2023-08-16 at 6.29.43 PM.png (298.34 KiB) Viewed 10064 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
how to remove gap between text in wrapfigure environment
If you are speaking of the vertical gap, then inserting
If you mean the horizontal gap, try changing the value of
\vspace{1ex}
or some other length will work. You could also try changing \intextsep
, but that will change all the other figures, too.If you mean the horizontal gap, try changing the value of
\columnsep
.how to remove gap between text in wrapfigure environment
It's not the vertical gap above the figure, or the horizontal gap; it's the vertical gap between the lines of text I'd like to remove, so it looks like below. Note, there is no space between the lines of text, like in the above example.
- Attachments
-
- Screenshot 2023-08-16 at 10.39.14 PM.png (385.95 KiB) Viewed 10034 times
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
how to remove gap between text in wrapfigure environment
Ah, I see.
The wrapfigure package has trouble with this particular idea, because it requires predicting when a particular line will end before the paragraph is finished, and TeX doesn't work that way. I have had much better luck putting wrapfigures at the beginning or end of paragraphs.
If you're dead-set on putting a wrapped figure into the middle of a paragraph, then your best bet is trial-and-error: move words around and/or edit the text until you get a line to end in exactly the right place before the wrapped figure and mess with the spacing manually until the paragraph break that results doesn't look like an actual paragraph break.
The wrapfigure package has trouble with this particular idea, because it requires predicting when a particular line will end before the paragraph is finished, and TeX doesn't work that way. I have had much better luck putting wrapfigures at the beginning or end of paragraphs.
If you're dead-set on putting a wrapped figure into the middle of a paragraph, then your best bet is trial-and-error: move words around and/or edit the text until you get a line to end in exactly the right place before the wrapped figure and mess with the spacing manually until the paragraph break that results doesn't look like an actual paragraph break.
how to remove gap between text in wrapfigure environment
Thanks for the advice; it's been my experience. I've tried wrapfigure inside a minipage and a tcolorbox, but no difference. I am resigning myself to putting the figures at the beginning of paragraphs that mention the figure. Putting them at the end of paragraphs leaves them isolated below the paragraph.