Bibliography/table of content has chapter in header












1















documentclass[12pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{booktabs}
usepackage{array}
usepackage{tabularx}
usepackage{caption}
captionsetup[table]{skip=10pt}
renewcommand{arraystretch}{1.4}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{adjustbox}
usepackage{rsc}
usepackage{graphicx}
usepackage{setspace}
linespread{1.25}
UseRawInputEncoding
usepackage{geometry}
geometry{
a4paper,
left=40mm,
right=20mm,
top=40mm,
bottom=50mm
}
%header settings
usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}
makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter.
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape Keiran Corbett}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}
setlength{footskip}{50pt} %page number spacing
begin{document}
tableofcontents
chapter{Example chapter title}
newpage
text
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
end{document}


So with this command, it looks how I would like but I have a table of contents and the header for that is Chapter 0. CONTENTS



So I have two questions
1. How do I make CONTENTS not capital
2. How can I get rid of the Chapter (Only for bib and contents section)



bibliography also has the same problem



There is an exmaple of how it should look on page 4 of the example latex file










share|improve this question

























  • I will try come up wtih a MWE. Just having difficulty as it is only on page 2 of the bibliography and page 2 of the contents. It has Chapter 0. CONTENTS as a header (for the second page of the contents) documentclass[12pt,a4paper]{report}

    – Carl
    Mar 19 at 16:22













  • I cant get the u can use xampl.bib (which is installed on all systems with BibTeX) and nocite{*} even within the actually document (Very silly error on my part). Thank you for your help

    – Carl
    Mar 19 at 16:36













  • Okay have recreated it another way anyway using the contents. Even if not very efficient

    – Carl
    Mar 19 at 16:41


















1















documentclass[12pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{booktabs}
usepackage{array}
usepackage{tabularx}
usepackage{caption}
captionsetup[table]{skip=10pt}
renewcommand{arraystretch}{1.4}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{adjustbox}
usepackage{rsc}
usepackage{graphicx}
usepackage{setspace}
linespread{1.25}
UseRawInputEncoding
usepackage{geometry}
geometry{
a4paper,
left=40mm,
right=20mm,
top=40mm,
bottom=50mm
}
%header settings
usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}
makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter.
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape Keiran Corbett}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}
setlength{footskip}{50pt} %page number spacing
begin{document}
tableofcontents
chapter{Example chapter title}
newpage
text
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
end{document}


So with this command, it looks how I would like but I have a table of contents and the header for that is Chapter 0. CONTENTS



So I have two questions
1. How do I make CONTENTS not capital
2. How can I get rid of the Chapter (Only for bib and contents section)



bibliography also has the same problem



There is an exmaple of how it should look on page 4 of the example latex file










share|improve this question

























  • I will try come up wtih a MWE. Just having difficulty as it is only on page 2 of the bibliography and page 2 of the contents. It has Chapter 0. CONTENTS as a header (for the second page of the contents) documentclass[12pt,a4paper]{report}

    – Carl
    Mar 19 at 16:22













  • I cant get the u can use xampl.bib (which is installed on all systems with BibTeX) and nocite{*} even within the actually document (Very silly error on my part). Thank you for your help

    – Carl
    Mar 19 at 16:36













  • Okay have recreated it another way anyway using the contents. Even if not very efficient

    – Carl
    Mar 19 at 16:41
















1












1








1








documentclass[12pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{booktabs}
usepackage{array}
usepackage{tabularx}
usepackage{caption}
captionsetup[table]{skip=10pt}
renewcommand{arraystretch}{1.4}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{adjustbox}
usepackage{rsc}
usepackage{graphicx}
usepackage{setspace}
linespread{1.25}
UseRawInputEncoding
usepackage{geometry}
geometry{
a4paper,
left=40mm,
right=20mm,
top=40mm,
bottom=50mm
}
%header settings
usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}
makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter.
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape Keiran Corbett}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}
setlength{footskip}{50pt} %page number spacing
begin{document}
tableofcontents
chapter{Example chapter title}
newpage
text
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
end{document}


So with this command, it looks how I would like but I have a table of contents and the header for that is Chapter 0. CONTENTS



So I have two questions
1. How do I make CONTENTS not capital
2. How can I get rid of the Chapter (Only for bib and contents section)



bibliography also has the same problem



There is an exmaple of how it should look on page 4 of the example latex file










share|improve this question
















documentclass[12pt,a4paper]{report}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{booktabs}
usepackage{array}
usepackage{tabularx}
usepackage{caption}
captionsetup[table]{skip=10pt}
renewcommand{arraystretch}{1.4}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{adjustbox}
usepackage{rsc}
usepackage{graphicx}
usepackage{setspace}
linespread{1.25}
UseRawInputEncoding
usepackage{geometry}
geometry{
a4paper,
left=40mm,
right=20mm,
top=40mm,
bottom=50mm
}
%header settings
usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}
makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter.
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape Keiran Corbett}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}
setlength{footskip}{50pt} %page number spacing
begin{document}
tableofcontents
chapter{Example chapter title}
newpage
text
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
end{document}


So with this command, it looks how I would like but I have a table of contents and the header for that is Chapter 0. CONTENTS



So I have two questions
1. How do I make CONTENTS not capital
2. How can I get rid of the Chapter (Only for bib and contents section)



bibliography also has the same problem



There is an exmaple of how it should look on page 4 of the example latex file







header-footer pagestyle






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 20 at 8:25







Carl

















asked Mar 19 at 15:39









CarlCarl

204




204













  • I will try come up wtih a MWE. Just having difficulty as it is only on page 2 of the bibliography and page 2 of the contents. It has Chapter 0. CONTENTS as a header (for the second page of the contents) documentclass[12pt,a4paper]{report}

    – Carl
    Mar 19 at 16:22













  • I cant get the u can use xampl.bib (which is installed on all systems with BibTeX) and nocite{*} even within the actually document (Very silly error on my part). Thank you for your help

    – Carl
    Mar 19 at 16:36













  • Okay have recreated it another way anyway using the contents. Even if not very efficient

    – Carl
    Mar 19 at 16:41





















  • I will try come up wtih a MWE. Just having difficulty as it is only on page 2 of the bibliography and page 2 of the contents. It has Chapter 0. CONTENTS as a header (for the second page of the contents) documentclass[12pt,a4paper]{report}

    – Carl
    Mar 19 at 16:22













  • I cant get the u can use xampl.bib (which is installed on all systems with BibTeX) and nocite{*} even within the actually document (Very silly error on my part). Thank you for your help

    – Carl
    Mar 19 at 16:36













  • Okay have recreated it another way anyway using the contents. Even if not very efficient

    – Carl
    Mar 19 at 16:41



















I will try come up wtih a MWE. Just having difficulty as it is only on page 2 of the bibliography and page 2 of the contents. It has Chapter 0. CONTENTS as a header (for the second page of the contents) documentclass[12pt,a4paper]{report}

– Carl
Mar 19 at 16:22







I will try come up wtih a MWE. Just having difficulty as it is only on page 2 of the bibliography and page 2 of the contents. It has Chapter 0. CONTENTS as a header (for the second page of the contents) documentclass[12pt,a4paper]{report}

– Carl
Mar 19 at 16:22















I cant get the u can use xampl.bib (which is installed on all systems with BibTeX) and nocite{*} even within the actually document (Very silly error on my part). Thank you for your help

– Carl
Mar 19 at 16:36







I cant get the u can use xampl.bib (which is installed on all systems with BibTeX) and nocite{*} even within the actually document (Very silly error on my part). Thank you for your help

– Carl
Mar 19 at 16:36















Okay have recreated it another way anyway using the contents. Even if not very efficient

– Carl
Mar 19 at 16:41







Okay have recreated it another way anyway using the contents. Even if not very efficient

– Carl
Mar 19 at 16:41












1 Answer
1






active

oldest

votes


















1














I suggest a slight change to chaptermark so that leftmark contains the entire header ("Chapter 1. Example chapter title") and not just the chapter title ("Example chapter title"). That makes your fancyhead[L] simpler and less susceptible to incorrect chapter numbers.



For a nice header in the ToC and bibliography I found no better way than patching the commands directly. See for example Headers of ToC and fancyhdr.



memoir or the KOMA classes would have more convenient interfaces for this.



documentclass[12pt,a4paper]{report}

usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}

makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{%
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter. %
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape NAME}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}


begin{document}
tableofcontents
chapter{Example chapter title}
lorem
newpage
ipsum
newpage
dolor
newpage
sit
newpage
amet.
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}

nocite{*}
bibliographystyle{plain}
bibliography{xampl}
end{document}


Screenshot of the second page of the ToC. The header reads just "Contents" on the left side



Screenshot of the second page of the bibliography. The left hand side of the header reads "Bibliography".





The rsc package loads natbib and thus slightly changes the typesetting of the bibliography heading. In that case you need to patch the command bibsection and not thebibliography.



Add



patchcmd{bibsection}
{MakeUppercase}
{}
{}{}
patchcmd{bibsection}
{MakeUppercase}
{}
{}{}


to your preamble.






share|improve this answer


























  • Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

    – Carl
    Mar 19 at 18:14













  • @Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

    – moewe
    Mar 19 at 20:24











  • documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

    – Carl
    Mar 20 at 8:08











  • @Carl See the edit, please.

    – moewe
    Mar 20 at 8:18











  • Done, I dont use natbib as it clashes with rsc

    – Carl
    Mar 20 at 8:25












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480305%2fbibliography-table-of-content-has-chapter-in-header%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I suggest a slight change to chaptermark so that leftmark contains the entire header ("Chapter 1. Example chapter title") and not just the chapter title ("Example chapter title"). That makes your fancyhead[L] simpler and less susceptible to incorrect chapter numbers.



For a nice header in the ToC and bibliography I found no better way than patching the commands directly. See for example Headers of ToC and fancyhdr.



memoir or the KOMA classes would have more convenient interfaces for this.



documentclass[12pt,a4paper]{report}

usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}

makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{%
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter. %
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape NAME}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}


begin{document}
tableofcontents
chapter{Example chapter title}
lorem
newpage
ipsum
newpage
dolor
newpage
sit
newpage
amet.
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}

nocite{*}
bibliographystyle{plain}
bibliography{xampl}
end{document}


Screenshot of the second page of the ToC. The header reads just "Contents" on the left side



Screenshot of the second page of the bibliography. The left hand side of the header reads "Bibliography".





The rsc package loads natbib and thus slightly changes the typesetting of the bibliography heading. In that case you need to patch the command bibsection and not thebibliography.



Add



patchcmd{bibsection}
{MakeUppercase}
{}
{}{}
patchcmd{bibsection}
{MakeUppercase}
{}
{}{}


to your preamble.






share|improve this answer


























  • Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

    – Carl
    Mar 19 at 18:14













  • @Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

    – moewe
    Mar 19 at 20:24











  • documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

    – Carl
    Mar 20 at 8:08











  • @Carl See the edit, please.

    – moewe
    Mar 20 at 8:18











  • Done, I dont use natbib as it clashes with rsc

    – Carl
    Mar 20 at 8:25
















1














I suggest a slight change to chaptermark so that leftmark contains the entire header ("Chapter 1. Example chapter title") and not just the chapter title ("Example chapter title"). That makes your fancyhead[L] simpler and less susceptible to incorrect chapter numbers.



For a nice header in the ToC and bibliography I found no better way than patching the commands directly. See for example Headers of ToC and fancyhdr.



memoir or the KOMA classes would have more convenient interfaces for this.



documentclass[12pt,a4paper]{report}

usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}

makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{%
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter. %
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape NAME}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}


begin{document}
tableofcontents
chapter{Example chapter title}
lorem
newpage
ipsum
newpage
dolor
newpage
sit
newpage
amet.
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}

nocite{*}
bibliographystyle{plain}
bibliography{xampl}
end{document}


Screenshot of the second page of the ToC. The header reads just "Contents" on the left side



Screenshot of the second page of the bibliography. The left hand side of the header reads "Bibliography".





The rsc package loads natbib and thus slightly changes the typesetting of the bibliography heading. In that case you need to patch the command bibsection and not thebibliography.



Add



patchcmd{bibsection}
{MakeUppercase}
{}
{}{}
patchcmd{bibsection}
{MakeUppercase}
{}
{}{}


to your preamble.






share|improve this answer


























  • Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

    – Carl
    Mar 19 at 18:14













  • @Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

    – moewe
    Mar 19 at 20:24











  • documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

    – Carl
    Mar 20 at 8:08











  • @Carl See the edit, please.

    – moewe
    Mar 20 at 8:18











  • Done, I dont use natbib as it clashes with rsc

    – Carl
    Mar 20 at 8:25














1












1








1







I suggest a slight change to chaptermark so that leftmark contains the entire header ("Chapter 1. Example chapter title") and not just the chapter title ("Example chapter title"). That makes your fancyhead[L] simpler and less susceptible to incorrect chapter numbers.



For a nice header in the ToC and bibliography I found no better way than patching the commands directly. See for example Headers of ToC and fancyhdr.



memoir or the KOMA classes would have more convenient interfaces for this.



documentclass[12pt,a4paper]{report}

usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}

makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{%
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter. %
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape NAME}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}


begin{document}
tableofcontents
chapter{Example chapter title}
lorem
newpage
ipsum
newpage
dolor
newpage
sit
newpage
amet.
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}

nocite{*}
bibliographystyle{plain}
bibliography{xampl}
end{document}


Screenshot of the second page of the ToC. The header reads just "Contents" on the left side



Screenshot of the second page of the bibliography. The left hand side of the header reads "Bibliography".





The rsc package loads natbib and thus slightly changes the typesetting of the bibliography heading. In that case you need to patch the command bibsection and not thebibliography.



Add



patchcmd{bibsection}
{MakeUppercase}
{}
{}{}
patchcmd{bibsection}
{MakeUppercase}
{}
{}{}


to your preamble.






share|improve this answer















I suggest a slight change to chaptermark so that leftmark contains the entire header ("Chapter 1. Example chapter title") and not just the chapter title ("Example chapter title"). That makes your fancyhead[L] simpler and less susceptible to incorrect chapter numbers.



For a nice header in the ToC and bibliography I found no better way than patching the commands directly. See for example Headers of ToC and fancyhdr.



memoir or the KOMA classes would have more convenient interfaces for this.



documentclass[12pt,a4paper]{report}

usepackage{fancyhdr}
pagestyle{fancy}
fancyhf{}

makeatletter
% copy of the original from report.cls with the MakeUppercase dropped
renewcommand{chaptermark}[1]{%
markboth
{ifnum c@secnumdepth >m@ne
@chapapp thechapter. %
fi
#1}
{}}
makeatother

usepackage{etoolbox}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}
patchcmd{tableofcontents}
{MakeUppercase}
{}
{}{}

patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}
patchcmd{thebibliography}
{MakeUppercase}
{}
{}{}

fancyhead[L]{itshapeleftmark}
fancyhead[R]{itshape NAME}
fancyfoot[C]{thepage}
renewcommand{headrulewidth}{0.5pt}
renewcommand{footrulewidth}{0pt}
setlength{headheight}{15pt}


begin{document}
tableofcontents
chapter{Example chapter title}
lorem
newpage
ipsum
newpage
dolor
newpage
sit
newpage
amet.
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}
chapter{Example chapter title}

nocite{*}
bibliographystyle{plain}
bibliography{xampl}
end{document}


Screenshot of the second page of the ToC. The header reads just "Contents" on the left side



Screenshot of the second page of the bibliography. The left hand side of the header reads "Bibliography".





The rsc package loads natbib and thus slightly changes the typesetting of the bibliography heading. In that case you need to patch the command bibsection and not thebibliography.



Add



patchcmd{bibsection}
{MakeUppercase}
{}
{}{}
patchcmd{bibsection}
{MakeUppercase}
{}
{}{}


to your preamble.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 20 at 8:57

























answered Mar 19 at 16:57









moewemoewe

95.5k10116358




95.5k10116358













  • Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

    – Carl
    Mar 19 at 18:14













  • @Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

    – moewe
    Mar 19 at 20:24











  • documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

    – Carl
    Mar 20 at 8:08











  • @Carl See the edit, please.

    – moewe
    Mar 20 at 8:18











  • Done, I dont use natbib as it clashes with rsc

    – Carl
    Mar 20 at 8:25



















  • Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

    – Carl
    Mar 19 at 18:14













  • @Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

    – moewe
    Mar 19 at 20:24











  • documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

    – Carl
    Mar 20 at 8:08











  • @Carl See the edit, please.

    – moewe
    Mar 20 at 8:18











  • Done, I dont use natbib as it clashes with rsc

    – Carl
    Mar 20 at 8:25

















Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

– Carl
Mar 19 at 18:14







Thank you so much for this! Just one question. It works perfectly on my contents but not on the bibliography - it is still in capitals. I am using the usepackage{rsc} bibliography style if that makes a difference?

– Carl
Mar 19 at 18:14















@Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

– moewe
Mar 19 at 20:24





@Carl I get the same result for the bibliography heading even with bibliographystyle{rsc} in the MWE. If it does not work for you, there must be something else that influences the bibliography. Do you load natbib or another bibliography package? Please add that to your MWE.

– moewe
Mar 19 at 20:24













documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

– Carl
Mar 20 at 8:08





documentclass[12pt,a4paper]{report} usepackage[utf8]{inputenc} usepackage{amsmath} usepackage{booktabs} usepackage{array} usepackage{tabularx} usepackage{caption} captionsetup[table]{skip=10pt} renewcommand{arraystretch}{1.4} usepackage{amsfonts} %usepackage{breakcites} usepackage{amssymb} usepackage{adjustbox} usepackage{rsc} usepackage{graphicx} usepackage{setspace} linespread{1.25} UseRawInputEncoding usepackage{geometry} geometry{ a4paper, left=40mm, right=20mm, top=40mm, bottom=50mm }

– Carl
Mar 20 at 8:08













@Carl See the edit, please.

– moewe
Mar 20 at 8:18





@Carl See the edit, please.

– moewe
Mar 20 at 8:18













Done, I dont use natbib as it clashes with rsc

– Carl
Mar 20 at 8:25





Done, I dont use natbib as it clashes with rsc

– Carl
Mar 20 at 8:25


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480305%2fbibliography-table-of-content-has-chapter-in-header%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?