我想要一个与问题中期望的类似的效果如何将多行对齐到相同的缩进?。但我不需要枚举或项目符号列表。我只希望某些行有更多缩进,例如:
some text some text some text
some text some text some text
some indented text some indented text some indented text
some indented text some indented text some indented text
some more indented text some more indented text
some more indented text some more indented text
some text some text some text
some text some text some text
some indented text some indented text some indented text
some indented text some indented text some indented text
some more indented text some more indented text
some more indented text some more indented text
some indented text some indented text some indented text
some indented text some indented text some indented text
some text some text some text
some text some text some text
我可以通过插入额外的空格字符来手动完成此操作。但这不是 LaTex 风格的解决方案。我正在寻找这样的解决方案。
答案1
这是一个使用的解决方案包裹enumitem
我使用了一个空标签,并将leftmargin
顶级列表设置为0pt
:
笔记:
- 包裹
showframe
仅用于显示页边距。实际使用中不需要它。
代码:
\documentclass{article}
\usepackage{enumitem}
\usepackage{showframe}
\newlist{MyIndentedList}{itemize}{4}
\setlist[MyIndentedList,1]{%
label={},
noitemsep,
leftmargin=0pt,
}
\setlist[MyIndentedList]{%
label={},
noitemsep,
}
\begin{document}
\begin{MyIndentedList}
\item some text some text some text
\item some text some text some text
\begin{MyIndentedList}
\item some indented text some indented text some indented text
\item some indented text some indented text some indented text
\begin{MyIndentedList}
\item some more indented text some more indented text
\item some more indented text some more indented text
\end{MyIndentedList}
\end{MyIndentedList}
\item some text some text some text
\item some text some text some text
\begin{MyIndentedList}
\item some indented text some indented text some indented text
\item some indented text some indented text some indented text
\begin{MyIndentedList}
\item some more indented text some more indented text
\item some more indented text some more indented text
\end{MyIndentedList}
\item some indented text some indented text some indented text
\item some indented text some indented text some indented text
\end{MyIndentedList}
\item some text some text some text
\item some text some text some text
\end{MyIndentedList}
\end{document}
答案2
正如评论中提到的,您可以使用该tabbing
包:
\documentclass{article}
\begin{document}
\begin{tabbing}
\hspace{30pt}\=\hspace{30pt}\=\kill
some text some text some text \\
some text some text some text \\
\> some indented text some indented text some indented text \\
\> some indented text some indented text some indented text \\
\> \> some more indented text some more indented text \\
\> \> some more indented text some more indented text \\
some text some text some text \\
some text some text some text \\
\> some indented text some indented text some indented text \\
\> some indented text some indented text some indented text \\
\> \> some more indented text some more indented text \\
\> \> some more indented text some more indented text
\end{tabbing}
\end{document}
然后看起来会像这样:
您可以使用\hspace