TransWikia.com

What's the difference between the enumerate and enumitem packages?

TeX - LaTeX Asked by user203072 on January 16, 2021

Is there an advantage to using the enumerate package over the enumitem package or vice versa? I use enumitem and my co-worker uses enumerate, and we’re trying to decide which should be used when we collaborate.

2 Answers

use enumitem (I wrote enumerate)

Answered by David Carlisle on January 16, 2021

The enumitem package is far more flexible when compared with enumerate. The latter provides an optional argument where you can specify the item number format using a generic representation while the former provides a key-value interface where one can specify number format representation in addition to a host of other list-related settings (or perform these settings globally). Here are two examples:

  • Parenthesized lowercase roman numerals:

      % enumerate interface
      begin{enumerate}[(i)]
        % Your list here
      end{enumerate}
    
      % enumitem interface
      begin{enumerate}[label = (roman*)]
        % Your list here
      end{enumerate}
    
  • Bracketed uppercase alphabetic characters

      % enumerate interface
      begin{enumerate}[{[A]}]
        % Your list here
      end{enumerate}
    
      % enumitem interface
      begin{enumerate}[label = {[Alph*]}]
        % Your list here
      end{enumerate}
    

The interface provided by enumitem is more intuitive and verbose (you specify label explicitly, including the counter representation format Alph rather than A). Additionally, enumitem provides a host of other options, including

  • separate label and ref keys for alternative references to labels,
  • spacing adjustments (vertical and horizontal),
  • in-line list enumeration,
  • list continuation,
  • new list style generation,
  • ...

In short, enumitem provides a modern, user-friendly, key-value interface to many list manipulations, while enumerate is only geared towards short-hand list representation.

Answered by Werner on January 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP