Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
If you put a (MWE) we can put the image for you. –  azetina Jun 27 '12 at 14:29
add comment

1 Answer

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.

share|improve this answer
    
Thanks Seamus for the solution and yours explanations! –  user16030 Jun 27 '12 at 17:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.