3

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.

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}
  • Thanks. I didn't know lists can be used in this way. :) – Tem Pora Jul 16 '14 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 Jul 16 '14 at 7:58
  • @TemPora You have an outdated TeX system; I can go back to TeX Live 2010 and \newlist exists in enumitem. – egreg Jul 16 '14 at 10:12
  • @egreg Thanks. I tried with latest Tex online and it worked. – Tem Pora Jul 16 '14 at 17:28
  • 100k !!! sorry I missed it – David Carlisle Jul 24 '14 at 10:04
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.