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 am trying to make my description list with same margin as my formulas (made with fleqn option - \usepackage[fleqn]{mathtools}). I was able to make it with labelindent option of the description environment, but now item labels are placed on item descriptions. leftmargin option helps, but I have to specify it each use of description environment.

Is there any way to automate it ?

\begin{description}[labelindent=25pt,style=multiline,leftmargin=2.5cm]
    \item[$mc^2$] \lipsum[1]
    \item[$L_{ongest}$] \lipsum[2]
    \item[$L_p$] \lipsum[3]
\end{description}

Is it possible to set those options globally, but only for description environment?

share|improve this question
2  
See documentation of enumitem, section 5, global settings. –  Ulrike Fischer Feb 14 '12 at 14:12
    
Thanks, that's all I need about 2nd part of my question ;) –  Soul Reaver Feb 14 '12 at 17:45
add comment

1 Answer 1

up vote 6 down vote accepted

Global list options are set using enumitem's \setlist[<list>]{<style>} option. Here's a minimal example showing how only the description environment <style> is set globally:

enter image description here

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\setlist[description]{labelindent=25pt,style=multiline,leftmargin=2.5cm}
\begin{document}
\begin{description}
  \item[$mc^2$] \lipsum[1]
  \item[$L_{ongest}$] \lipsum[2]
  \item[$L_p$] \lipsum[3]
\end{description}

\begin{itemize}
  \item \lipsum[4]
\end{itemize}
\end{document}

All levels of description is set according to the given <style>. If you want this to be localized to a specific <level>, use \setlist[description,<level>]{<style>}.

For more information on global setting, see section 5 Global settings (p 9) of the enumitem documentation.

share|improve this answer
    
It might be worth mentioning that this only works with newish versions of enumitem. For example, the version in TL09 (which sadly, is still the version in the debian repos) doesn't have this useful \setlist thing… –  Seamus Feb 14 '12 at 16:16
    
@Seamus: Yes, that true. Not sure when "this useful \setlist thing" came into play, but it's been "calc-savvy" since 3.0 (according to the enumitem README). –  Werner Feb 14 '12 at 16:33
    
Thanks for the full answer (and my post edit, still learning english). –  Soul Reaver Feb 14 '12 at 17:54
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.