Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have what I hope is a simple question. I finally figured out how to get the multiple bibliographies to work (mostly) like I want it. The one additional formatting thing I would like is to make the "References" heading centered upon the page. What I am getting now is the heading "References" flush left.

Here is my code:

{\documentclass[a4paper,12pt]{article}
 \usepackage[backend=biber,natbib=true,citestyle=numeric-comp,bibstyle=authoryear,sorting=none,doi=false,url=false,isbn=false]{biblatex}
\addbibresource{simple_example.bib}

\title{Here is the title.}
\author{ John S. Doe }

\begin{document}
\maketitle

\include{Chapter01}
\printbibliography[section=1,heading=References]
\include{Chapter02}
\printbibliography[section=2,heading=References]
\end{document}

Code for Chapter01.tex

\chapter{This is Chapter 01}
\begin{refsection}
Blah, blah, blah, ba-blah \cite{goossens93}.
Blah, blah, blah, ba-blah \cite{knuth79}.
\end{refsection}'

Code for Chapter02.tex

\chapter{This is Chapter 02}
\begin{refsection}
 Blah, blah, blah, ba-blah \cite{knuth79}. 
 Blah, blah, blah, ba-blah \cite{greenwade93,knuth79}.    
\end{refsection}

And code for the bib file:

% This file was created with JabRef 2.6.
% Encoding: ISO8859_1
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The Latex Companion A",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}

@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
url=" www.ctan.org"
}

@book{knuth79,
author = "Donald E. Knuth",
title = "Tex and Metafont, New Directions in Typesetting",
year = "1979",
publisher = "American Mathematical Society and Digital Press",
address = "Stanford"
}
share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

Your example code is not consistent: you use article as the document class and then use \chapter in the subsidiary files.

Anyway, you can use \defbibheading to format the bibliography headings; the syntax is

\defbibheading{<name>}[<title>]{<code>}

where <name> is the identifier to be used in the heading option of \printbibliography and <code> should be some LaTeX code to generate the heading; for further details, see Section 3.5.7 Bibliography Headings and Environments of the biblatex manual.

A little example producing the title "References" centered, in the style used by \chapter* and taking care of the running headings:

\begin{filecontents*}{simpleexample.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The {LaTeX} {C}ompanion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}

@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
url=" www.ctan.org"
}

@book{knuth79,
author = "Donald E. Knuth",
title = "{TeX} and {M}etafont, {N}ew {D}irections in {T}ypesetting",
year = "1979",
publisher = "American Mathematical Society and Digital Press",
address = "Stanford"
}
\end{filecontents*}

\documentclass[a4paper,12pt]{book}
\usepackage[backend=biber,natbib=true,citestyle=numeric-comp,bibstyle=authoryear,sorting=none,doi=false,url=false,isbn=false]{biblatex}
\addbibresource{simpleexample.bib}

\defbibheading{references}[\refname]{\chapter*{\centering#1}
   \markboth{#1}{#1}}

\begin{document}

\chapter{This is Chapter 01}
\begin{refsection}
Blah, blah, blah, ba-blah \cite{goossens93}.
Blah, blah, blah, ba-blah \cite{knuth79}.
\end{refsection}
\printbibliography[section=1,heading=references]

\chapter{This is Chapter 02}
\begin{refsection}
 Blah, blah, blah, ba-blah \cite{knuth79}. 
 Blah, blah, blah, ba-blah \cite{greenwade93,knuth79}.    
\end{refsection}
\printbibliography[section=2,heading=references]

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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