# Why standalone class reverses \parshape indentation (such that it appears on the end of each line, not the beginning) and how to change that?

You can replace \documentclass[varwidth]{standalone} with \documentclass{article} to see the difference. How do I make \parshape work as intended while using standalone?

\documentclass[varwidth]{standalone}
\begin{document}
\setlength{\parindent}{0pt}
\parshape 3 0mm 40mm 5mm 35mm 10mm 30mm
This is sentence 1. This is sentence 2.
This is sentence 3. This is sentence 4.
This is sentence 5. This is sentence 6.
\par
\end{document}


• the problem is not standalone but varwidth. – Ulrike Fischer May 23 '19 at 18:50

Since you know the width already, just wrap it in a \parbox of that width. In this circumstance the varwidth option can be omitted.

\documentclass[varwidth]{standalone}
\begin{document}
\parbox{40mm}{%
\setlength{\parindent}{0pt}
\parshape 3 0mm 40mm 5mm 35mm 10mm 30mm
This is sentence 1. This is sentence 2.
This is sentence 3. This is sentence 4.
This is sentence 5. This is sentence 6.
\par}
\end{document}