3

I need to set the format of the enumerate so each time I use it, it always behaves like this way for example:

chapter 1 Algebra 1.1. Introduction...

Definition D1.1. (Vector Space)... A vector space is a set E such that:

D1.1.1 E is an Abelian group under the + operation:

D1.1.1.1 ...associativity...

D1.1.1.2 ...commutativiy... ...

D1.1.2 E satisfies the next properties under the * operation:

D1.1.2.1 ... property 1...

D1.1.2.2 .... poperty 2 ... ...

So basically what I have now is:

\newtheorem{Definition}{DEFINITION}
\renewcommand{\theDefinition}{D\arabic{chapter}.\arabic{Definition}}
\renewcommand{\labelenumi}{\textbf{\theDefinition .\arabic *}}
\renewcommand{\labelenumii}{\textbf{\theDefinition .\theenumi .\arabic *}}

Well, the thing seems to be fine except for one point. I don't know how to define the identation I want by using the \renewcommand. So when I use the \begin{enumerate} \end{enumerate} environment it just so happen that all my text starts at the begining of the left margin.

Note: I know that I might do for example,

\begin{enumerate}[leftmargin=*] 
\item Name1 \item Name2 
\end{enumerate}

But I'd really like just to forget about it each time I use the enumerate environment.

1

1 Answer 1

4

Since it seems you're using the (awesome) enumitem package, you can control things globally using its \setlist command.

\documentclass[11pt]{article}

\usepackage{enumitem}
\setlist[enumerate]{leftmargin=*}

\setlength\parindent{0em}

\begin{document}

Here's a list:
%
\begin{enumerate}
  \item one
  \item two
\end{enumerate}

You can locally override global settings if you'd like:
%
\begin{enumerate}[leftmargin=6em, itemsep=2em]
  \item three
  \item four
  \item five
\end{enumerate}

And back to normal:
%
\begin{enumerate}
  \item apple
  \item banana
\end{enumerate}

\end{document}

mwe output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .