Latex distinguishes between three different enumeration/itemization environments. Each of them provide four levels, which means you can have nested lists of up to four levels.
Enumerate:
\begin{enumerate}
\item ...
\end{enumerate}
The enumerate-environment is used to create numbered lists.
If you like to change the appearance of the enumerator, the simplest way to change is to use the enumerate-package, giving you the possibility to optionally choose an enumerator.
\usepackage{enumerate}
...
\begin{enumerate}[I]%for capital roman numbers.
\item
\end{enumerate}
\begin{enumerate}[(a)]%for small alpha-characters within brackets.
\item
\end{enumerate}
Itemize:
\begin{itemize}
\item ...
\end{itemize}
Itemization is probably the mostly used list in Latex. It also provides four levels. The bullets can be changed for each level using the following command:
\renewcommand{\labelitemi}{$\bullet$}
\renewcommand{\labelitemii}{$\cdot$}
\renewcommand{\labelitemiii}{$\diamond$}
\renewcommand{\labelitemiv}{$\ast$}
Amongst the more commonly used ones are $\bullet$ (),
$\cdot$ (),
$\diamond$ (),
$-$ (),
$\ast$ () and
$\circ$ ().
Description:
\begin{description}
\item[] ...
\end{description}
The description list might be the least known. It comes in very handy if you need to explain notations or terms. Its neither numbered nor bulleted.
Example:
\begin{description}
\item[Biology] Study of life.
\item[Physics] Science of matter and its motion.
\item[Psychology] Scientific study of mental processes and behaviour.
\end{description}
And in a PDF it would look like this:
Nested lists:
Lists can be nested. In other words, it is possible to have a sub-list for an item of a list. Usage is straight forward, different environments can be mixed (see example) and the maximum depth (number of levels) is 4. Here is an example:
\begin{itemize}
\item First level, itemize, first item
\begin{itemize}
\item Second level, itemize, first item
\item Second level, itemize, second item
\begin{enumerate}
\item Third level, enumerate, first item
\item Third level, enumerate, second item
\end{enumerate}
\end{itemize}
\item First level, itemize, second item
\end{itemize}
Note:
The space between different items can be controlled with the \itemsep command (can only be added just after “begin”):
\begin{itemize}\itemsep2pt
\item
\end{itemize}


October 17th, 2008 at 9:25 pm
Well, I used to use the enumerate package too – but only until I found out about another one, called enumitem. It’s way more flexible and (in some cases) easier to use. (For example, it’s a bit tricky to obtain enumerations with _bold_ letters: (a), (b) etc with the enumerate package – try it! With enumitem, it’s much easier.)
Also, I hardly ever use itemize and description – and enumerate all the time.
October 25th, 2008 at 6:34 am
Thanks a lot, your blog is very helpful. Btw, do you know how to insert pieces of source code into documents? I have tried some packages already, but they are a little ugly. Perhaps I have not figured out how to configure them yet
.
September 9th, 2010 at 2:42 pm
You should try \usepackage{listings} and, depending on which computer language you use, to configure a “style” for it (including colorized output) with \lstset{}.
An example is provided on:
http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
October 25th, 2008 at 11:07 pm
Hi there,
Thanks for your comment. Please check my post on how to include source code into your documents here.
Cheers,
Tom
October 28th, 2008 at 3:43 pm
Is it possible to create fancy frames like the one you created in your html for the description list?
October 28th, 2008 at 8:50 pm
Hi Joe,
It is possible to crate fancyframes using \mbox or the fancybox package. Nevertheless, I think you will have problems creating a frame similar to the html above, as figure is a floating environment, which can’t be put into a box.
Tom.
April 15th, 2010 at 9:20 am
Hi Ana,
I moved your comment here.
Thanks,
Tom
September 2nd, 2010 at 9:27 am
Hi!
Is it possible to begin the enumeration with 0?
0. something
1. something
2. something
Thanks!
December 20th, 2010 at 3:04 pm
Hi Joana,
Use this piece of code before your first “item”:
\setcounter{enumi}{-1}Tom
December 29th, 2010 at 7:01 am
how to tab the item in the itemize.
i want to move the item a bit right.
1 cm to the right, then start the itemize.
January 3rd, 2011 at 6:17 pm
One thing you can do is to use
\hspace{1cm}between your \item and its content. However this will separate the dot (or whatever you are using) from the text which is probably not what you are looking for.If so, try this:
\parbox[1cm]{\textwidth}{ \begin{itemize} ... \end{itemize} }Cheers, Tom.
February 10th, 2011 at 8:10 pm
Hello Tom,
Your solution does only works partially. When your description has a text length longer then
\textwidth, the text wont be cut of at\textwidthbut at\textwidth + 1cmDo you maybe have a solution which prevents that? I tried to use…
\parbox[1cm]{\textwidth - 1cm}{ ... }but that doesn’t work since it can’t do the math
March 1st, 2011 at 2:00 pm
You are right of course. Thanks for pointing this out. Try the following instead:
\begin{list}{\labelitemi}{\leftmargin=1cm} \item ... \end{list}Sorry for that, Tom.
January 23rd, 2011 at 10:45 am
Is there any way to get enumeration as follows:
A1.
A2.
A3.
Thanks.
January 24th, 2011 at 3:34 am
Hi!
Probably the easiest way is to use the optional argument of
\item[], which lets you customize your list and would look something like this:\begin{enumerate} \item[A1.] First item \item[A2.] Second item \item[A3.] Third item \end{enumerate}However, if you have many items and don’t want to adapt the number for each item, you can also redefine the counter of the list. This is done through the following line of code:
\renewcommand{\theenumi}{A\arabic{enumi}}January 31st, 2011 at 1:35 pm
Hi
Hope you can help. When I use enumerate and change the counter the indent disapeares. When I don’t add a counter there is an indent.
This:
\begin{enumerate}[a.] \item text 1 \item text 2 \item text 3 \end{enumerate}Looks like this:
Some text
a. text 1
b. text 2
c. text 3
Some more text.
But I would like:
Some text
(space here)a. text 1
b. text 2
c. text 3
Some more text.
How do I get that?
Brit
February 1st, 2011 at 6:55 am
Hi Brit!
This is how you indent items in your enumerate:
\begin{enumerate}[a.] {\setlength\itemindent{1cm} \item text 1 } \item text 2 \item text 3 \end{enumerate}Cheers, Tom.
August 17th, 2011 at 11:54 am
use
\usepackage[shortlabels]{enumitem}instead of enumerate
February 25th, 2011 at 2:53 pm
Is there any way to get enumeration as follows:
[1] Text should be followed like this as
next line should start just below the first word of first line (for example, below the Text)
February 25th, 2011 at 3:00 pm
Is this what you are looking for:
\begin{enumerate} \item This is my first item.\\ On several lines. \item This is my second item. \end{enumerate}If not, please post a text example.
Cheers, Tom.
February 26th, 2011 at 5:29 am
Dear Tom,
Thanks for reply,
But I am looking for to get enumerate like this (as described below) ”
[1] This is my first item.
On several lines.
[2] This is my second item.
On several lines.
[3] This is my third item.
On several line
February 26th, 2011 at 7:18 am
Hi!
Add this line to your preamble. This will change the style of your enumeration accordingly.
\renewcommand{\labelenumi}{[\arabic{enumi}]}Cheers, Tom.
February 26th, 2011 at 6:35 am
Hi,
I tried your suggestion but it looks like:
1. This is my first item.
On several lines.
2. This is my second item.
But I want like:
[1] This is my first item.
On several lines.
[2] This is my second item.
July 5th, 2011 at 7:10 am
Hi,
I wonder if it is possible to do something like this:
—————————————-
1. First Section Big Heading
Some normal text followed by a list numbered by section then item number:
1.1 First list item
1.2 Second list item (which will be referenced)
2. Second Section Big Heading
Some more normal text.
2.1 Another other item
2.2 A reference to a previous list item in this list (see item 2.1)
2.3 A reference to a previous list item in a different list (see item 1.2)
—————————————-
I want to be able to label and refer to items in the list, much like they way that equations are numbered. Thanks in advance!
July 6th, 2011 at 9:07 am
You can use
\label{itm:item1}and\ref{itm:item1}just like for figures, equations, etc.Besides, to get the numbering as proposed in your example (section.item), use:
\renewcommand{\theenumi}{\thesection.\arabic{enumi}}Cheers, Tom.
July 6th, 2011 at 11:15 am
Thanks! Worked perfectly! You’re such a guru!
August 16th, 2011 at 4:41 pm
I am using MikTex…and I want 4th level of numbers like shown below..How to get that…I am just 5 day old MikTex user..!
1. Topic
1.1 Subtopic
1.1.1 Sub-Sub Topic
1.1.1.1 Sub-Sub-Sub Topic
-Sameer
August 18th, 2011 at 3:49 pm
Hi Sameer,
The following code explains how to produce up to six levels in depth including numbering as well as adding the headings to the table of contents.
\documentclass[a4paper]{report} \setcounter{secnumdepth}{5} % Section depth to be numbered \setcounter{tocdepth}{5} % Table of contents depth \begin{document} \tableofcontents \chapter{test} \section{test} \subsection{test} \subsubsection{test} \paragraph{test} \subparagraph{test} \end{document}Cheers, Tom.
September 11th, 2011 at 11:03 pm
I’m running into a bit of difficulty with all this. When I try to reference an embedded enumeration, rather than getting just “I” I get “Ia”. Here’s my big long preamble, but I think the only relevant package for this problem is the enumerate package.
\documentclass[12pt, letterpaper]{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage[pdftex]{graphicx} \DeclareGraphicsExtensions{.pdf,.png,.jpg,.gif} \usepackage{natbib} \bibpunct{(}{)}{;}{a}{}{,} \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} \usepackage{enumerate} \usepackage[usenames,dvipsnames]{color} \usepackage{setspace} \usepackage{stmaryrd} \usepackage{textcomp} \usepackage{multirow} \usepackage{ifsym} \usepackage[table]{xcolor} \usepackage{soul} \usepackage{cancel} \usepackage{ulem} \usepackage{units} \usepackage{pifont} \newcommand{\verteq}[0]{\rotatebox{90}{$=$}} \definecolor{newyellow}{RGB}{255,150,0} \definecolor{newgray}{RGB}{250,250,250} \begin{document} \long\def\symbolfootnote[#1]#2{\begingroup% \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}Then when I go to enter something like
\begin{enumerate} \renewcommand{\theenumi}{\arabic{enumi}} \renewcommand{\labelenumi}{\theenumi} \begin{minipage}{14cm} \item\label{Numbers and Basic Operations} ...and then something like
\begin{enumerate} \renewcommand{\theenumi}{\Roman{enumi}} \renewcommand{\labelenumi}{\theenumi} \begin{minipage}{13.11cm} \item\label{NatNum}...and then I later try to reference this, the reference to “Numbers and Basic Operations” comes out perfect but the reference to “NatNum” comes out “Ia” when I want it to come out just “I”.
Any ideas?
September 14th, 2011 at 3:59 am
Hi Adam,
I can’t really reproduce your issue, it works for me. Here is the code, maybe it helps:
\documentclass[12pt, letterpaper]{article} \begin{document} \begin{enumerate} \renewcommand{\theenumi}{\arabic{enumi}} \item\label{itm:numop} Numbers and Basic Operations \end{enumerate} and then something like \begin{enumerate} \renewcommand{\theenumi}{\Roman{enumi}} \item\label{itm:natnum} Test \end{enumerate} This is a reference to \ref{itm:numop} and \ref{itm:natnum}. \end{document}Have you tried deleting all meta-files that are generated when typesetting?
Another thing that I would recommend is using relative values for the minipage width:
\begin{minipage}{0.5\textwidth}Best, Tom.
September 20th, 2011 at 9:19 pm
[...] is a link that describes in some detail how to use the usepackage{enumerate} http://texblog.wordpress.com/2008/10/16/lists-enumerate-itemize-description-and-how-to-change-them/ [...]
October 1st, 2011 at 8:30 pm
Hello Tom,
Im using the enumerate command and noticed that the list has 1.5 line spacing between lines. How can I chance the justification to 1 line spacing?
Thanks,
Adam
October 2nd, 2011 at 7:28 am
Hi Adam
What a coincidence you are asking me this. I just posted an article on line spacing two days ago.
Tom.
October 7th, 2011 at 3:01 pm
I would really like to do something like the following, but when I try to embed a 5th level, I get errors. Is there any way to change settings to allow this:
\begin{enumerate}[label=(\Roman{*})] \item Example I \item Example II \begin{enumerate}[label=(\Alph{*})] \item Example II, A \item Example II, B \item Example II, C \begin{enumerate}[label=(\arabic{*})] \item Example II, C, 1 \item Example II, C, 2 \begin{enumerate}[label=(\alph{*})] \item Example II, C, 2, a \item Example II, C, 2, b \begin{enumerate}[label=(\roman{*})] \item Example II, C, 2, b, i \item Example II, C, 2, b, ii \end{enumerate} \end{enumerate} \item Example II, C, 3 \end{enumerate} \end{enumerate} \item Example III \end{enumerate}Thanks for your helpful post
October 10th, 2011 at 5:51 am
Hi Amber,
You can either use an
itemize-environment within if you are comfortable with having bullets instead of numerated items for one level. If not, theenumitempackage provides commands that let you define a list with a custom depth. Make sure you have the latest version (version 3.0 or higher), as some stuff was only added recently.\usepackage{enumitem} \newlist{longenum}{enumerate}{5} \setlist[longenum,1]{label=\Roman*} \setlist[longenum,2]{label=\Alph*} \setlist[longenum,3]{label=\arabic*} \setlist[longenum,4]{label=\alph*} \setlist[longenum,5]{label=\roman*}Use this code in your preamble, remove the label definitions from your code and replace all
enumerate-environments withlongenum.Hope it helps, Tom.
October 10th, 2011 at 1:09 pm
Hey Tom.
I was wondering if you had an idea, how to use enumerate if I want to get the item to look like this:
[1]
[2]
[3]
etc.
Thanks ahead.
October 10th, 2011 at 2:36 pm
Hi Nicolai,
You can either do it the classic way:
\renewcommand\theenumi{\arabic{enumi}} \renewcommand\labelenumi{[\theenumi]}Or using the
enumitem-package:\usepackage{enumitem} ... \begin{enumerate}[label={[\arabic*]}]Best, Tom.
October 22nd, 2012 at 12:39 pm
Thanks a lot Tom…. you are very good
October 25th, 2011 at 7:50 pm
Hi how can ı write this rows with latex?
ı mean how to enumerate
thank you.
There are two option :
a) a maximum b) a minimum
October 26th, 2011 at 6:47 am
Try this:
\documentclass[11pt]{article} \usepackage{enumerate} \begin{document} \begin{enumerate}[a)] \item a maximum \item a minimum \end{enumerate} \end{document}Best, Tom.
October 30th, 2011 at 6:25 am
Hi Tom,
How would I begin enumerating a later number than 1?
e.g.
3.
4.
5.
Cheers.
October 31st, 2011 at 3:06 am
Hi Alison,
Set the counter to 2, so your first item will have index 3:
\begin{enumerate} \setcounter{enumi}{2} ... \end{enumerate}Cheers, Tom.
November 29th, 2011 at 4:00 am
I am trying to get a continuous list of examples throughout the document – i.e., all the examples are in sequence but with lots of text in between:
…
…
(1) ___
(2) ___
….
…
..
.
(3) ___
(4) ___
(5) ___
…
Is this possible to do automatically? It seems so basic, but I can’t figure it out. Thanks.
November 29th, 2011 at 10:15 am
Hi Jesse,
I think what you are looking for is this. Hope it helps. Let me know if you have any questions. Tom.
May 7th, 2012 at 1:12 pm
I think you might be looking for the suspend/resume commands provided by the mdwlist package:
\begin{enumerate} \item First item. \item Second item. \suspend{enumerate} Text in the middle of the list. \resume{enumerate} \item Third item. \end{enumerate}May 9th, 2012 at 4:54 pm
Hi Andreas,
Neat, thanks!
Cheers, Tom.
November 29th, 2011 at 9:00 am
is there a possibility to reveres the order of enumerated list
November 29th, 2011 at 10:12 am
I was a little surprised by your question, but there is indeed a package called
etaremune(enumerate backwards). It’s usage is straight forward:\documentclass[11pt]{article} \usepackage{etaremune} \begin{document} \begin{etaremune}[start=5] \item Fifth item \item Fourth item \item Third item \end{etaremune} \end{document}You’ll have to typeset the document twice for the numbers to be correct. Also, there is another package that offers similar functionality, called revnum, but my distribution at least doesn’t come with it by default. So you would probably have to manually install it.
You can find the package documentation here.
Best, Tom.
December 22nd, 2012 at 7:24 pm
Hi Tom,
and thanks for all the updates.
I recently learnt about etaremune environment. But want I am not succeeding with it is to have square brackets ([]) in the items:
[3] item 3
[2] item 2
[1] item 1
Thanks again!
January 7th, 2013 at 4:15 pm
Hi there!
The following code should do the trick. Cheers, Tom.
\documentclass[11pt]{article} \usepackage{etaremune} \begin{document} \renewcommand{\labelenumi}{[\theenumi]} \begin{etaremune} \item Item 3 \item Item 2 \item Item 1 \end{etaremune} \end{document}January 8th, 2013 at 7:38 am
Thanks a lot Tom.
I just tried it and it was perfect!
January 8th, 2013 at 10:34 am
Great, glad it worked. Cheers, Tom.
November 29th, 2011 at 11:45 am
[...] I stumbled across this package recently thanks to a comment by ofer. [...]
December 9th, 2011 at 2:14 pm
I love the snowflakes
December 21st, 2011 at 12:22 am
Quick question: Is it possible to change the colour of the bullets in the itemize environment?
I am using coloured headings, and it would look much better if I can add colour to bullet points and footnote lines, but for the time being, I’d be happy with bullets (or numbers).
Thanks!
December 23rd, 2011 at 9:04 am
Hi there,
Try this:
\documentclass[11pt]{article} \usepackage{color} \begin{document} \renewcommand{\labelitemi}{${\color{red}\bullet}$} \begin{itemize} \item first \item second \end{itemize} \end{document}Cheers, Tom.
December 26th, 2011 at 10:42 am
>Each of them provide four levels, which means you can have nested lists of up to four levels.
And how do you create such levels?
January 2nd, 2012 at 4:13 pm
Just nest the lists, e.g.:
\begin{enumerate} \item First item \begin{enumerate} \item First sub-item \item ... \end{enumerate} \item Second item \end{enumerate}Best, Tom.
June 16th, 2012 at 4:31 pm
I was looking for this, it should be in the main post, it’s not obvious for a newbie how to come out with the levels.
June 18th, 2012 at 4:03 am
You are right, thanks! I added a short paragraph to the main post on nested lists. Tom.
February 6th, 2012 at 10:14 pm
Hi, is it possible to put label to math equation in every item? e.g.
i) x+y=z (1)
ii) k-l=2 (2)
February 7th, 2012 at 2:37 am
Hey Kala,
Try the code below. I hope it’s roughly what you were looking for.
\newcounter{eqncounter} \newcommand{\eqnlabel}{ \addtocounter{eqncounter}{1} \roman{eqncounter})\;} \begin{equation} \eqnlabel x+y=z \end{equation} \begin{equation} \eqnlabel k-l=2 \end{equation}Best, Tom.
February 7th, 2012 at 4:08 pm
Thank you very much, Tom. And do you know how put equations in the left side not in the center?
February 8th, 2012 at 3:28 am
The
amsmathpackage can left-align equations through the package optionfleqn:\usepackage[fleqn]{amsmath}Best, Tom.
February 14th, 2012 at 2:27 am
Hi Tom, I have used
\renewcommand{\labelenumi}{(\roman{enumi})} \begin{enumerate} \item First line \item Second line \end{enumerate}but my problem is the format. I expect
(i) First line
(ii) Second line
but instead I have
(I) First line
(II) Second line
that is, capital romans, but they are smaller than the original ones.
I am using Kile, in Ubuntu 11.04. Okular as my default pdf viewer.
Do you know what is the possible problem?
Greetings,
Emilio
February 14th, 2012 at 3:49 am
Hi Emilio,
Thanks for the comment with the code example. From your description it seems as if you are using small capitals, e.g.:
\renewcommand{\labelenumi}{(\sc\roman{enumi})}Would you mind providing a complete minimal example? It may be due to a package you are loading or some other code you use.
Best, Tom.
April 30th, 2012 at 11:03 am
That’s solution:
\usepackage[spanish,es-lcroman]{babel}es-lcroman
\roman (o “i”) pasa a minúsculas (recuérdese que en español esto es una falta de ortografía).
March 26th, 2012 at 10:10 am
Hi,
I would like to use my own item labels \item[...], but I want the labels to flush left, rather than flush right, ie
Main text:
short label: blahblah….
loooooooooong label: blahblah….
rather than what seems to be the default,
Main text:
short label: blahblah….
loooooooooong label: blahblah….
Ooops, the webpage doesn’t like my formatting. In the second example, the colons align, and loooooooong label sticks into the margin
Thanks, Mark
March 28th, 2012 at 4:09 am
Hi Mark,
Have a look at the examples below using the
tabularanddescriptionenvironments. I’m sure, from there you’ll be able to adapt the examples to your needs. You may also find the enumitem documentation useful.Best, Tom.
\documentclass[11pt]{article} \usepackage{enumitem} \usepackage{array} \begin{document} \subsubsection*{Tabular:} \begin{tabular}{>{\bf}ll} short label: &blahblah\\ loooooooooong label: &blahblah\\ \end{tabular} \vspace{1cm} \subsubsection*{Description flushleft:} \begin{description}[leftmargin=5cm, style=sameline, align=left] \item[short label: ]blahblah\\ \item[loooooooooong label: ]blahblah\\ \end{description} \end{document}April 1st, 2012 at 9:22 pm
Hi, you might now how to add something like this:
\begin{itemize} \item[step 1] Text \item[step 2] Text \end{itemize}But
[step 1] [step 2]should be aligned to left, not to the center as it’s by defaultApril 2nd, 2012 at 2:45 pm
Hello!
There was a very similar question in the previous comment. Here is a minimal example:
\documentclass[11pt]{article} \usepackage{showframe} \usepackage{enumitem} \begin{document} \begin{description}[style=multiline,leftmargin=3cm,font=\normalfont] \item[step 1] Text \item[step 2 blabla] Text is a very long text is a very long text is a very long text is a very long text \end{description} \end{document}If you don’t need your text to start from the same position, use the following line of code instead:
\begin{description}[align=left, font=\normalfont]Best, Tom.
April 6th, 2012 at 9:29 pm
I wanted to use the following:
\begin{description} \item[First] The first item \item[Second] The second item \item[Third] The third etc \ldots \end{description}My document starts like as follows:
\documentclass{ws-jktr} \usepackage{subfig} \usepackage{textcomp} \usepackage{wrapfig} \newtheorem{thm}{Theorem}[section] \newtheorem{conj}[thm]{Conjecture} \newtheorem{defn}[thm]{Definition} \newtheorem{exmp}[thm]{Example} \newtheorem{prop}[thm]{Proposition} \begin{document}I am using TeXworks Version 0.2.3 (r.466) on Ubuntu.
I am getting the following error.
! LaTeX Error: Environment description undefined.
Please help.
April 8th, 2012 at 1:00 pm
Hi Shehab,
Try using
itemize, it seems thedescriptionenvironment is not available in this particulardocumentclass.\begin{itemize} \item[\bf First] The first item \item[\bf Second] The second item \item[\bf Third] The third etc \ldots \end{itemize}Cheers, Tom.
April 7th, 2012 at 3:47 pm
Hi Tom,
How I can enumerate chapters and sections (Ex. Chapter I, I.1) in Roman numbers, and figures, tables and equations in arabic numbers (Ex. Figure 2.1, Table 4.1, (5.1))?
Thanks
Humberto
April 8th, 2012 at 12:17 pm
Hi Humberto,
Here is a minimal example. It works similarly for tables and equations.
\documentclass[11pt]{report} \usepackage{blindtext} \renewcommand*{\thechapter}{\Roman{chapter}} \renewcommand*{\thesection}{\thechapter.\Roman{section}} \renewcommand*{\thefigure}{\arabic{chapter}.\arabic{figure}} \begin{document} \tableofcontents \listoffigures \blinddocument \begin{figure}[ht] \centering \rule{4cm}{3cm} \caption{Figure placeholder.} \end{figure} \end{document}Best, Tom
April 24th, 2012 at 12:46 pm
Hi Tom,
How can I list my content such that second line of item starts with some space i.e after one two word of Ist line of item.
Thanks in advance
Kshatresh
April 25th, 2012 at 3:05 am
Hi!
Use
itemindentof the enumitem package to create hanging indent in lists.\documentclass[11pt]{article} \usepackage{lipsum, enumitem} \begin{document} \begin{itemize}[itemindent=-2em] \item \lipsum[66] \item \lipsum[66] \end{itemize} \end{document}Best, Tom.
April 27th, 2012 at 8:23 pm
I am having a problem where my enumerated list is running over my page width. I get the error: Overfull \hbox. Any ideas how to fix that?
Thanks,
Colin
April 28th, 2012 at 2:40 pm
Hi Colin,
Unless you are using long words that are hard to hyphenate (e.g. hyperlinks), LaTeX will automatically line-breaks when the text reaches the margin. See my minimal working example below. Can you provide some code to illustrate the problem?
Thanks, Tom.
\documentclass[11pt]{article} \usepackage{blindtext} \begin{document} \begin{enumerate} \item \blindtext \item \blindtext \end{enumerate} \end{document}April 29th, 2012 at 3:30 pm
I think you were right and it just had to do with long words at the end of the sentence. I just added manual line breaks for the 2 words that caused the problems. Thanks for the reply.
April 30th, 2012 at 4:08 am
Glad you found a solution that worked for you. Cheers, Tom.
May 17th, 2012 at 4:45 am
Hi guys, I have one question.. How can I insert in Latex an enumerator like this (*) to indicate my equation? And is there any way to insert a matrix (for example) and write a title “My matrix” below it.
Best,
Rado
May 17th, 2012 at 4:46 am
Referencing equations can be done as shown in the code below. Concerning matrices in LaTeX, please see my answer to your other question.
Cheers, Tom.
\documentclass[11pt]{article} \begin{document} \begin{equation} \label{eqn:pythagoras} a^2+b^2=c^2 \end{equation} Reference to \ref{eqn:pythagoras}. \end{document}May 17th, 2012 at 5:41 am
And the other thing that I forgot to ask .. how to insert a text into the matrix..I want to get something like this:
(text textfafaf)
(text text )
That is a matrix with 2 rows.
May 21st, 2012 at 3:17 pm
Hi Rado,
You can use
\textnormal{}in any math environment form normal text.Best, Tom.
\documentclass[11pt]{article} \usepackage{amsmath} \begin{document} \[ \begin{pmatrix} \textnormal{text} & \textnormal{text with space} \\ \textnormal{text} & \textnormal{text} \\ \end{pmatrix} \] \end{document}June 29th, 2012 at 7:59 am
How can I get the look of \begin{description} … as shown in the article… but also as numbered list, i.e. something like below:
1. Biology: Study of life.
2. Physics: Science of matter and its motion.
3. Psychology: Scientific study of mental processes and behaviour.
Thanks in advance.
July 4th, 2012 at 2:33 am
Hi Saiman,
Thanks for your question. Here is an example I got from this google group:
\documentclass{article} \newcounter{description} \renewcommand{\descriptionlabel}[1]{% \refstepcounter{description}% \hspace\labelsep \normalfont\bfseries \thedescription. #1:} \begin{document} \begin{description} \item[Animals] Emus. \item[Cars] Ferraris. \end{description} \end{document}Cheers, Tom.
July 4th, 2012 at 11:18 am
how do i write this in latex
1) AAAAAAAAAA
1.1 AAAA
1.2 AAAAAAA
1.3 AAAAAAA
2) AAAAAA
2.1AAAAAAA
2.2Uaaaaaaaa
2.3aaaaaaa
3 bbbbbbbbbbbb
some test here
July 16th, 2012 at 3:35 pm
Hi Nash,
Here is one way to do it by redefining the counters:
\renewcommand{\labelenumi}{\arabic{enumi})} \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}}Hope that helps!
Best, Tom.
September 2nd, 2012 at 4:45 pm
Quoted text “The space between different items can be controlled with the \itemsep command (can only be added just after “begin”):
\begin{itemize}\itemsep2pt \item \end{itemize}Is there a similar option in enumerate, to control the space between adjacent items. Thanks.
September 3rd, 2012 at 10:14 am
Works exactly the same way.
\begin{enumerate}\itemsep2pt \item \item \end{enumerate}Cheers, Tom.
September 4th, 2012 at 9:28 am
Thanks. This worked. I would like to know, if we can change the space between the nested lists, as there is too much space left between the first level items and second level items. Thanks again.
November 14th, 2012 at 1:47 am
Hi!
The example below illustrates how to change the vertical space between nested list items. Cheers, Tom.
\documentclass{article} \usepackage{enumitem} \begin{document} \begin{itemize} \item Top list \begin{enumerate}[label=\alph*),itemsep=-1ex,topsep=-2ex] \item First item \item Second item \item Third item \end{enumerate} \end{itemize} \end{document}September 2nd, 2012 at 4:47 pm
I would like to develop a skip pattern for my questionnaire. If I have to write three questions
1.
2.
.
.
.
13. Employment (a)1st option (b)2nd option (c)3rd option
14. If Q13 answered (a) or (b), your most recent occupation, ______________
For this I used enumerate to create the items 1 – 14 and so on…
But if I add or remove any items above the 13th, the ”if Q13 answered..” part of the 14th question needs editing. How can I automate this? Thanks.
September 3rd, 2012 at 10:10 am
Hey!
You can use
\labeland\ref.\documentclass[11pt]{article} \begin{document} \begin{enumerate} \item\label{itm:test} Employment (a)1st option (b)2nd option (c)3rd option \item If Q\ref{itm:test} answered (a) or (b), your most recent occupation, \end{enumerate} \end{document}Best, Tom.
September 4th, 2012 at 9:23 am
This syntax is not giving the reference as the proper Q number.
Results display
If Q?? answered (a) or (b), your most recent occupation
Instead of
If Q1 answered (a) or (b), your most recent occupation.
I think there is some error in the syntax.
Thanks.
September 4th, 2012 at 9:26 am
Like for any reference in LaTeX (figures, tables, etc.) you’ll have to typeset the document twice. The first time, LaTeX collects the
\refcommands and after that it updates the numbers…September 4th, 2012 at 9:30 am
Typesetting twice… worked like magic. Thanks again.
Regards,
Dr Manoj Aravind.
September 4th, 2012 at 9:33 am
Great! Best, Tom.
September 8th, 2012 at 5:02 am
Hi Tom,
Is there any way to do as follows
question
1)
a)
b)
solution
1)
a)
b)
Thanks in advance
September 9th, 2012 at 3:07 am
Hi Okkes
The code below is a minimal working example showing how I would do it. Is that more or less what you had in mind? Best, Tom.
\documentclass[11pt]{article} \usepackage{enumerate} \begin{document} \paragraph{Question} \begin{enumerate}[1)] \item The question \begin{enumerate}[a)] \item The first sub-question \item The second sub-question \end{enumerate} \end{enumerate} \paragraph{Solution} \begin{enumerate}[1)] \item The solution \begin{enumerate}[a)] \item Solution to first sub-question \item Solution to second sub-question \end{enumerate} \end{enumerate} \end{document}September 9th, 2012 at 6:20 pm
yes Tom, thanks a lot..
October 12th, 2012 at 12:48 am
Thank you very helpful post
October 31st, 2012 at 11:00 am
Thanks.. the description of {description} was really helpful…
November 9th, 2012 at 3:38 am
Cool, thanks for the feedback. Tom.
November 13th, 2012 at 1:15 pm
Hi,
how can I put the items in the same paragraph, and following the main text? I mean just like in this example itself: a) item-a, b) item-b, c) item-c.
November 13th, 2012 at 1:21 pm
Hi again,
I was using paralist package and inparaenum environment, but in order to achieve more compatibility with translators (i.e. pandoc), the question is if it is possible to make it with enumerate package. Thanks a lot in advance.
November 14th, 2012 at 1:29 am
Hi Nikita,
Use the starred list provided by the enumitem package. Here is a minimal example:
\documentclass[11pt]{article} \usepackage[inline]{enumitem} \begin{document} Some random text \begin{enumerate*}[label=\alph*)]\item item-a \item item-b \item item-c \end{enumerate*} some random text. \end{document}Please see the package documentation for more details.
Best, Tom.
November 14th, 2012 at 4:16 pm
Hi.
can we have this itemize in latex (portable):
- test test test test
– ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt….
ttttttttttttttttttttt.
– BBBB.
– CCC.
I want to margin bullet. if the item is long, starts after bullet (has a space) like up example
November 20th, 2012 at 2:44 am
Hi Sonia,
If I understand your question correctly, you would like to indent multi-line items. I wrote the example below and it seems this is the standard behavior. Could you provide a minimal working example similar to the one below to illustrate your problem.
Thanks, Tom.
\documentclass[11pt]{article} \usepackage{blindtext} \begin{document} \begin{itemize} \item test \item \blindtext \item test \end{itemize} \end{document}December 28th, 2012 at 6:40 am
Hi,
usually in my articles for the \documentclass[journal]{IEEEtran}, I use the “description” environment without any error,i.e. \begin{description} … \end{description}.
However, when I used the \documentclass{bioinf} for the Oxford Bioinformatics journal I got an error stating that the description environment is undefined.
Thanks in advance.
January 8th, 2013 at 12:03 pm
Hi Bel,
Interestingly, the description environment is defined by the document class and the journal either had a reason not to define it or simply forgot.
However, if you look at the class file, they defined the environment
unlistwhich you could use. Something like this should work:\documentclass{bioinfo} \newcommand{\ditem}[2]{% \item {\bf #1}\hspace{\itemsep}#2 } \begin{document} \begin{unlist} \ditem{First}{bla} \ditem{Second}{bla} \end{unlist} \end{document}February 10th, 2013 at 11:42 pm
Hi:
I have a question.
How you can change item separation but in the whole document?
Not only in the present list, put \itemsep 1pt after \begin{itemize}.
I know that is a little complicate but i dont know how many complicate.
Thanks at advances
February 12th, 2013 at 6:43 am
Hi Francisco,
The enumitem package provides a way to change the default setting for certain parameters. The code below illustrates how to change
itemsep. See page 5 of the documentation for more details.HTH, Tom.
\documentclass[11pt]{article} \usepackage{blindtext, enumitem} \setlist{itemsep=1cm} \begin{document} \begin{itemize} \item First item \item Second item \end{itemize} \blindtext \begin{itemize} \item First item \item Second item \end{itemize} \end{document}May 24th, 2013 at 7:53 pm
I am using the mdwlist package with the report format. I have two list levels, the first list has arabic numerals, the second (nested) list is alphabetical. My second lists has increased to more than 26 items. Is there a way to convince LaTeX to number items 27-40 with aa, bb, cc, etc.?
Unfortunately, I cannot change the shorter list to alphabetical and the longer one to numerical.
May 26th, 2013 at 1:16 pm
Hi Susannah,
How about using the alphalph package?
\documentclass[11pt]{article} \usepackage{alphalph} \usepackage{alphalph} \renewcommand*{\theenumi}{% \alphalph{\value{enumi}}% } \usepackage{alphalph} \begin{document} \begin{enumerate} \item a\item a\item a\item a\item a \item a\item a\item a\item a\item a \item a\item a\item a\item a\item a \item a\item a\item a\item a\item a \item a\item a\item a\item a\item a \item a\item a\item a\item a\item a \end{enumerate} \end{document}June 11th, 2013 at 8:43 pm
very helpful! Thanks Muck.
June 13th, 2013 at 6:26 pm
HI,
I realised that when using Description, the items are indented to the left.
\textbf{Vocabularies:} \begin{description} \item [charisma] (n.) an immense charm \item [elusive] (adj.) difficult to find, define, or achieve \end{description}i.e. the words [charism] and [elusive] are not aligned with Vocabularies.
How can I align them up?
Thx in advance.
Cheers,
Tim
June 14th, 2013 at 2:59 am
Hi Tim,
Either remove the indentation on “Vocabulary”:
\noindent\textbf{Vocabularies:}or add these two lines to your preamble for automatic indention of description items:
\usepackage{enumitem} \setdescription{leftmargin=\parindent,labelindent=\parindent}Cheers, Tom