4

In my previously asked question about changing the chaptermark in a bibliography, I got a nice answer but unfortunately I need to place the code in my BBL file. This means I need to rewrite my code every run. Is there a solution for this, new, problem?

My first problem was: I'm writing my thesis. The references span across multiple pages. On the top of the second (and further) page there is a header (that appears on every page where a new chapter does not begin). The header informs a reader about the current chapter he/she is reading. But in the references it says "Algemene conclusies", which is my last chapter. I would like this not to appear in the references and say "Bibliografie" instead.

This is my code for the preamble:

    \documentclass[11pt, a4paper, twoside, openright]{report}

%\usepackage[left=2.5cm,top=3cm,right=2.5cm,bottom=3cm]{geometry}
\usepackage[a4paper,inner=3.2cm,outer=2cm,top=2cm,bottom=1.5cm,includehead,includefoot]{geometry}

\usepackage{xspace}
\usepackage{setspace} \onehalfspacing
\usepackage[dutch]{babel}
\usepackage{graphicx}
\usepackage[latin1]{inputenc}
\usepackage{subfigure}
\usepackage{appendix}
\usepackage{amsmath}
\usepackage{pdfpages}
\usepackage{pdflscape}
\usepackage{capt-of}
\usepackage{longtable}
\usepackage[square]{natbib}
\usepackage{lscape}
\usepackage{url}
\usepackage{tocvsec2}
\usepackage[hang,small,bf]{caption}
\usepackage{pslatex}
\usepackage{titlesec}
\usepackage{fancyhdr}
\pagestyle{fancy}
\headheight = 14pt
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\textit{\nouppercase{\leftmark}}}
\fancyhead[LO]{\textit{\nouppercase{\rightmark}}}

%\renewcommand{\sectionmark}[1]{\markright{#1}} 
%\fancyhead[LO]{\nouppercase{\leftmark}}
%\fancyhead[LE]{\nouppercase{\rightmark}}
%\fancyhead[HR]{\thepage}
\renewcommand{\headwidth}{16cm} 
\renewcommand{\baselinestretch}{1.2}

\setlength{\parindent}{0cm}
\setlength{\parskip}{2.3ex plus 0.3ex minus 0.3ex}

\usepackage{pstricks}
\makeatletter
\def\LigneVerticale{\vrule height 2cm depth 2cm\hspace{0.1cm}\relax}
\def\LignesVerticales{%
\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
\rlap{\hbox to 1cm{\hss\mbox{\white #1}\hss}}%
\vrule height 0pt width 1cm depth 0pt}
\def\@makechapterhead#1{\hbox{%
\huge
\LignesVerticales
\hspace{-0.5cm}%
\GrosCarreAvecUnChiffre{\thechapter}
\hspace{0.2cm}\hbox{#1}%
}\par\vskip 2cm}
\def\@makeschapterhead#1{\hbox{%
\huge
\LignesVerticales
%\hspace{0.5cm}%
\hbox{#1}%
}\par\vskip 2cm}

This is my file:

\chapter{Algemene conclusies}
\input{Conclusie}
\newpage

\clearpage{\pagestyle{empty}\cleardoublepage}
\addcontentsline{toc}{chapter}{Bibliografie}
\input{Bibliografie}

and this is the code in the file Bibliografie:

\bibliography{bronnen}
   \bibliographystyle{agsm}%plainnat
2
  • Maybe by setting \renewcommand{\bibname}{Bibliografie} and addcontentsline{toc}{chapter}{Bibliogafie} ? – Mario S. E. May 24 '13 at 9:59
  • I have posted some code, I don't now if this helps. The addcontentsline{toc}{chapter}{Bibliogafie} is already in my code. I 'll try to add \renewcommand{\bibname}{Bibliografie} – Mus Liselot May 24 '13 at 10:04
3

Others have pointed to the fact you don't change code in the .bbl file, and that you should be setting the \bibname and adding an entry for the contents.

Now the headings error lies with the marks not changing. Internally report starts the bibliography with \chapter* which does not set the marks. In the standard set-up the command \@mkboth is then issued with the \bibname, giving headings in the bibliography. In your set-up this is not happening. One fix is to simply add

\chaptermark{\bibname}

before your bibliography.

The other is the change your definition of \@makeschapterhead to

\def\@makeschapterhead#1{\hbox{%
\huge
\LignesVerticales
\hbox{#1}\chaptermark{#1}
}\par\vskip 2cm}

or to

\def\@makeschapterhead#1{\hbox{%
\huge
\LignesVerticales
#1
}\par\vskip 2cm}

The first one will change the marks to the current chapter name in all \chapter* cases and produce running heads in line with your other chapters. The other will revert to standard report behaivour i.e., in bibliography left and right heads displaying \bibname, and no resetting of header names at ordinary \chapter*.

0
4

To answer your question on how to keep code in a bbl file: you don't. It's a temporary file used to generate the bibliography from. If you need to put code in that file, your solution isn't a solution.

Regarding your problem: See the answer on this question

3

You can set the name of the bibliography by using \renewcommand{\bibname}{Bibliografie}.

Just please bear in mind that if you are using hyperref, you should also include:

\newpage{\pagestyle{empty}\cleardoublepage}
\renewcommand{\bibname}{Bibliografie}
\phantomsection
\addcontentsline{toc}{chapter}{Bibliografie}
\bibliographystyle{agsm}
\bibliography{bronnen}

*There is no need to \input a file named "Bibliografie", you can call it directly with the command \bibliography{nameofyourfile}.

9
  • I tries to put your code instead of mine (\clearpage{\pagestyle{empty}\cleardoublepage} \addcontentsline{toc}{chapter}{Bibliografie} \input{Bibliografie}) but unfortunatly it still doesn't give what I want. It still gives "algemene conclusies" on the left side page in the chaptermark... – Mus Liselot May 24 '13 at 10:18
  • Try adding \newpage{\pagestyle{empty}\cleardoublepage} at the beginning of my code – Mario S. E. May 24 '13 at 10:28
  • @MusLiselot Did it work? – Mario S. E. May 24 '13 at 10:36
  • Sorry, my computer was still running, it's a big file. No, unfortunatly it doesn't work. – Mus Liselot May 24 '13 at 10:37
  • 1
    @MusLiselot The problem is in the way you define the top header. I've run this without your definition and works just fine. For example, try replacing everything inside the makeatletter for \lhead[\fancyplain{}{\rm\thepage}]{\fancyplain{}{\sl\rightmark}} \chead{} \rhead[\fancyplain{}{\sl\leftmark}]{\fancyplain{}{\rm\thepage}} \lfoot{} \cfoot{\fancyplain{\rm\thepage}{}} \rfoot{} – Mario S. E. May 24 '13 at 11:25

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.