Text Formatting ⇒ enumeration goes out the text area
enumeration goes out the text area
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
enumeration goes out the text area
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Re: enumeration goes out the text area
Stefan
PS: welcome to the forum! I noticed it is your second post.

enumeration goes out the text area
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.
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
enumeration goes out the text area
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
Re: enumeration goes out the text area
\begin{enumerate}[labelindent=2pt]
\item sss
\item ddd
\end{enumerate}
also resolves the problem.