如何在没有枚举的情况下将多行对齐到相同的缩进上?

如何在没有枚举的情况下将多行对齐到相同的缩进上?

我想要一个与问题中期望的类似的效果如何将多行对齐到相同的缩进?。但我不需要枚举或项目符号列表。我只希望某些行有更多缩进,例如:

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

在此处输入图片描述

笔记:

代码:

\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

相关内容