\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[start=22,label=(\arabic*)]
\item Bla bla bla\ldots
\end{enumerate}
\lipsum[1]
\begin{enumerate}[start=22,label=(\arabic*$'$)]
\item Bla bla bla\ldots
\end{enumerate}
\lipsum[2]
\begin{enumerate}[start=22,label=(\arabic*$''$)]
\item Bla bla bla\ldots% Due to its length this label ends up in the left margin
\end{enumerate}
\lipsum[3]
\begin{enumerate}[label=(\textsc{ok}$'$)]
\item Bla bla bla\ldots% Due to its length this label ends up in the left margin
\end{enumerate}
\lipsum[4]
\end{document}
Last edited by Sleft on Sat Jan 15, 2011 8:40 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Try futzing around with the additional enumitem package options (see its documentation), such as widest= and leftmargin=* or leftmargin=(fixed length).
\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[start=22,label=(\arabic*),leftmargin=*,widest=22]
\item Bla bla bla\ldots
\end{enumerate}
\lipsum[1]
\begin{enumerate}[start=22,label=(\arabic*$'$),leftmargin=*,widest=22]
\item Bla bla bla\ldots
\end{enumerate}
\lipsum[2]
\begin{enumerate}[start=22,label=(\arabic*$''$),leftmargin=*,widest=22]
\item Bla bla bla\ldots% Due to its length this label ends up in the left margin
\end{enumerate}
\lipsum[3]
\begin{enumerate}[label=(\textsc{ok}$'$),leftmargin=*]
\item Bla bla bla\ldots% Due to its length this label ends up in the left margin
\end{enumerate}
\lipsum[4]
\end{document}
Thanks for answering and answering fast. Appreciated.
I got it working the way I wanted it by setting left margin in enumerate. I tried different values until the margin was big enough to fit the longest labels. The finished example:
\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{enumitem}
\setenumerate[1]{leftmargin=33pt}
\begin{document}
\lipsum[1]
\begin{enumerate}[label=(\arabic*)]
\item Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla\ldots
\end{enumerate}
\begin{enumerate}[start=1,label=(\arabic*$'$)]
\item Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla\ldots
\end{enumerate}
\begin{enumerate}[start=22,label=(\arabic*$''$)]
\item Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla\ldots
\end{enumerate}
\begin{enumerate}[label=(\textsc{ok}$'$)]
\item Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla\ldots
\end{enumerate}
\lipsum[2]
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p