[texhax] [listing.sty] \item[lstinline{foo}] howto?
Pavel Minev Penev
pavpen at berkeley.edu
Thu Nov 18 04:08:39 CET 2004
On Wed, Nov 17, 2004 at 02:22:42PM +0100, Philip G. Ratcliffe wrote:
> > The example doesn't show the required result (the argument
> > of the \item is hidden).
> > \documentclass{scrartcl}
> > \usepackage{listings}
> > \begin{document}
> > \begin{itemize}
> > \item[\lstinline{ze_def.h}] ZE-spezifische Definitionen
> > \end{itemize}
> > \end{document}
> > What do I have to do to get the correct result? I tried already
> > \item[\protect\lstinline{bar}] and something like this without
> > getting any improvement.
>
> I suspect it's a bug or at any rate \lstinline is not supposed to be used
> there.
>
> Look at what this gets you:
>
> \begin{itemize}
> \item[\lstinline!ze_def.h!] ZE-spezifische Definitionen
> \item
> \end{itemize}
>
> Why not try the package author?
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).
Just my guess,
--
Pav http://larouchepac.com/pdf_files/child_satan_book.pdf
,., http://wlym.com/articles/minnicino_frankfurt.doc
,``:'', http://www.bilderberg.org/ccf.htm
{o ! o} http://en.wikipedia.org/wiki/Fabian_Society
] -+- [ http://bss.sfsu.edu/fischer/IR%20360/Readings/Readings.htm
\ ! / http://www.againsttcpa.com/ http://swpat.ffii.org/ My type: Dvorak.
`-'http://en.wikipedia.org/wiki/List_of_U.S._foreign_interventions_since_1945
`shell$ gpg --keyserver x-hkp://search.keyserver.net:11371 --recv-key 164C028F`
More information about the texhax
mailing list