LaTeX/List Structures

Convenient and predictable list formatting is one of the many advantages of using LaTeX. Users of WYSIWYG word processors can sometimes be frustrated by the software's attempts to determine when they intend lists to begin and end. As a mark-up language, LaTeX gives more control over the structure and content of lists.

List structures
Lists often appear in documents, especially academic, as their purpose is often to present information in a clear and concise fashion. List structures in LaTeX are simply environments which essentially come in three types:
 * for a bullet list
 * for an enumerated list and
 * for a descriptive list.

All lists follow the basic format:

All three of these types of lists can have multiple paragraphs per item: just type the additional paragraphs in the normal way, with a blank line between each. So long as they are still contained within the enclosing environment, they will automatically be indented to follow underneath their item. Item content could be in the curly brackets for reading convenience of long items.

Try out the examples below, to see what the lists look like in a real document.

LaTeX will happily allow you to insert a list environment into an existing one (up to a depth of four, more levels are available using packages). Simply begin the appropriate environment at the desired point within the current list. Latex will sort out the layout and any numbering for you.

Some special lists
Sometimes you feel the need to better align the different list items. If you are using a KOMA-script class (or package ), the environment is handy. It takes a mandatory argument that contains the longest of your labels.

If you are on tight space limitations and only have short item descriptions, you may want to have the list inline. Please note that the example also shows how to change the font.

If you want a horizontal list, package  can be handy. In combination with a package like exsheets, you can prepare exam papers for students.

Customizing lists
When dealing with lists containing just a few words per item, the standard lists often take up too much space. Package provides you a simple interface to customize the appearance of lists.

You can change the appearance of lists globally in the preamble, or just for single lists using the optional argument of the environment. Have a look at the following example where the list on the right is more compact using.

An example for alignment and the width of the label.

The documentation of package enumitem goes into more detail with respect to what can be changed and how. You can even define your own lists. Environments like  and can be changed differently, details can be found in the package documentation respectively.

Easylist package
The package allows you to create list using a more convenient syntax and with infinite nested levels. It is also very customizable.

Load the package with the control character as optional argument:

The environment will default to enumerations.

It features predefined styles which you can set as optional argument.

Available styles:
 * - All items have empty check boxes next to them
 * - Approximately the format used by the table of contents of the book class
 * - Approximately the format used by the table of contents of the article class
 * - The default
 * - The default

You can customize lists with the command and revert back the customization with. Yes, that's parentheses for parameters.

The parameter sets the style of counters and text, the  parameter sets the style of counters, and the  parameter sets the style of text. The parameter determines the way that the numbers are displayed and the possible values are  or  (for lower and upper case Roman numerals),  or  (for lower and upper case letters),  (for Arabic numbers, the default), and  (for Zapf's Dingbats).

The parameter sets the punctuation of the final counter (Ex: ) while  sets the amount of space between the item and the item's text. The parameter sets the distance from the left margin (Ex: ). The parameter sets the distance from the left margin of all items in proportion to their level.

The parameter prevents the first  counters from appearing in all levels. If there is a number after a parameter (Ex: ) then this numbers indicates the level that it will affect (Ex: ).

Example of custom enumerate:

Note that we put the argument between  to avoid LaTeX understanding it as the end of the properties list. Now we change the default properties to print a custom itemize:

Spaces in parameters are important. The parameter acts as a default value and  will use a medium dash for level 1, 5 and onward.

You can also define custom styles using LaTeX macros:

Important note: has some drawbacks. First if you need to put an easylist inside an environment using the same control character as the one specified for easylist, you may get an error. To circumvent it, use the following commands provided by easylist:

Besides using along with figures may cause some trouble to the layout and the indentation. LaTeX lists do not have this problem.

To use easylist with Beamer, each frame that uses easylist must be marked as fragile:

LaTeX/Структура листи LaTeX/목록