How to surround item of list label text with customized symbols?

I would like to surround the item text of my customized list with some symbols (say, parentheses or brackets).

Here is a sample text.

\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\newlist{ProofEnumDesc}{description}{2}
\setlist[ProofEnumDesc]{style=sameline}
\begin{document}
\begin{ProofEnumDesc}
\item[Case1] balabala
\item[Case2] xxxxx
\end{ProofEnumDesc}
\end{document}


I want the output document to be

without changing the item text such as \item[Case1] to be \item[(Case1)].

Note that I hope to make this customized list flexible enough since more styles for the label text may be also be added in the future; therefore I tend not to modify the item text manually.

You have to define a new value to align key with the command \SetLabelAlign. Then you use it in your \setlist. Code:

\documentclass[10pt,a4paper]{article}
\usepackage[inline]{enumitem}

\SetLabelAlign{parenboth}{(#1)\hfil}
\newlist{ProofEnumDesc}{description}{2}
\setlist[ProofEnumDesc]{style=sameline,align=parenboth}

\begin{document}

\begin{ProofEnumDesc}
\item[Case1] Text
\item[Case2] Text
\end{ProofEnumDesc}

\end{document}


• How can I get the document about this? I don't know how to search via texdoc. Dec 15 '16 at 12:10
• @HongxuChen - Try texdoc texdoc to get the documentation to texdoc itself. Usually, you do texdoc <package name>, in this case texdoc enumitem. Dec 15 '16 at 13:03