1

I have a large document for which I use fancyhdr to include the heading of the respective section. I have two questions:

1) Is it possible to only display the heading of the main respective section? So within a subsection, also just display the heading of the overall section?

2) I have changed some code to include my References and Appendix in the toc without any numbers in front. This worked well, however now my whole Appendix has References displayed in the header as shown in the picture. How can I avoid this? I will display a MWE of my code below.

enter image description here

\documentclass[12pt, a4paper]{article}  
\usepackage[paper=a4paper,left=3cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{fancyhdr}
\setlength\headheight{14pt}
\pagestyle{fancy}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}

\usepackage[natbibapa]{apacite}
% \usepackage[
% backend=biber,
% style=apa,
% sorting=ynt
% ]{biblatex}
% \DeclareLanguageMapping{american}{american-apa}
% \addbibresource{Bib.bib} %Imports bibliography file

\begin{document}

\section{Text}
Text \citep{Almer2017}

\bibliography{Bib}
\addcontentsline{toc}{section}{References}
  \bibliographystyle{apacite}
\pagebreak

\section*{Appendix}
\addcontentsline{toc}{section}{Appendix}

\end{document}

Citation example:

@article{Almer2017,
    Author = {Christian Almer and Ralph Winkler},
    Journal = {Journal of Environmental Economics and Management},
    Pages = {125-151},
    Title = {{Analyzing the effectiveness of international environmental policies: The case of the Kyoto Protocol}},
    Volume = {82},
    Year = {2017}}
  • 1
    Section* does not write to the header. Try adding \markboth{Appendix}{Appendix} – daleif Jul 26 at 17:08
  • @daleif Thank you, that worked! – User2010S Jul 26 at 17:22
  • I'll add it as an answer – daleif Jul 26 at 17:22
1

In most classes \section* does not write to the toc nor the headers/Footers. You'll have to add it manual.

\markboth{Appendix}{Appendix} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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