I found this question Adding some common text to enumerated description lists to be the closest:
\documentclass{scrbook}\usepackage{enumitem} \newcounter{descriptcount} \newlist{enumdescript}{description}{1} \setlist[enumdescript,1]{% before={\setcounter{descriptcount}{0}% \renewcommand*\thedescriptcount{\arabic{descriptcount}}}, font={\bfseries\stepcounter{descriptcount}Case \thedescriptcount,~} }
\begin{document}
\begin{enumdescript} \item item one \item item two \item[Some Text] item three \item item four \item item five \end{enumdescript} \end{document}
The only difference, it that I would like to put the number after the custom text, and not before, i.e., instead of doing:
Case 1, item one
Case 2, item two
Case 3, Some Text item three
Case 4, item four
Case 5, item five
I would like to do:
\begin{enumdescript}
\item[Some first] item one
\item[Some second] item two
\item[Some third] item three
\item[Some forth] item four
\item[Some Fifth] item five
\end{enumdescript}
Some first 1) item one
Some second 2) item two
Some third 3) item three
Some forth 4) item four
Some fitth 5) item five
Related questions:
- Illegal parameter number in definition of \enit@before. You meant to type ## instead of #, right?
- How to fix Illegal parameter number in definition of a new Tikz command?
- Enumerated description list
- Intertext like command in enumerate environment?
- Adding some common text to enumerated description lists
- Optional argument to \item in enumitem list
- Insert a space after a command: {}, vs \ , vs \space
- What is the difference in citing/referencing with or without tilde?
- What commands are there for horizontal spacing?
- When should I use non-breaking space?
- Difference between control space and non-breaking space
Other questions:
- Difference between control space and non-breaking space
- Combining newcommand and renewcommand with optional arguments
- When to use \LetLtxMacro?
- How to redefine the caption command with optional arguments
- Optional parameter in newcommand
- Creating new counter formats on-the-fly with enumitem's \AddEnumerateCounter*
- correct usage of \@namedef and \@nameuse
- What is the difference between \let and \def?
- enumitem package and description lists
- How do I change the `enumerate` list format to use letters instead of the default Arabic numerals?
- Redefine the bullets of the enumerate environment
- LaTex enumitem - controlling alignment of items by level
- How to remove space at the start of inline enumitem itemized list?


O{}passed as argument to\NewDocumentEnvironment? Or where I can find the documentation for this\NewDocumentEnvironment? I keep searching but I cannot find it. – user Oct 14 '19 at 03:34xparsepackage:O As for o, but returns (default) if no value is given. Should be given as O{(default)}– user Oct 14 '19 at 03:43