4

My problem is that I would like to write something like in LaTeX: enter image description here

But I can't seem to do it wihtout reading like: enter image description here

Which is pretty anoying to do all the time, in the middle of writting. Is there a code to do it for a whole paragraph without written \hspace*{1,5 cm} in middle of a sentence

  • 1
    Welcome, is that supposed to be something like a list? A little bit information on what you are trying to do (not just how it is supposed to look like) helps in providing a robust solution. – Johannes_B Feb 6 '16 at 8:09
  • have you seen Indenting a whole paragraph seems fairly close – cmhughes Feb 6 '16 at 11:59
8

There is a pair \hangindent and \hangafter. In your case (I am not sure, if the indentation should start immediately or after the first line of a paragraph)

\hangindent=1.5cm
\hangafter=1 %after which line the indentations starts

gives the expected result.

  • Thank you, just what I needed. Out of curiosity is it possibly to 'stop' the \hangindent again? – Helene Feb 6 '16 at 8:21
  • @Helene Yes, for example \hangindent0mm, when you need the null value. (Is it the meaning of your "stop"?) – Przemysław Scherwentke Feb 6 '16 at 8:25
  • Yes that was exactly what i meant – Helene Feb 6 '16 at 8:27
2

There is also the hanging package which works well.

\hangpara is called as width and then a positive value indents the left a negative intends at the right of the text. The second parameter is the number of lines to indent (it can also be negative - read manual).

\documentclass{article}
\usepackage{lipsum} % just for mock text
\usepackage{hanging}

\begin{document}
\lipsum[2]
\lipsum[2]
\hangpara{1.5cm}{1}This one is hanging \lipsum*[3]
\lipsum[4]
\hangpara{1.0cm}{2}This one has two lines hanging but less so \lipsum*[3]
\end{document}

enter image description here

1

This is a basic implementation:

\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum} % just for mock text

\newenvironment{helene}% <--- choose a more informative name
 {\begin{itemize}[label={},leftmargin=1.5cm,itemindent=-1.5cm]\item}
 {\end{itemize}}

\begin{document}

\lipsum[2]

\begin{helene}
\lipsum*[3]
\end{helene}

\lipsum[4]

\end{document}

enter image description here

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.