I have the following code:
\documentclass{article}
\usepackage{color}
\usepackage{lipsum}
\newcommand{\itemColor}[1]{\item[\llap{\textcolor{blue}{#1}\hspace*{.75mm}}]}
\newcommand{\listConfig}{
\setlength{\topsep}{-10pt} % amount of extra vertical space at top of list
\setlength{\partopsep}{\baselineskip} % extra length at top if environment is preceded by a blank line (it should be a rubber length)
\setlength{\parsep}{\baselineskip} % amount of vertical space between paragraphs within an item
\setlength{\itemsep}{-\baselineskip} % amount of extra vertical space between items
\setlength{\leftmargin}{2cm} % horizontal distance between the left margins of the environment and the list; must be nonnegative
\setlength{\rightmargin}{0cm} % horizontal distance betwen the right margins of the enviroment and the list; must be nonnegative
\setlength{\itemindent}{0pt} % indentation of first line of an item; can be negative
\setlength{\labelsep}{2mm} % separation between end of the box containing the label and the text of the first line of an item
}
\newenvironment{descr}{%
\vspace{.1in}
\begin{list}{}{%
\listConfig
\setlength{\itemsep}{0pt}
}
}{\end{list}\vspace{.1in}}
\begin{document}
This is a descriptive environment:
\begin{descr}
\itemColor{title 1}\lipsum[1]
\itemColor{long long long long long long long title}\lipsum[1]
\itemColor{test}\lipsum[1]
\end{descr}
\end{document}
Which produce this:
As you can see, it do not look nice with a long title. However, I did not think a way to break lines, manually or automatically, in my itemColor
command. Any idea how I could solve this problem?