0

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. &lt;argument&gt; \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?

Mico
  • 506,678
ollydbg23
  • 1,198
  • 1
    It works up to TeX Live 2018. – egreg Dec 25 '21 at 09:17
  • 1
    The documentation states “For new documents, only the use of \PVerbOpt, \Q, ÷ and is recommended.” – egreg Dec 25 '21 at 09:25
  • Well, there are workarounds/other methods to achieve the same thing, depends on what exactly you want to do. If the documentation states that it's not supported you can't really do anything about it. – user202729 Dec 25 '21 at 10:26
  • Hi, @egreg, thanks for the comment, I just change the \PVerb to \Q, it built without errors, but the generated pdf file dose not shown the verbatim text. I looked at the document of examplep, it is written in year 2004, so it suspect this document is too old. – ollydbg23 Dec 25 '21 at 10:32
  • @ollydbg23 As far as I can see, \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
  • Hi, @egreg, thanks for the info. The whole picture is that I would like to put some verbatim text in the choices in my answer statement here: https://tex.stackexchange.com/a/141643/24012 I used the \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 the listing package, and use the \lstinline|x| statement. Or are there any better way? thanks. – ollydbg23 Dec 25 '21 at 10:40

0 Answers0