Lists are frequently used in communication in order to provide information succinctly. Often, the rules of grammar can be suspended because of the need for the list to communicate information in an unadorned way. In this post, we will learn how to make lists in LaTeX.
Basic List
For a simple list, you need to make an environment using the “itemize” declaration. Inside this environment, you must use the “\item” declaration for each bullet in the list. Below is the code and printout of a basic list in LaTeX.
\documentclass{article} \begin{document} Shopping list \begin{itemize} \item lettace \item mango \item toothpaste \end{itemize} \end{document}
As you can see this is fairly simple. THere is no need for any packages to complete this. If you want a number list instead of creating a “itemize” environment you would create an “enumerate” environment as shown below.
\documentclass{article} \begin{document} Shopping list \begin{enumerate} \item lettace \item mango \item toothpaste \end{enumerate} \end{document}
Nested List
It is possible to have lists within lists. To do this, you simply create an environment within an environment. LaTeX will automatically change the bullet type for you to enhance readability. Below is an example.
\documentclass{article} \begin{document} Shopping list \begin{itemize} \item fruits \begin{itemize} \item lettace \item mango \end{itemize} \item other \begin{itemize} \item toothpaste \end{itemize} \end{itemize} \end{document}
The example above has two levels in the list. LaTeX can go up to four levels.
Compact List
Generally, list by default in LaTeX are double-spaced. To reduce this you need to use the “paralist” package with either the “\compactitem” declaration and or the “\compactenum” declaration. Below is the same example but using the paralist features and also blending the use of bullets and numbers.
\documentclass{article} \usepackage{paralist} \begin{document} Shopping list \begin{compactitem} \item fruits \begin{compactenum} \item lettace \item mango \end{compactenum} \item other \begin{compactenum} \item toothpaste \end{compactenum} \end{compactitem} \end{document}
Definition List
It is also possible to make a list of definition. This is useful for a glossary. In order to do this, you create a “description” environment. When you use the “\item” declaration you need to place the definition word in brackets. There are no packages needed for this. Below is the code.
\documentclass{article} \usepackage{paralist} \begin{document} \begin{description} \item[convoluted] complex and hard to understand \item [obtuse] slow to understand \end{description} \end{document}
Conclusion
This post provided insights into the use of lists in LaTeX.