# No footnotemark in the listoflistings

I'd like to have footnotes in the caption of listings. I got that working. But the \footnotemark gets shown in the \listoflistings. Normally you can specificly define the text for a caption for the listofXY. But this does not work as I have to give the caption inside of squared brackets. So I cannot use the squared brackets (which usually define the title for the listofXY) here.

Some example code which works:

\begin{lstlisting}[caption={myCaption\protect\footnotemark},label=myLabel]
// code
\end{lstlisting}
\footnotetext{The text for the footnote}


Does anyone of you have an idea, how I can modify this code snippet to prevent the \footnotemark to be shown in the \listoflistings?

-

## migrated from stackoverflow.comMar 3 '12 at 17:01

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Mar 3 '12 at 17:12

{

This redefines the \footnotemark macro to do nothing within the scope of the list of listings.