2

I am wring this enumerated list as part of my document. I created labels as Step-I Step-II Step-III

However they went out of margin on left side which looks ugly. I have attached the rough picture of it. enter image description here Is there any way that it stays in the margin and move to right instead of moving towards left. The code is

\documentclass{article}
\usepackage{lipsum}
\usepackage[shortlabels]{enumitem}


\begin{document}
\lipsum
\begin{enumerate}[label = {[Step-\Roman*]}]
\item 
\item
\item 
\item
\end{enumerate}
\lipsum
\end{document} 

Thanks in advance.

Thanks for the help. I ran into another problem of margin. The text is not moving to more of right. enter image description here

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

You can use align= left:

\documentclass{article}
\usepackage{lipsum}
\usepackage[shortlabels]{enumitem}    

\begin{document}
\lipsum
\begin{enumerate}[label = {[Step-\Roman*]},align=left]
\item
\item
\item
\item
\end{enumerate}
\lipsum

\end{document} 

enter image description here

4

Like this?

enter image description here

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

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.