1

I need to modify description style. I want the description entry to be on the next line, with a different color and

\newenvironment{mydescription}{%
    \let\olditem\item% 
    \begin{list}{}{
        \renewcommand\item[2][]{
            \olditem \textbf{\textsc{\color{black}{##1}}} \\ \normalfont \color{light-gray} ##2
        }
        \setlength{\leftmargin}{1.5em}
        \setlength{\itemsep}{0.05em}
        \setlength{\parskip}{5pt}
        \setlength{\parsep}{0.8em}
        }
}
{
    \end{list}%
}

My problem is the extra space between the first and the second letters of the description.

I am not able to post an image as it is my first post.

  • If you put a (MWE) we can put the image for you. – azetina Jun 27 '12 at 14:29
1

What you want to do is described here.

That said, the explanation of the odd spaces is that LaTeX puts spaces at newlines. So if you see spurious spaces, the first thing to try is adding % to the end of the lines in your definitions.

\documentclass{article}
\usepackage{xcolor}
\newenvironment{mydescription}{%
    \let\olditem\item% 
    \begin{list}{}{
        \renewcommand\item[2][]{
            \olditem\textbf{\textsc{\color{black}{##1}}}\\%
            \normalfont \color{red}##2%
        }%
        \setlength{\leftmargin}{1.5em}
        \setlength{\itemsep}{0.05em}
        \setlength{\parskip}{5pt}
        \setlength{\parsep}{0.8em}
        }
}
{
    \end{list}%
}

\begin{document}
\begin{mydescription}
  \item [Something] More things
  \item [foo] Bar
\end{mydescription}
\end{document}

I changed to red because I don't know where light-gray was defined.

| improve this answer | |

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.