TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

    // code
\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?

share|improve this question

migrated from stackoverflow.com Mar 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
up vote 1 down vote accepted

A straightforward hack:


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

share|improve this answer
Thanks. That was exactly I was looking for. Putting this around my whole appendix is a nicer solution than the alternative caption for the listings inside the [squared brackets] – Watnuss Mar 3 '12 at 16:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.