Take the 2-minute tour ×
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.

I have nested enumerations in my article. The numbering of enumeration is modified.

\renewcommand{\labelenumi}{\bfseries\thesubsection.\arabic{enumi}} 
\renewcommand{\labelenumii}{\bfseries\thesubsection.\arabic{enumi}.%
                            \arabic{enumii}} 
\renewcommand{\labelenumiii}{\bfseries\thesubsection.\arabic{enumi}.%
                             \arabic{enumii}.\arabic{enumiii}} 
\renewcommand{\labelenumiv}{\bfseries\thesubsection.\arabic{enumi}.%
                            \arabic{enumii}.\arabic{enumiii}.%
                            \arabic{enumiv}}

The numbers of my items are out of page. How to align them properly?

I saw this post. Did not help.

UPDATE

\documentclass[a4paper, 10pt, twocolumn]{article}

\usepackage{mathtools}
\usepackage{amsmath}


\usepackage{amsthm}
\usepackage{fontspec} % loaded by polyglossia, but included here for transparency

\usepackage{polyglossia}
\usepackage{algpseudocode}
\usepackage{fancyhdr}
\usepackage{enumitem}
\usepackage{xspace}
\usepackage{amsfonts}
\usepackage{breqn}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage{float}
\def\do{}
\setotherlanguage{english}

\setmainfont{Consolas}
\def\do{}
%\usepackage{algorithm}

%\setmainlanguage{russian}
\setotherlanguage{english}

\setmainfont{Consolas}


\usepackage[hmargin=0.1cm,vmargin=2cm]{geometry}
\setlength{\columnsep}{0.2cm}   %The is a way to define the distance between the two columns, use
\setlength{\columnseprule}{0.4pt}  %If you need a line to separate the columns, the following command will do the job:

\pagestyle{fancy}
\fancyhf{} % clear all header and footers
\fancyhead[L]{\DocumentTitle}
\fancyhead[R]{\thepage}
\fancyfoot[L]{\DocumentTitle}
\fancyfoot[R]{\thepage}

\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}


\newcommand{\DocumentTitle}{Scientific Computing 1}
\numberwithin{equation}{section}
\numberwithin{figure}{section}

\usepackage{enumitem}
\usepackage{calc}

\renewcommand{\labelenumi}{\bfseries\thesubsection.\arabic{enumi}} 
\renewcommand{\labelenumii}{\bfseries\thesubsection.\arabic{enumi}.%
                            \arabic{enumii}} 
\renewcommand{\labelenumiii}{\bfseries\thesubsection.\arabic{enumi}.%
                             \arabic{enumii}.\arabic{enumiii}} 
\renewcommand{\labelenumiv}{\bfseries\thesubsection.\arabic{enumi}.%
                            \arabic{enumii}.\arabic{enumiii}.%
                            \arabic{enumiv}}

\begin{document}
\raggedbottom

\section{Direction Fields} % (fold)

\section{Critical Points}

\section{Population Models}
\subsection{Model of Malthus}
\subsection{Model of Verhulst - Saturation}
\begin{enumerate}
    \item Item 1 
    \item Item 2 
\end{enumerate}

\end{document}

MWE

share|improve this question
1  
Still, the post you cited should contain the solution to your problem. Could you provide a minimal working example (MWE) that illustrates what goes wrong? Also related: Enumerate with Properties. –  Stephan Lehmke Nov 28 '12 at 15:34
1  
You can adjust the value for the length \leftmargini. –  Gonzalo Medina Nov 28 '12 at 16:11
add comment

1 Answer

up vote 2 down vote accepted

One possibility is to adjust the value for the \leftmargini length (in my example code I removed some packages that were not relevant for the problem and its solution):

\documentclass[a4paper, 10pt, twocolumn]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage[hmargin=0.1cm,vmargin=2cm]{geometry}
\setlength{\columnsep}{0.2cm}
\setlength{\columnseprule}{0.4pt}

\renewcommand{\labelenumi}{\bfseries\thesubsection.\arabic{enumi}} 
\renewcommand{\labelenumii}{\bfseries\thesubsection.\arabic{enumi}.%
                            \arabic{enumii}} 
\renewcommand{\labelenumiii}{\bfseries\thesubsection.\arabic{enumi}.%
                             \arabic{enumii}.\arabic{enumiii}} 
\renewcommand{\labelenumiv}{\bfseries\thesubsection.\arabic{enumi}.%
                            \arabic{enumii}.\arabic{enumiii}.%
                            \arabic{enumiv}}

\begin{document}
\raggedbottom

\section{Direction Fields} % (fold)

\section{Critical Points}

\section{Population Models}
\subsection{Model of Malthus}
\subsection{Model of Verhulst - Saturation}

\addtolength\leftmargini{9pt}
\begin{enumerate}
    \item Item 1 
    \item Item 2 
\end{enumerate}

\end{document}

enter image description here

In the above approach, probably you will also have to adjust \leftmarginii, etc. Another option is to use the enumitem package to do the job (no need for manual adjustments), since you are already loading it (notice also that the customization of the labels is much simpler using the package):

\documentclass[a4paper, 10pt, twocolumn]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage[hmargin=0.1cm,vmargin=2cm]{geometry}
\usepackage{enumitem}

\setlength{\columnsep}{0.2cm}
\setlength{\columnseprule}{0.4pt}

\setlist[enumerate,1]{label=\bfseries\thesubsection.\arabic*}
\setlist[enumerate,2]{label*=\bfseries.\arabic*} 
\setlist[enumerate,3]{label*=\bfseries.\arabic*} 
\setlist[enumerate,3]{label*=\bfseries.\arabic*}
\setlist[enumerate]{leftmargin=*}

\begin{document}
\raggedbottom

\section{Direction Fields} % (fold)

\section{Critical Points}

\section{Population Models}
\subsection{Model of Malthus}
\subsection{Model of Verhulst - Saturation}

\begin{enumerate}
    \item Item 1 
    \item Item 2 
\end{enumerate}

\end{document}

enter image description here

share|improve this answer
add comment

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.