I want to put a set of square brackets only around custom item labels.
The default labels should remain unchanged.
See the following code:
\documentclass{article}
\begin{document}
\begin{itemize}
\item First
\item [12] Second
\item Third
\end{itemize}
\begin{itemize}
\item First
\item [[12]] Second
\item Third
\end{itemize}
\end{document}
In the first list, the item label 12
appears bare. I want it to appear
as [12]
. In the second list, if the custom label is put with an
extra of pair of brackets, the effect is almost achieved but we get a redundant space before the right bracket.
The ideal solution would be a global one, may be putting some command
or key value along with \begin{itemize}
, which would not require the
forced extra pair as in the second list.
(I was under the impression that enumitem would be my savior, but somehow I failed to locate the solution.)
Best Answer
Your example solved:
And for automatisation I would define a new command that would than apply the brackets like that. (But there may be a more elegant way to integrate it in the default
\item
command.)The result in both cases: