答案1
这取决于你的 第一个链接。
\documentclass[12pt, a4paper]{article}
\usepackage{enumitem}
\def\threedigits#1{%
\ifnum#1<100 0\fi
\ifnum#1<10 0\fi
\number#1.} % <<<<<<<<<<<< dot added
\begin{document}
\begin{enumerate}[label={\textbf{N09\ P\protect\threedigits{\theenumi}}}, leftmargin = *]%<<<<<<<<<< changed
\item
\item
\item
\item
\item
\item
\item
\item
\item
\item
\end{enumerate}
\end{document}
答案2
我将注册一个新的数字表示并定义一个新的环境。
\documentclass[12pt, a4paper]{article}
\usepackage{enumitem}
\makeatletter
\newcommand{\arabicthreedigits}[1]{\expandafter\@arabicthreedigits\csname c@#1\endcsname}
\newcommand{\@arabicthreedigits}[1]{%
\ifnum#1<100 0\fi
\ifnum#1<10 0\fi
\number#1%
}
\AddEnumerateCounter{\arabicthreedigits}{\@arabicthreedigits}{000}
\makeatother
\newenvironment{doubleenumerate}[1]
{\begin{enumerate}[label=\bfseries N#1 P\arabicthreedigits*,leftmargin=7em]}
{\end{enumerate}}
\begin{document}
Some text before the enumerate environment
some text before the enumerate environment
some text before the enumerate environment
\begin{doubleenumerate}{09}
\item\label{x} abc
\item
\item
\item
\item
\item
\item
\item
\item
\item
\item
\end{doubleenumerate}
\end{document}
如果第一部分是渐进的数字,可以这样做。
\documentclass[12pt, a4paper]{article}
\usepackage{enumitem}
\makeatletter
\newcommand{\arabicthreedigits}[1]{\expandafter\@arabicthreedigits\csname c@#1\endcsname}
\newcommand{\@arabicthreedigits}[1]{%
\ifnum#1<100 0\fi
\ifnum#1<10 0\fi
\number#1%
}
\newcommand{\arabictwodigits}[1]{\expandafter\@arabictwodigits\csname c@#1\endcsname}
\newcommand{\@arabictwodigits}[1]{%
\ifnum#1<10 0\fi
\number#1%
}
\AddEnumerateCounter{\arabicthreedigits}{\@arabicthreedigits}{000}
\AddEnumerateCounter{\arabictwodigits}{\@arabictwodigits}{00}
\makeatother
\newcounter{doubleenumerate}
\newenvironment{doubleenumerate}
{%
\stepcounter{doubleenumerate}%
\begin{enumerate}[
label=\bfseries N\arabictwodigits{doubleenumerate} P\arabicthreedigits*,
leftmargin=7em
]%
}
{\end{enumerate}}
\begin{document}
Some text before the enumerate environment
some text before the enumerate environment
some text before the enumerate environment
\begin{doubleenumerate}
\item\label{x} abc
\item
\item
\item
\item
\item
\item
\item
\item
\item
\item
\end{doubleenumerate}
Some text before the enumerate environment
some text before the enumerate environment
some text before the enumerate environment
\begin{doubleenumerate}
\item
\item
\end{doubleenumerate}
\end{document}