Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
You can use tabbing, which is probably simplest in this setup. See Starting a line where the previous line finishes. –  Werner Jul 16 at 6:11
1  
Welcome to TeX.SE. You can just use the list environment and set the label to be empty. That was if the line gets longer it will wrap properly. –  Peter Grill Jul 16 at 6:23

2 Answers 2

up vote 5 down vote accepted

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}
share|improve this answer
    
Thanks. I didn't know lists can be used in this way. :) –  Tem Pora Jul 16 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 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 at 10:12
    
@egreg Thanks. I tried with latest Tex online and it worked. –  Tem Pora Jul 16 at 17:28
    
100k !!! sorry I missed it –  David Carlisle Jul 24 at 10:04

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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