我正在将此枚举列表作为文档的一部分。我创建了标签作为步骤 I 步骤 II 步骤 III
但是它们超出了左侧的边缘,看起来很难看。我附上了它的草图。 有没有办法让它停留在边距中并向右移动而不是向左移动。代码是
\documentclass{article}
\usepackage{lipsum}
\usepackage[shortlabels]{enumitem}
\begin{document}
\lipsum
\begin{enumerate}[label = {[Step-\Roman*]}]
\item
\item
\item
\item
\end{enumerate}
\lipsum
\end{document}
提前致谢。
\begin{enumerate}[label = {[Step-\arabic*]},align=left]
\item {\color{bl} (Choose an elliptic curve)} Randomly choose an elliptic curve $E$ over $\Z_n$
and point $P(x,y) \in E_{a,b}(\Z_n).$ Then again choose randomly $a,x,y\in \Z_n$ and
calculate $b = y^2-x^3-ax.$ Compute $\gcd(4a^3+27b^2,n).$ If $\gcd(4a^3+27b^2,n)\neq 1,$
then $E$ is not an elliptic curve. Choose another pair $(E,P)$ and repeat. \\
If $\gcd(4a^3+27b^2,n)=1$ move to next step.
\item {\color{bl} (Compute $[m]P)$} Select a positive integer $m$ and compute the point $[m]P)
\in E_{a,b}(\Z_n).$
\item
\item
\end{enumerate}
答案1
答案2
像这样?
\documentclass{article}
\usepackage{lipsum,calc}
\usepackage[shortlabels]{enumitem}
\begin{document}
\lipsum[1]
\begin{enumerate}[label={[Step-\Roman*]},leftmargin=\widthof{[Step-III]}+\labelsep]
\item first item
\item second item
\item third item
\item fourth item
\end{enumerate}
\lipsum[2]
\end{document}