{"id":114178,"date":"2020-06-15T07:00:00","date_gmt":"2020-06-15T07:00:00","guid":{"rendered":"https:\/\/fedoramagazine.org\/?p=31158"},"modified":"2020-06-15T07:00:00","modified_gmt":"2020-06-15T07:00:00","slug":"latex-typesetting-part-1-lists","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2020\/06\/15\/latex-typesetting-part-1-lists\/","title":{"rendered":"LaTeX Typesetting \u2013 Part 1 (Lists)"},"content":{"rendered":"<p>This series builds on the previous articles: <a rel=\"noreferrer noopener\" href=\"https:\/\/fedoramagazine.org\/typeset-latex-texstudio-fedora\" target=\"_blank\">Typeset your docs with LaTex and TeXstudio on Fedora<\/a> and <a rel=\"noreferrer noopener\" href=\"https:\/\/fedoramagazine.org\/fedora-classroom-latex-101-beginners\" target=\"_blank\">LaTeX 101 for beginners<\/a>. This first part of the series is about LaTeX lists.<\/p>\n<p> <span id=\"more-31158\"><\/span> <\/p>\n<h2>Types of lists<\/h2>\n<p>LaTeX lists are enclosed environments, and each item in the list can take a line of text to a full paragraph. There are three types of lists available in LaTeX. They are:<\/p>\n<ul>\n<li><strong>Itemized<\/strong>: unordered or bullet<\/li>\n<li><strong>Enumerated<\/strong>: ordered<\/li>\n<li><strong>Description<\/strong>: descriptive<\/li>\n<\/ul>\n<h2>Creating lists<\/h2>\n<p>To create a list, prefix each list item with the \\<em>item<\/em> command. Precede and follow the list of items with the \\<em>begin<\/em>{&lt;type&gt;} and \\<em>end<\/em>{&lt;type&gt;} commands respectively where &lt;type&gt; is substituted with the type of the list as illustrated in the following examples.<\/p>\n<h3>Itemized list<\/h3>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{itemize} \\item Fedora \\item Fedora Spin \\item Fedora Silverblue\n\\end{itemize}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists.png\" alt=\"\" class=\"wp-image-31169\" \/><\/figure>\n<h3>Enumerated list<\/h3>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{enumerate} \\item Fedora CoreOS \\item Fedora Silverblue \\item Fedora Spin\n\\end{enumerate}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-1.png\" alt=\"\" class=\"wp-image-31170\" \/><\/figure>\n<h3>Descriptive list<\/h3>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{description} \\item[Fedora 6] Code name Zod \\item[Fedora 8] Code name Werewolf\n\\end{description}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-2.png\" alt=\"\" class=\"wp-image-31171\" \/><\/figure>\n<h2>Spacing list items<\/h2>\n<p>The default spacing can be customized by adding \\<em>usepackage{enumitem}<\/em>&nbsp;to the preamble. The <em>enumitem<\/em> package enables the <em>noitemsep<\/em> option and the \\<em>itemsep<\/em> command which you can use on your lists as illustrated below.<\/p>\n<h3>Using the noitemsep option<\/h3>\n<p>Enclose the <em>noitemsep<\/em> option in square brackets and place it on the \\<em>begin<\/em> command as shown below. This option removes the default spacing.<\/p>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{itemize}[noitemsep] \\item Fedora \\item Fedora Spin \\item Fedora Silverblue\n\\end{itemize}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-3.png\" alt=\"\" class=\"wp-image-31172\" \/><\/figure>\n<h3>Using the \\itemsep command<\/h3>\n<p>The \\<em>itemsep<\/em> command must be suffixed with a number to indicate how much space there should be between the list items.<\/p>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{itemize} \\itemsep0.75pt \\item Fedora Silverblue \\item Fedora CoreOS\n\\end{itemize}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-4.png\" alt=\"\" class=\"wp-image-31173\" \/><\/figure>\n<h2>Nesting lists<\/h2>\n<p>LaTeX supports nested lists up to four levels deep as illustrated below.<\/p>\n<h3>Nested itemized lists<\/h3>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{itemize}[noitemsep] \\item Fedora Versions \\begin{itemize} \\item Fedora 8 \\item Fedora 9 \\begin{itemize} \\item Werewolf \\item Sulphur \\begin{itemize} \\item 2007-05-31 \\item 2008-05-13 \\end{itemize} \\end{itemize} \\end{itemize} \\item Fedora Spin \\item Fedora Silverblue\n\\end{itemize}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-5.png\" alt=\"\" class=\"wp-image-31175\" \/><\/figure>\n<h3>Nested enumerated lists<\/h3>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>\\begin{enumerate}[noitemsep] \\item Fedora Versions \\begin{enumerate} \\item Fedora 8 \\item Fedora 9 \\begin{enumerate} \\item Werewolf \\item Sulphur \\begin{enumerate} \\item 2007-05-31 \\item 2008-05-13 \\end{enumerate} \\end{enumerate} \\end{enumerate} \\item Fedora Spin \\item Fedora Silverblue\n\\end{enumerate}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-6.png\" alt=\"\" class=\"wp-image-31177\" \/><\/figure>\n<h2>List style names for each list type<\/h2>\n<figure class=\"wp-block-table is-style-stripes\">\n<table>\n<tbody>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\"><strong><span style=\"text-decoration: underline\">Enumerated<\/span><\/strong><\/td>\n<td><strong><span style=\"text-decoration: underline\">Itemized<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\">\\alph*<\/td>\n<td>$\\bullet$<\/td>\n<\/tr>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\">\\Alph*<\/td>\n<td>$\\cdot$<\/td>\n<\/tr>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\">\\arabic*<\/td>\n<td>$\\diamond$<\/td>\n<\/tr>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\">\\roman*<\/td>\n<td>$\\ast$<\/td>\n<\/tr>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\">\\Roman*<\/td>\n<td>$\\circ$<\/td>\n<\/tr>\n<tr>\n<td class=\"has-text-align-left\" data-align=\"left\"><\/td>\n<td>$-$<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2 class=\"has-text-align-left\">Default style by list depth<\/h2>\n<figure class=\"wp-block-table is-style-stripes\">\n<table>\n<tbody>\n<tr>\n<td><strong><span style=\"text-decoration: underline\">Level<\/span><\/strong><\/td>\n<td class=\"has-text-align-center\" data-align=\"center\"><strong><span style=\"text-decoration: underline\">Enumerated<\/span><\/strong> <\/td>\n<td class=\"has-text-align-center\" data-align=\"center\"> <strong><span style=\"text-decoration: underline\">Itemized<\/span><\/strong> <\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Number<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Bullet<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Lowercase alphabet<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Dash<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Roman numerals<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Asterisk<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Uppercase alphabet<\/td>\n<td class=\"has-text-align-center\" data-align=\"center\">Period<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h2>Setting list styles<\/h2>\n<p>The below example illustrates each of the different itemiszed list styles.<\/p>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>% Itemize style\n\\begin{itemize} \\item[$\\ast$] Asterisk \\item[$\\diamond$] Diamond \\item[$\\circ$] Circle \\item[$\\cdot$] Period \\item[$\\bullet$] Bullet (default) \\item[--] Dash \\item[$-$] Another dash\n\\end{itemize}\n<\/pre>\n<\/div>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/06\/latex-typesetting-part-1-lists-7.png\" alt=\"\" class=\"wp-image-31180\" \/><\/figure>\n<p>There are three methods of setting list styles. They are illustrated below. These methods are listed by priority; highest priority first. A higher priority will override a lower priority if more than one is defined for a list item.<\/p>\n<h3>List styling method 1 \u2013 per item<\/h3>\n<p>Enclose the name of the desired style in square brackets and place it on the \\<em>item<\/em> command as demonstrated below.<\/p>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>% First method\n\\begin{itemize} \\item[$\\ast$] Asterisk \\item[$\\diamond$] Diamond \\item[$\\circ$] Circle \\item[$\\cdot$] period \\item[$\\bullet$] Bullet (default) \\item[--] Dash \\item[$-$] Another dash\n\\end{itemize}\n<\/pre>\n<\/div>\n<h3>List styling method 2 \u2013 on the list<\/h3>\n<p>Prefix the name of the desired style with <em>label=<\/em>. Place the parameter, including the <em>label=<\/em> prefix, in square brackets on the \\<em>begin<\/em> command as demonstrated below.<\/p>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>% Second method\n\\begin{enumerate}[label=\\Alph*.] \\item Fedora 32 \\item Fedora 31 \\item Fedora 30\n\\end{enumerate}\n<\/pre>\n<\/div>\n<h3>List styling method 3 \u2013 on the document<\/h3>\n<p>This method changes the default style for the entire document. Use the \\<em>renewcommand<\/em> to set the values for the labelitems. There is a different labelitem for each of the four label depths as demonstrated below.<\/p>\n<div class=\"wp-block-jetpack-markdown\">\n<pre>% Third method\n\\renewcommand{\\labelitemi}{$\\ast$}\n\\renewcommand{\\labelitemii}{$\\diamond$}\n\\renewcommand{\\labelitemiii}{$\\bullet$}\n\\renewcommand{\\labelitemiv}{$-$}\n<\/pre>\n<\/div>\n<h2>Summary<\/h2>\n<p>LaTeX supports three types of lists. The style and spacing of each of the list types can be customized. More LaTeX elements will be explained in future posts.<\/p>\n<p>Additional reading about LaTeX lists can be found here: <a href=\"https:\/\/en.wikibooks.org\/wiki\/LaTeX\/List_Structures\" target=\"_blank\" rel=\"noreferrer noopener\">LaTeX List Structures<\/a><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This series builds on the previous articles: Typeset your docs with LaTex and TeXstudio on Fedora and LaTeX 101 for beginners. This first part of the series is about LaTeX lists. Types of lists LaTeX lists are enclosed environments, and each item in the list can take a line of text to a full paragraph. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":114179,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[606,45,437,46,47,1043,1044,1045,44],"class_list":["post-114178","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fedora-os","tag-faqs-and-guides","tag-fedora","tag-latex","tag-magazine","tag-news","tag-tex","tag-texstudio","tag-typesetting","tag-using-software"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/114178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=114178"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/114178\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/114179"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=114178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=114178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=114178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}