4.1 Listas

Lists are very important LaTEX constructs and are used to build many of LaTEX’s displaylike environments. LaTEX’s three standard list environments and the generic list environment are discussed in the first two sections, where we also show how they can be customized.

Section 4.1.3 starting on page 261 provides an in-depth discussion of the package enumitem, which introduces a number of new list structures and offers comprehensive methods to customize them, as well as the standard lists.

It is followed by a discussion of “headed lists”, such as theorems and exercises. Finally, Sections 4.1.6 and 4.1.7 cover two packages for tasks and check lists.

4.1.1 Uso y modificación de las listas estándar

It is relatively easy to customize the three standard LaTEX list environments itemize, enumerate, and description, and the next three sections look at each of these environments in turn. Changes to the default definitions of these environments either can be made globally by redefining certain list-defining parameters in the document preamble or can be kept local.

Customizing the itemize list environment

For a simple unnumbered itemize list, the labels are defined by the commands shown in Table 4.1 on the facing page. To create a list with different-looking labels, you can redefine the label-generating command(s). You can make that change local for one list, as in the example below, or you can make it global by putting the redefinition in the document preamble. The following simple list is a standard itemize list with a marker from the PostScript Zapf Dingbats font (see Section 10.13.1 on page →II 113) for the first-level labels:

4.1.2 Entorno de listas genéricas de LaTeX

Most lists in LaTEX, including those that we have seen previously, are internally built using the generic list environment. It has the following syntax:

4.1.3 enumitem - Entornos de lista extendida

The enumitem package by Javier Bezos has been written to improve the handling of lists in LaTEX on several fronts. It has three major goals:

  • Offer a mechanism to locally customize individual list environments with the help of an optional argument at list start;

  • Support new list environments (with or without special settings) that can be easily set up, enabling you to better structure your document;

  • Provide a mechanism to easily customize all list environments.

We discuss them one after another, starting with the local modifications to existing environments. Keep in mind, however, that the local modifications should be the exception, not the norm. If you find yourself repeatedly applying the same adjustments in your document, then you are most likely simply missing a new document element that gives them a face and a name.

When the package is loaded, the three standard LaTEX lists are modified to accept an optional argument at the environment start, as demonstrated here with enumerate.

4.1.4 amsthm - Proporcionar listas con encabezados

The term “headed lists” describes typographic structures that, like other lists such as quotations, form a discrete part of a section or chapter and whose start and finish, at least, must be clearly distinguished. This is typically done by adjusting the vertical space at the start or adding a rule, and in this case also by including some kind of heading, similar to a sectioning head. The end may also be distinguished by a rule or other symbol, maybe within the last paragraph, and by extra vertical space.

Another property that distinguishes such lists is that they are often numbered, using either an independent system or in conjunction with the sectional numbering.

Perhaps one of the more fruitful sources of such “headed lists” is found in the socalled “theorem-like” environments. These had their origins in mathematical papers and books but are equally applicable to a wide range of expository material, because examples and exercises may take this form whether or not they contain mathematical material.

Because their historical origins lie in the mathematical world, we choose to describe the amsthm package [3] by Michael Downes (1958–2003) from the American Mathematical Society (AMS) as a representative of this kind of extension.1 This package provides an enhanced version of standard LaTEX’s \newtheorem declaration for specifying theorem-like environments (headed lists).

As in standard LaTEX, environments declared in this way take an optional argument in which extra text, known as “notes”, can be added to the head of the environment. See the example below for an illustration.

4.1.5 thmtools - Declaraciones de teoremas avanzadas

The thmtools by Ulrich Schwarz, now maintained by Yukai Chou, provides a key/ value-based frontend for either amsthm or ntheorem abstracting from the syntax peculiarities of either package. In addition it provides some advanced features such as “repeated theorems” and a “list of theorems” facility.

4.1.6 tasks - Hacer listas orientadas horizontalmente

There is one other type of list that is fairly often asked for: a list where the items are horizontally placed into columns instead of the usual vertical direction. If you need that kind of layout, try the tasks package by Clemens Niederberger.

The package defines the environment tasks, and within this environment items are started using the command (in contrast to other lists that use

). Due to the chosen implementation there are three restrictions one has to be aware of:

  • it is not possible to nest the environment; however, you can combine it with other types of lists if necessary;

  • breaks can happen only between rows of items but not inside of items;

  • verbatim material cannot be used; instead, you have to resort to tricks discussed in Section 4.2 if you need more than

If neither is a problem, you get a good solution for horizontally aligned lists.

4.1.7 typed-checklist - Desarrollar y mantener listas de verificación

For many projects it is helpful to clarify what artifacts are to be produced or modified, what the goals are, what tasks are needed, and what milestones should be reached and when. Getting an overview like this often leads to checklists that then support you during the project by helping you to keep track of status, open tasks, approaching or missed milestones, etc.

The typed-checklist package by Richard Grewe is a flexible tool that enables you to produce and maintain checklists for various occasions. Below is a short teaser: