The text is slightly higher than the image when initially starting the sentence. I have tried using vspace or \ to lower the sentence. But it just moves the whole image down with the text. Is there some simple fix like a package i'am missing. If i were to start the wrapfig on a new page the problem is gone though.
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{subfig}
\numberwithin{figure}{section}
\usepackage{wrapfig}
\usepackage{refstyle}
\graphicspath{{F}}
\usepackage{pdfcolparallel}
\usepackage{booktabs}
\usepackage{array}
\usepackage{pdflscape}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{multirow}
\setlength{\parindent}{0pt}
\begin{document}
\clearpage
\subsubsection{Stepped Nozzle}
bla blah blah
\begin{wrapfigure}{L}{0.45\textwidth}
\centering
\captionsetup{justification=centering}
\includegraphics[scale=.6]{liggy}
\caption{Ligament case}
\end{wrapfigure}
In figure 4.16, the stepped nozzle has produced a vast amount of ligaments on the bottom angle.
\end{document}
Best Answer
This is governed by the
\intextsep
length. You can set it to zero to avoid the empty space above and below thewrapfig
environment:If you wish the change to stay local (which I would advise), you can wrap the
\setlength
, thewrapfig
and the paragraph which is to be wrapped around the figure inside a group:Lastly, you could also put a negative
\vspace
inside thewrapfig
environment:The caveat of this solution is that if the
wrapfig
is at the top of a new page, it will be shifted above the first line (so you need to remove the\vspace
command). Also, it requires you to manually determine the appropriate amount by which to shift manually (\baselineskip
is probably what you usually want though).As a side note: I would generally not set
\parindent
to zero globally, unless you really want it to be zero everywhere, but instead use a\noindent
before a paragraph which is not supposed to start with an indented line.Edit:
Result for the second code snippet:
EDIT 2:
The reason why you'd almost certainly want your changes to
\intextsep
to stay local is that it is a LaTeX length for governing float behavior, not something specific towrapfig
. As per Lamport in LaTeX - A Document Preparation System:(p.200, Section C.9.1)
EDIT 3:
In response to user's comment, here's the code which produces the desired result for me when doing this multiple times: