枚举编号超出页面范围

枚举编号超出页面范围

我的文章中有嵌套枚举。枚举的编号已修改。

\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}}

我的商品数量超出页面范围。如何正确对齐它们?

我看见这个帖子。 没有帮助。

更新

\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}

平均能量损失

答案1

一种可能性是调整长度值\leftmargini(在我的示例代码中,我删除了一些与问题及其解决方案无关的包):

\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}

在此处输入图片描述

在上述方法中,您可能还需要调整\leftmarginii等。另一种选择是使用enumitem包来完成这项工作(无需手动调整),因为您已经加载了它(还要注意,使用包定制标签要简单得多):

\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}

在此处输入图片描述

相关内容