2

In scrreprt, using scrlayer-scrpage I have the header set up so it says "Chapter #" in the outer header of the even page and "Chapter title" in the outer header of the odd page. I would like this header to continue in this exact way in the bibliography as well (see image). I figured that this would work if Latex treated the bibliography as a section inside of the current chapter instead of as a chapter by itself. How do I achieve this?

enter image description here

MWE:

\documentclass[A5paper, twoside, openright, headsepline, chapterprefix=true]{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}


%%%---header/footer
\usepackage[manualmark]{scrlayer-scrpage}

\automark{chapter}
%%--"Chapter #" in lehead (only for numbered chapters), chapter name in rohead
\renewcommand*\chaptermark[1]{%
    \markboth{\ifnumbered{chapter}{\chaptermarkformat}{}}{#1}%
}

\AfterTOCHead[toc]{\markboth{}{\contentsname}}

\ofoot[\pagemark]{\pagemark}

%%%%---bibliography
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

%%%---blindtext
\usepackage{lipsum}

\begin{document}

\chapter{Title of a chapter}

\lipsum[1-5] 
citing \cite{angenendt, doody, matuz:doody, gillies, herrmann, kastenholz, murray, reese, sarfraz}

\section{Title of a section}

\lipsum[6-10] 
citing \cite{aksin, sigridsson, spiegelberg, springer, weinberg, yoon, augustine, cicero, coleridge, companion}

\printbibliography  

\end{document}
5
  • The bibliography should be a section in chapter 1?
    – esdd
    Aug 22 '19 at 13:28
  • There was a redundant \automark{chapter} in my other answer, sorry. I have changed this in the answer there.
    – esdd
    Aug 22 '19 at 13:56
  • @esdd you've been helping me out a lot lately, thanks! And yes, the bilbiography should indeed be a section inside chapter 1. I'll edit the question
    – C.Carl
    Aug 22 '19 at 14:01
  • Then you only have to add bibliography=leveldown to the class options. Note that A5paper is not a valid option. Replace it by paper=A5 or paper=a5 or a5paper. Additionally add DIV=14 (adjust the value to your needs) because the automatical calculated value (26) is too big.
    – esdd
    Aug 22 '19 at 14:06
  • @esdd I'll change those things, thanks again!
    – C.Carl
    Aug 22 '19 at 14:09
2

I am not sure if I understand your issue. If the bibliography should be a section using document class scrreprt and package biblatex you can add option bibliography=leveldown to the class options.

Example:

\documentclass[
  a5paper,% <- corrected
  DIV=14,% <- added
  twoside, openright, headsepline, chapterprefix=true,
  bibliography=leveldown% <- added
]{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}% <- added to avoid a biblatex warning

%%%---header/footer
\usepackage[manualmark]{scrlayer-scrpage}

%%--"Chapter #" in lehead (only for numbered chapters), chapter name in rohead
\renewcommand*\chaptermark[1]{%
    \markboth{\ifnumbered{chapter}{\chaptermarkformat}{}}{#1}%
}

\AfterTOCHead[toc]{\markboth{}{\contentsname}}

\ofoot[\pagemark]{\pagemark}

%%%%---bibliography
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

%%%---blindtext
\usepackage{lipsum}

\begin{document}
\chapter{Title of a chapter}

\lipsum[1-5] 
citing \cite{angenendt, doody, matuz:doody, gillies, herrmann, kastenholz, murray, reese, sarfraz}

\section{Title of a section}

\lipsum[6-10] 
citing \cite{aksin, spiegelberg, springer, weinberg, yoon, augustine, cicero, coleridge, companion}

\clearpage
\printbibliography
\end{document}

Result:

enter image description here

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.