您可以用 替换\documentclass[varwidth]{standalone}
来\documentclass{article}
查看差异。如何\parshape
在使用 时按预期工作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}
答案1
由于您已经知道宽度,因此只需将其包裹在\parbox
该宽度中即可。在这种情况下,varwidth
可以省略该选项。
\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}