COPCSE-NTNU / thesis-NTNU

An NTNU thesis LaTeX document class for bachelor, master, and PhD theses
MIT License
96 stars 369 forks source link

Wrong header in the bibliography #21

Closed ifarup closed 4 years ago

ifarup commented 4 years ago

The bibliography gets the header of the last chapter instead of saying 'Bibliography' as it should.

ifarup commented 4 years ago

Very strange. Seems to appear only on last page of bibliography if that page has the layout of an odd numbered page.

ifarup commented 4 years ago

Any ideas? @Hexoplon @barskern @marni

barskern commented 4 years ago

Do you have a document where the mentioned error occurs? @ifarup

R0flcopt3r commented 4 years ago

Testing this on my machine with fedora and everything seems fine.

I compiled the standard document from the repository with no modifications, the bibligraphy ended up relative page 21 and absolute page 39, and the heading is correct.

See attached file: dmc03qnf

ifarup commented 4 years ago

Created a new branch 'issue-21' that demonstrates the problem. Play with (un)commenting some of the \nocites{} in thesis.tex in order to get the bibliography span different number of pages and observe the headers (not headings!)

Hexoplon commented 4 years ago

The same issues seems to be occuring with the code listings if it extends over three pages. It then has Tables as its header.

Hexoplon commented 4 years ago

Fixed issue in #22

The \printbibliography command seems to create its own "environment" when printing that ends as soon as the contents are printed. After this, the preceeding chapter will "take over". This creates issues with headers if the bibliography ends on an odd numbered page, other than the first page of the bibliography. This issue is avoided by printing the bibliography without a heading, and creating a chapter instead.

The issue with the code listings was addressed by changing the behaviour of the \lstlistoflistings command to create an unnumbered chapter, instead of a float like the original source code in the package does.

ifarup commented 4 years ago

Thanks, @Hexoplon !