I was wondering if anyone knew a decent way to drop boxes of text on top of the listings environment. This would be most useful for a beamer presentation that I am currently writing.

Ideally the text underneath the box would not be visible; perhaps it is filled pastel yellow to give the impression that a post-it note has been stuck on top of the listing.

I have played with escaping out of listings and inserting figures/boxes, but none of my attempts have looked right.

Any ideas?


  • 4
    Perhaps I'm unimaginative but could you please provide a MWE? What exactly is it you're trying to hide?
    – nickie
    Oct 13, 2013 at 22:57
  • I could imagine that works with tikz, but I am not sure what you are looking for.
    – jens_bo
    Oct 14, 2013 at 6:55
  • @nickie Basically, I have had to split a code listing over two slides. When I am on the second slide I want to refer to a function that was defined on the first slide. I would like to have a 'post-it note' which appears to remind us of the signature of this function. Oct 14, 2013 at 7:39
  • Are you searching for a differently styled version of this?
    – masu
    Oct 14, 2013 at 12:25


Browse other questions tagged .