6

I want a similar effect as desired in the question How to align multiple lines on same indent?. But I don't want the enumeration or bullet point list. I want only more indentation for some lines like the following:

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 

I can do it manually by inserting additional white-space characters. But it is not a LaTex style solution. I am looking for such a solution.

2

2 Answers 2

5

Here is a solution using the enumitem package where I had used an empty label, and set the leftmargin of the top level list as 0pt:

enter image description here

Notes:

  • The showframe package was used just to show the page margins. It is not needed in your actual use case.

Code:

\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}
6
  • Thanks. I didn't know lists can be used in this way. :)
    – Tem Pora
    Commented Jul 16, 2014 at 7:08
  • I got the error ! Undefined control sequence. <recently read> \newlist l.4 \newlist ` {MyIndentedList}{itemize}{4}` ? ! LaTeX Error: Missing \begin{document}.
    – Tem Pora
    Commented Jul 16, 2014 at 7:58
  • @TemPora You have an outdated TeX system; I can go back to TeX Live 2010 and \newlist exists in enumitem.
    – egreg
    Commented Jul 16, 2014 at 10:12
  • @egreg Thanks. I tried with latest Tex online and it worked.
    – Tem Pora
    Commented Jul 16, 2014 at 17:28
  • 100k !!! sorry I missed it Commented Jul 24, 2014 at 10:04
4

As mentioned in the comments, you could use the tabbing package:

\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}

Which then will look like this:

enter image description here

You can control the width of the tabs with the \hspace

2
  • It works (at least in beamer). What is the package behind this? Is it actually called tabbing package? When I add \usepackage{tabbing}, I get tabbing.sty not found error. Commented Jun 17, 2020 at 5:07
  • It's actually called Tabbing – I had the same issue and this helped. So it's \usepackage{Tabbing}
    – Michal
    Commented Dec 11, 2021 at 20:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .