I am using the listings package to print a few long program listings. I want to suppress the page numbers for all pages during the listing, except the last page of each listing.
I can suppress the page numbers with
\thispagestyle{empty}
. But that only works on the first page of the listing. The listing spans several pages, and the page number is printed after the first page. How do I turn it off altogether during the listing, but have the page numbers reappear starting with the last page of the listing?