# \setlength{\leftskip} affects the “wrapfigure” environment

For some reason, I need to indent every paragraph, and so I'm using \setlength{\leftskip}.

However, when I use this command, wrapped figures are pushed right as far as the indentation, as shown below.

Is there any solution or an alternative for an indention approach other than \leftskip?

\documentclass{article}
\usepackage{wrapfig}
\usepackage{lipsum}

\begin{document}

\setlength{\leftskip}{2cm}
\lipsum[1]
\begin{wrapfigure}{r}{4cm}
\centering
\rule{4cm}{7cm}
\end{wrapfigure}
\lipsum[1-4]

\end{document}


• "For some reason, I need to indent every paragraph,": Couldn't you obtain a similar output by changing the left margin using the geometry package? – leandriis Sep 16 '19 at 16:55
• \leftskip is a tex primitive and should never be set directly in latex (it will break most latex display constricts and lists, not just wrapfig) – David Carlisle Sep 16 '19 at 17:25
• Thank you both! I've solved by using the geometry package and avoiding using 'leftskip. – user12037364 Sep 17 '19 at 8:55