Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the minted package, which uses the float package. When I add the 'List of Listings' in my thesis, the \listoflistings command calls the \listofcommand from the float package.

My problem is that this command modifies the headings of subsequent pages, and shows 'LIST OF LISTINGS' in the header of the following pages, up to my second chapter. How can I prevent it from redefining the headers defined in my .cls file?

share|improve this question
    
Why does it go up to your second chapter and not change with the first? –  Werner Apr 30 '12 at 15:41
    
I don't know... I guess this is because my first chapter is only two pages. –  Charles Brunet May 1 '12 at 13:44
    
Or because my first chapter is in fact a chapter* –  Charles Brunet May 2 '12 at 13:57
    
That's it. When using \chapter*, no headings are set. So, the \chapter* chapters takes the headings of the previously set page style. –  Werner May 2 '12 at 19:08
add comment

1 Answer

Ok, I figured out:

\makeatletter
\renewcommand*{\float@listhead}[1]{%
  \@ifundefined{chapter}{\def\@tempa{\section*}}%
    {\def\@tempa{\chapter*}}\@tempa{#1}}
\makeatother

And in bonus, I learned a little bit more about LaTeX internals.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.