3

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

2

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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