Text FormattingProblem with customized enumerating

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm

Problem with customized enumerating

Post by Jamwa »

I would like to enumerate with (a), (b), (c)... instead of the default 1, 2, 3...

So I have this snippet:

Code: Select all

\documentclass[11pt]{article}
\title{\author{}}
\date{}
\begin{document}

\maketitle

\section{Start Here}

The core functions of the Division are as follows:

\begin{enumerate}[(a)]
\item Advising the Director-General
\end{enumerate}

\end{document}
Which does not compile but throws an error:

Code: Select all

sh-4.2$ latex error.tex 
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
(./error.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
 french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, 
turkish, ukenglish, ukrainian, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo)) (./error.aux)

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.13 \item A
            dvising the Director-General
? 

What am I doing wrong please?
Last edited by Jamwa on Thu Nov 08, 2012 11:06 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Problem with customized enumerating

Post by hugovdberg »

First of all, you should enclose these large parts of code in code-tags, not inline latex. That gives nicer colors.
Second of all, enumerate cannot be customised like that without using the enumitem package. That uses a little different syntax than you use there (that's the enumerate-syntax) but it's preferred over the latter package. The documentation gives all information you need, but your example would look something like this if you want to change all your enumerate lists:

Code: Select all

\documentclass[11pt]{article}
\usepackage{enumitem}
\setlist[enumerate]{
   label={(\alph*)}
}
\begin{document}
\begin{enumerate}
\item Advising the Director-General
\end{enumerate}
\end{document}
or, if it's only one list you want to customise:

Code: Select all

\documentclass[11pt]{article}
\usepackage{enumitem}

\begin{document}
\begin{enumerate}[label=(\alph*)]
\item Advising the Director-General
\end{enumerate}
\end{document}
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit
Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm

Re: Problem with customized enumerating

Post by Jamwa »

Oh, wonderful! Thank you. I have been struggling with this
Post Reply