LaTeX: indent from second line

前端 未结 8 1694
既然无缘
既然无缘 2021-02-01 14:23

I want to indent from the second line.

I want to write in LaTeX something like this:

Lorem ipsum dolor sit amet, consectetur a         


        
相关标签:
8条回答
  • 2021-02-01 15:03

    When you create a list the list margin is indented by one indent (\leftmargini) and \itemindent is 0; if you set the \itemindent equal to the negative of the left margin, the hanging indent will line up exactly with the outer scope margin, and you'll get exactly one indent inside the list. It is a quick and simple way to get in and out of a hanging indented list setting only one value: \itemindent.

    \documentclass{article}
    \usepackage{lipsum}
    \begin{document}
    
    \begin{list}{}{\setlength\itemindent{-\leftmargin}}
      \item \lipsum[1]
      \item \lipsum[2]
    \end{list}
    
    \end{document}
    
    0 讨论(0)
  • 2021-02-01 15:05

    I found this solution. For me it's better because it is valid for all text since this point: I don't need to repeat the command for every paragraph:

    \begin{list}{}{%
    \setlength{\topsep}{0pt}%
    \setlength{\leftmargin}{0.1in}%
    \setlength{\listparindent}{-0.1in}%
    \setlength{\itemindent}{-0.1in}%
    \setlength{\parsep}{\parskip}%
    }%
    \item[]
    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Proin eu tempor velit. Fusce accumsan ultrices fringilla. Praesent 
    sed odio mi. Mauris non ligula turpis. Duis posuere lacus nec diam 
    interdum dictum suscipit magna molestie. Vestibulum nibh dolor, 
    interdum eget rhoncus ut, sodales eget justo. Morbi blandit lorem 
    sit amet nulla egestas aliquam. Nunc pharetra est at nibh ullamcorper 
    in commodo erat dignissim. Cras et suscipit enim. 
    
    Nunc adipiscing ligula at ligula egestas id ullamcorper felis luctus. 
    Aliquam tincidunt turpis sed eros pellentesque iaculis. Nulla 
    imperdiet cursus enim condimentum congue.
    \end{list}
    
    Now my normal text!
    
    0 讨论(0)
提交回复
热议问题