[texhax] RE: [listing.sty] \item[lstinline{foo}] howto?

Morten Høgholm moho01ab at student.cbs.dk
Thu Nov 18 08:50:16 CET 2004

On Thu, 18 Nov 2004 07:31:16 +0100, Goebel, Juergen, OPE26

>> Pavel Minev Penev [mailto:pavpen at berkeley.edu] wrote:
>
>> I don't have time to look at this, but as far as I remember, listings
>> plays with the catcodes of characters at input (what mostly
>> all verbatim
>> environments do), thus, if you are trying to use a listing
>> anywhere, but
>> at the top level of macro expansion, it will not work
>> (because catcodes
>> will already have been defined for the characters to input).
>
> Thanks for the explanation. I'm going to see whether
> the author thinks there is a solution ...

What you can do is something like

\newsavebox\JGbox

\sbox\JGbox{\lstinline!ze_def.h!}
\item[\usebox\JGbox]

--
Morten Høgholm