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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a document with many \description environments. All of them are defined like this:

    \item[\texttt{foo}] bar 
    \item[\hspace{7mm}\texttt{sub}] inner

How can I use \renewcommand (or something similar) to not always have to write [leftmargin=2.5cm,style=sameline] and also have the argument of \item automatically be in \texttt and optionally be preceded by some space \hspace{7mm}?

Other solutions are also greatly appreciated.

share|improve this question
up vote 9 down vote accepted

You can use newlist from the enumitem package to define your custom styles.

enter image description here



\setlist[MyDescription]{leftmargin=2.5cm,style=sameline, font=\texttt}


Manually specified:
    \item[\texttt{foo}] bar 
    \item[\hspace{7mm}\texttt{sub}] inner

Using \verb|MyDescription|:
    \item[foo] bar 
    \IndentedItem[sub] inner
share|improve this answer
This looks awesome! Going to use it - Thank You! One more question, I don't know if it's possible: I would like to replace \item[\hspace{7mm}sub] inner with something like \item2[sub] inner and have the same result. Is it possible? Thank You for your superfast help! – jlordo Dec 4 '12 at 20:12
@jlordo: Not recommended to have numbers in the macro names, btu can be done. Have updated solution to define a \IndentedItem macro. – Peter Grill Dec 4 '12 at 20:18
Works like a charm! Thank You! – jlordo Dec 4 '12 at 20:20

You can define a new environment:

share|improve this answer
This looks like it solves the first part of my problem. Thank You! Do You also have a hint for the default formatting of my \item items? – jlordo Dec 4 '12 at 20:06
I'd go with peter grill's solution. – A.Ellett Dec 4 '12 at 20:11

Your Answer


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.