I'm facing a problem when I make my own list labels together with enumerate, here is the code.
\documentclass{article}
\usepackage{enumitem}
\usepackage{enumerate}
\begin{document}
Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random
Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here. Some random text goes here.
\newlist{RQlist}{enumerate}{1}
\setlist[RQlist, 1]
{label=\textbf{RQ \arabic{RQlisti}.},
leftmargin=\parindent,
rightmargin=0pt
}
\begin{RQlist}
\item First item
\item Second item
\item This is the third item
\item This is it
\end{RQlist}
\end{document}
And the output
So the problem I'm facing is that the text in the labels overrides the left margin. I guess it is because the enumerate environment uses the number for alignment, and not the actual text in the label. I know that it is possible to use a distance for "leftmargin" but if I would change the text of the label, it also means that I would have to find another distance for the left margin which would depend on the size of the text. Is there any automatic way around this?
Best Answer
Change the line
leftmargin=\parindent
,with
leftmargin=45pt
,and you get: