Page LayoutWrong running head bibliography

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
economist90
Posts: 4
Joined: Sat Apr 25, 2020 7:59 pm

Wrong running head bibliography

Post by economist90 »

Hi, i am in despair with the customization of the running header in my Phd thesis. Specifically, I want to change the running header of the reference list. All running heads appear in capital letters (as intended), except for the bibliography chapter.

The following code does not work to adjust the running head:

Code: Select all

\clearpage
\phantomsection 
\bibliographystyle{apacite} 
\bibliography{References}
\markboth{\MakeUppercase{REFERENCES}}{\MakeUppercase{REFERENCES}}
It changes the header to "REFERENCES" only on the last page of the reference list. For all other pages it shows "References".
What can I do?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Wrong running head bibliography

Post by Johannes_B »

Please show us a minimal working example.
We would like to suggest a proper solution that is suited to your document class.

What you're doing right now is far from the recommended standard way of using LaTeX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
economist90
Posts: 4
Joined: Sat Apr 25, 2020 7:59 pm

Wrong running head bibliography

Post by economist90 »

Thanks for your reply. Here is my basic code.

Code: Select all

\documentclass[11pt]{book}

\usepackage{scrpage2}
\usepackage[paperwidth=176mm,paperheight=246mm]{geometry}
\setlength{\textheight}{19.5cm}
\setlength{\footskip}{8mm}
\setlength{\parindent}{0pt}
\setlength{\textwidth}{12.5cm}
\setlength{\evensidemargin}{0cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\headsep}{0.6cm}
\setlength{\headheight}{0.4cm}
\setlength{\topmargin}{-0.9cm}

\usepackage{emptypage}

% Package spacing
\usepackage{setspace}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel} 
\usepackage{tikz}
\usetikzlibrary{calc,positioning,backgrounds,fit}
\renewcommand{\rmdefault}{ptm}

% Chapter style
\usepackage[Lenny]{fncychap}
\addto\captionsenglish{\renewcommand\chaptername{}}

% Bibliography
\usepackage[nosectionbib]{apacite}
\addto{\captionsenglish}{%
  \renewcommand{\bibname}{References}
}

% Table of contents
\addto\captionsenglish{% 
  \renewcommand{\contentsname}%
    {Table of Contents}%
}

% Packages / commands tables
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[labelfont=bf, skip=0.3\baselineskip]{caption}
\usepackage[figuresright]{rotating}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{float}

\usepackage{adjustbox}

% Continuous footnotes
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}

% Formulars
\usepackage{amsmath} 

\providecommand\phantomsection{}


\usepackage{lipsum}


%%%%%%%%%%% Document %%%%%%%%%%%
\begin{document}

\begin{sloppypar}

\pagenumbering{Roman} 
\setcounter{page}{5}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{1}
\tableofcontents

\chapter*{Summary}
\addcontentsline{toc}{chapter}{Summary}
\chaptermark{SUMMARY}
\lipsum[1-12]

\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. \ #1}}{}}

\chapter{Introduction}
\chaptermark{INTRODUCTION}
\pagenumbering{arabic}
\setcounter{page}{1}
\lipsum[1-12]

% Some further chapters

%***************************************************
%   Bibliography
%***************************************************
\clearpage
\phantomsection 
\bibliographystyle{apacite} 
\bibliography{References}
\markboth{\MakeUppercase{REFERENCES}}{\MakeUppercase{REFERENCES}}


% Appendix
\clearpage
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}

\chapter*{Appendix}
\addcontentsline{toc}{chapter}{Appendix}
\chaptermark{APPENDIX}
\sectionmark{APPENDIX}
\lipsum[1-6]

\end{sloppypar}
\end{document}
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Wrong running head bibliography

Post by Ijon Tichy »

Don't use this template.
  • scrpage2 is deprecated for years and has been removed from current version of KOMA-Script. Because of this, with an up-to-date TeX Live or MiKTeX it isn't available any longer and your example fails. The official successor is scrlayer-scrpage.
  • Is does not make any sense to first load geometry but then doing all settings of margins etc. manually. Please use the geometry package for the setup of text area and margins. See the package manual for more information.
  • You should never deactivate the paragraph indent without activation of another paragraph mark mechanism. So you should not use \setlength{\parindent}{0pt} but, e.g., package parskip if you do not like the indent of the first line of a paragraph. See the package manual for more information.
  • Is isn't a mistake to use \usepackage[utf8]{inputenc}, but since LaTeX 2018-04-01 it is not needed.
  • Instead of \renewcommand{\rmdefault}{ptm} it would be better so load a package like mathptmx to get Times New Roman, because this would handle also the math mode. BTW: There are a lot of alternative like newtx.
  • I would recommend to use biblatex + biber instead of old-fashioned BibTeX workflow.
  • Is is not a mistake to load package chngcntr but since LaTeX 2018-04.01 it is not longer needed, because its functionality has been moved to the LaTeX kernel.
  • It makes no sense and is not recommended to put the whole document into an environment. So if you really, really want ugly typesetting for the whole document don't use the sloppypar environment but the switch \sloppy. The sloppypar environment is designed for single paragraphs only.
  • \pagenumbering{…} already sets the page number to 1, so it makes no sense to do it once more after the command.
  • \bibliography{…} already prints the bibliography. Changing the running head to “REFERENCES” after is, does not make much sense. It would make more sense to do it before printing the bibliography.
  • Usually a chapter “Appendix” does not really make sense. Instead you should use \appendix and then add the appendix chapters like other chapters, e.g., \chapter{Something additional}.
  • The default of book is twoside and openright, so all your \clearpage should be \cleardoublepage.
  • \chaptermark{FOO} after \chapter{Foo} does not make any sense, because \chapter already calls \chaptermark.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Wrong running head bibliography

Post by Bartman »

That seems to be a crosspost.
economist90
Posts: 4
Joined: Sat Apr 25, 2020 7:59 pm

Wrong running head bibliography

Post by economist90 »

Dear Ijon, thanks for your suggestions. Although the packages might be adapted due to several single problems I had to resolve, the result is quite satisfying.
The only problem left is that I cannot change the running head of the bibliography section, irrespective where I place the \markboth.
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Wrong running head bibliography

Post by Bartman »

My hint may not solve your problem, but a change from apacite to biblatex-apa is not only recommended, it also keeps the capitalization in the header.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Wrong running head bibliography

Post by Ijon Tichy »

Bartman wrote:My hint may not solve your problem, but a change from apacite to biblatex-apa is not only recommended, it also keeps the capitalization in the header.
I've already told the OP, that using biblatex + biber would be recommended, but it seems the OP does not want to change his packages.
Last edited by Ijon Tichy on Tue Apr 28, 2020 10:54 am, edited 1 time in total.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
economist90
Posts: 4
Joined: Sat Apr 25, 2020 7:59 pm

Wrong running head bibliography

Post by economist90 »

Ijon Tichy wrote:
Bartman wrote:My hint may not solve your problem, but a change from apacite to biblatex-apa is not only recommended, it also keeps the capitalization in the header.
I've already told the OP, that using biblatex + biber would be recommended, this it seems the OP does not want to change his packages.
Thanks a lot to you both. The change from apacite to biblatex indeed was the solution.
Post Reply