I used the examplep package in description list item, I just follow the answer by Stefan Kottwitz in his answer this question: Verbatim description list item.
Here is the test code, which is exactly the answer in that question.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[Q=yes]{examplep}
\begin{document}
\begin{description}
\item[\Q{list comprehension [f a | a <- M a]}] bla bla bla
\item[\PVerb{testing: \verb||{} #_$ }] item text
\end{description}
\end{document}
If I remember correctly, it works OK in my TexLive 2020 and before. But it looks like it failed in my new TexLive 2021(I'm using Windows 7 64bit OS, and the Xelatex is used), with such errors:
(e:/texlive/2021/texmf-dist/tex/latex/lm/t1lmtt.fd
File: t1lmtt.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)
! Package examplep Error: \PVerb inner delimiter must be brace,
(examplep) not backslash or control sequence or active char.
See the examplep package documentation for explanation.
Type H <return> for immediate help.
...
l.7 \item[\PVerb{testing: \verb||{} #_$ }]
item text
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! You can't use macro parameter character #' in restricted horizontal mode. <argument> \PVerb {testing: \verb ||{} ## _$ } l.7 \item[\PVerb{testing: \verb||{} #_$ }] item text Sorry, but I'm not programmed to handle this case; I'll just pretend that you didn't ask for it. If you're in the wrong mode, you might be able to return to the right one by typingI}' or I$' orI\par'.
! Missing $ inserted.
<inserted text>
$
l.7 \item[\PVerb{testing: \verb||{} #_$ }]
item text
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
Any ideas how to fix this issue?
\PVerbOpt,\Q,÷and\÷is recommended.” – egreg Dec 25 '21 at 09:25\PVerbto\Q, it built without errors, but the generated pdf file dose not shown the verbatim text. I looked at the document ofexamplep, it is written in year 2004, so it suspect this document is too old. – ollydbg23 Dec 25 '21 at 10:32\Pverb{x}has been broken from the LaTeX release on 2020-02-02 (possibly a bit earlier). Almost two years without any intervention on the package can only mean that nobody's using it. – egreg Dec 25 '21 at 10:36\PVerb{x}in my choices, but I think I have to choose another way to do this. Do you have other suggestions. Maybe, I could try thelistingpackage, and use the\lstinline|x|statement. Or are there any better way? thanks. – ollydbg23 Dec 25 '21 at 10:40