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.

2 Answers 2


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
  • 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, 2012 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. Dec 4, 2012 at 20:18

You can define a new environment:

  • 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, 2012 at 20:06
  • I'd go with peter grill's solution.
    – A.Ellett
    Dec 4, 2012 at 20:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .