Text Formatting ⇒ enumeration goes out the text area
enumeration goes out the text area
In class book, when I use the environment enumerate (say with roman numbers) it appears that these numbers step into the left margin. How to move them to the right?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
enumeration goes out the text area
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Re: enumeration goes out the text area
I can imagine what you mean, it seems like a wrong or undesired setting of the enumerate label. This could be done by a class, a package or a specific setting in your preamble. We could fix that easily, we just need to know your code. So I suggest, follow Johannes' advice and post a shortened (still compilable) sample code which produces that effect. Just a reduced copy of your code. Click on Johannes' link above to learn why and how, perhaps. Once we got code, we can fix it for sure.
Stefan
PS: welcome to the forum! I noticed it is your second post.
Stefan
PS: welcome to the forum! I noticed it is your second post.

LaTeX.org admin
enumeration goes out the text area
In the preamble I have this:
And this produces:
You can see that the numbers, specially (iii), are not aligned with the text.
Code: Select all
\documentclass{cambridge7A}
\def\makeRRlabeldot#1{\hss\llap{#1}}
\renewcommand\theenumi{{\rm (\roman{enumi})}}
\renewcommand\theenumii{{\rm (\alph{enumii})}}
\renewcommand\theenumiii{{\rm (\arabic{enumiii})}}
\renewcommand\theenumiv{{\rm (\Alph{enumiv})}}
Later I have something like this:
\begin{enumerate}[(ii)]
\item $\lambda_1(G(k,l))>\lambda_1(G(k+1, l-1))$,
\item $\lambda_n(G(k,l))\leq\lambda_n(G(k+1, l-1))$,
\item $\mu_1(G(k,l))\geq\mu_1(G(k+1,l-1))$,
\item $\mu_{n-1}(G(k,l))\geq \mu_{n-1}(G(k+1,l-1))$,
\item $\kappa_1(G(k,l))> \kappa_1(G(k+1,l-1))$,
\item $\kappa_n(G(k,l))\geq \kappa_1(G(k+1,l-1))$.
\end{enumerate}
You can see that the numbers, specially (iii), are not aligned with the text.
Last edited by Stefan Kottwitz on Thu Dec 11, 2014 5:53 pm, edited 2 times in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
enumeration goes out the text area
Hi Zoran,
with a compilable example we would have been faster with providing a solution. So I needed to find some time to build an example on my own, using your code snippets.
Anyway, here's a solution with enumitem. Perhaps your preamble or your class already loads it. I used the article standard class.
Here, I put a label to the line with the widest label. It will be taken for calculating the width. Just ensure to compile twice, because it needs to find the reference for the label generated in the first run. I inserted a wide dash into the label just to see how it behaves width wider one.
You can see, the widest label is aligned to the left margin.
Stefan
with a compilable example we would have been faster with providing a solution. So I needed to find some time to build an example on my own, using your code snippets.
Anyway, here's a solution with enumitem. Perhaps your preamble or your class already loads it. I used the article standard class.
Here, I put a label to the line with the widest label. It will be taken for calculating the width. Just ensure to compile twice, because it needs to find the reference for the label generated in the first run. I inserted a wide dash into the label just to see how it behaves width wider one.
Code: Select all
\documentclass{article}
\usepackage[shortlabels]{enumitem}
\usepackage{calc}
\begin{document}
\section{Test}
Text
\begin{enumerate}[label=(\roman*---),labelindent=0pt,
labelwidth=\widthof{\ref{widest}},itemindent=1em,leftmargin=!]
\item $\lambda_1(G(k,l))>\lambda_1(G(k+1, l-1))$,
\item $\lambda_n(G(k,l))\leq\lambda_n(G(k+1, l-1))$,
\item $\mu_1(G(k,l))\geq\mu_1(G(k+1,l-1))$,\label{widest}
\item $\mu_{n-1}(G(k,l))\geq \mu_{n-1}(G(k+1,l-1))$,
\item $\kappa_1(G(k,l))> \kappa_1(G(k+1,l-1))$,
\item $\kappa_n(G(k,l))\geq \kappa_1(G(k+1,l-1))$.
\end{enumerate}
\end{document}
Stefan
LaTeX.org admin
Re: enumeration goes out the text area
Thanks. It seems that
\begin{enumerate}[labelindent=2pt]
\item sss
\item ddd
\end{enumerate}
also resolves the problem.
\begin{enumerate}[labelindent=2pt]
\item sss
\item ddd
\end{enumerate}
also resolves the problem.