Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I easily customize the \enumerate environment so that, instead of each line being numbered 1., 2., etc., they are numbered Property 1., Property 2., etc.?

share|improve this question

1 Answer

up vote 13 down vote accepted

You can use for example the enumitem package to customize the enumerate environment.

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=Property \arabic*.,leftmargin=*]
  \item First
  \item Second
\end{enumerate}
\end{document}

enumitem also allows you to define your own list environment:

\documentclass{article}
\usepackage{enumitem}
\newlist{Properties}{enumerate}{2}
\setlist[Properties]{label=Property \arabic*.,leftmargin=*}
\begin{document}
\begin{Properties}
  \item First
  \item Second
\end{Properties}
\end{document}

enter image description here

As commented by Gonzalo Medina, the leftmargin should be increased. The reason for this is demonstrated by the following example:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{enumitem}
\newlist{Properties}{enumerate}{2}
\setlist[Properties]{label=Property \arabic*.,leftmargin=*}
\begin{document}
\begin{enumerate}[label=Property \arabic*.]
  \item First.
  \item Second. 
\end{enumerate}
\begin{Properties}
  \item First.
  \item Second. 
\end{Properties}
\end{document}

which will show you this:

enter image description here

Loading geometry with showframe gives you a frame that shows the boundary of the text area, and as you can see here, unless the leftmargin is increased, "Property" will extend into the left margin of the page.

share|improve this answer
3  
Perhaps you could change the value for leftmargin? – Gonzalo Medina Dec 9 '11 at 18:23
1  
@GonzaloMedina Good point, I didn't realize or notice that it would extend into the margin. – Torbjørn T. Dec 9 '11 at 18:30
Yes, how would you correct that leftmargin parameter so it doesn't extend into the margins? – jamaicanworm Dec 9 '11 at 18:33
3  
leftmargin=* does it – cmhughes Dec 9 '11 at 18:36
1  
@cmhughes Thanks, I should have checked the manual. * is a little more convenient. – Torbjørn T. Dec 9 '11 at 18:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.