I'm trying to implement a command to be used in place of the itemize
/enumerate
environments. The idea is that I want to have a command (\detail
), which can be used to construct an itemized list without being contained in an environment. The problem I'm having is that when a line is longer than the page width and consequently wraps to the next line, I don't seem to have any control over the indentation of the wrapped text. I've tried the hanging
package and \hangindent
, but haven't had much luck.
I've included a minimum example below and the output that I get when compiled. Ideally, I would like the wrapped text to be indented such that the first word on the second line aligns with the first word of the first line.
\documentclass{article}
\newcommand{\detail}[1]{-- {#1}}
\begin{document}
\noindent\textbf{This is a header}\\
\detail{This is a detail.}\\
\detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want it to have a hanging indent.}
\end{document}
Best Answer
A simplification of the already answered: