![自动换行后如何获得缩进?](https://linux22.com/image/388026/%E8%87%AA%E5%8A%A8%E6%8D%A2%E8%A1%8C%E5%90%8E%E5%A6%82%E4%BD%95%E8%8E%B7%E5%BE%97%E7%BC%A9%E8%BF%9B%EF%BC%9F.png)
有些行太长,无法容纳在相应的列中,因此被分成两行。
但为了清楚地表明它仍然是一行,就像在一首歌中一样,我必须在自动换行符后缩进。
\usepackage{parselines}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\begin{parse lines}[\noindent]{#1\\}
this line isn't too long
but this one is most definitely way too long and should be indendet after the auto line break
\end{parse lines}
\end{multicols}
\end{document}
答案1
我不太清楚您为什么使用 parselines 环境,但如果您想要悬挂缩进,您需要将每一行设置为一个段落:
\documentclass{article}
\usepackage{parselines}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\begin{parse lines}[\parindent 0pt]{\hangindent1cm\hangafter1 #1\par}
this line isn't too long
this line isn't too long
this line isn't too long
this line isn't too long
but this one is most definitely way too long and should be indendet after the auto line break
\end{parse lines}
\end{multicols}
\end{document}