3

I know this question has answers on this site already, but none of them worked! I am using biblatex with the historian style for my history day paper. My teacher requires the bibliography heading be centered over the bibliography, and try as I might I can't do it! I tried wrapping \printbibliography with centering and redefining the bibliography string used by biblatex and even redefining \bibname but nothing works. Here's my code (you can try it with your own .bib file to get an output):

\documentclass{memoir}

\usepackage[utf8]{inputenc}
\usepackage [american]{babel}
\usepackage [babel=once, english=american] {csquotes}
\usepackage[backend=bibtex,style=historian,sorting=nty, autocite=footnote,
babel=hyphen, mincrossrefs=1,usetranslator=true,printseries]{biblatex}

\nocite{*}
\bibliography{bib.bib}
\setlength\bibitemsep{2\itemsep}
\setlength\bibhang{30pt}

%This is one of many things I tried that didn't work. If I just change the spelling of bibliography it works fine, but it ignores the centering command.
%\DefineBibliographyStrings{english}{%
%  references = {\begin{center}Bibliography\end{center}},
%}     

\begin{document}
\printbibheading
\printbibliography[keyword=primary,heading=subbibliography,title={Primary Sources}]
\printbibliography[keyword=secondary,heading=subbibliography,title={Secondary Sources}]
\end{document}
5
  • 2
    If you use memoir, you probably want to use the command \setsecheadstyle. If other sectional divisions earlier in the document need to be done differently, then add before you call your \print* commands something like \setsecheadstyle{\centering\bfseries\itshape} (for centred, bold, italic section-level heading). For \subsections, you use the command \setsubsecheadstyle. Of course, if all section headings should be styled the same, just set it once in the preamble.
    – jon
    Jan 19, 2015 at 4:56
  • Do you only need to centre the bibliography heading?
    – moewe
    Aug 3, 2015 at 8:12
  • @jon You seem to have the answer there. Would you mind turning your comment into an actual answer?
    – moewe
    Dec 30, 2015 at 8:47
  • @moewe -- Wow. An old one....
    – jon
    Dec 31, 2015 at 15:10
  • @jon Indeed. Thank you for taking time to answer this one.
    – moewe
    Dec 31, 2015 at 15:12

1 Answer 1

4

There are a few things you could do. (I show two of them.) Since you are using memoir, you have access to a fairly easy set of commands to control section headings. Chapters are more complicated, but there are some pre-defined styles that might fit your needs (e.g., crosshead, culver, and dash).

Anyway, using memoir, you have the commands \setSheadstyle (where S represents sec for sections, subsec for subsections, etc.). Note that this command only affects the styling: for spacing, there are a series of other commands. \secSheadstyle can be used at different points in the document. Below, I suggested you try

\setsecheadstyle{\centering\large\bfseries\itshape} 

and

\setsecheadstyle{\centering\itshape} 

biblatex, on the other hand, has \defbibheading, which has two mandatory and one optional argument. In the below example, we have:

\defbibheading{rene}[\bibname]{% or try `\refname`; both can be redefined
  \section*{#1}% 
  \markboth{#1}{#1}}

So, for example, you could do something like this:

\documentclass[12pt,openany]{memoir}
\usepackage[T1]{fontenc}% usually a good idea for pdflatex
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage[babel=once, english=american]{csquotes}
\usepackage[backend=bibtex,style=historian,sorting=nty, autocite=footnote,
babel=hyphen, mincrossrefs=1,usetranslator=true,printseries]{biblatex}

\addbibresource{biblatex-examples.bib}% the command \bibliography is deprecated
\setlength\bibitemsep{2\itemsep}
\setlength\bibhang{30pt}

\defbibheading{rene}[\bibname]{%
  \section*{#1}%
  \markboth{#1}{#1}}

\begin{document}
\nocite{*}
% un-redefined \section style
\section{Default Section Style}

% now we redefine styling of \section
\setsecheadstyle{\centering\large\bfseries\itshape}
\printbibheading[heading=rene]
\setsecheadstyle{\centering\itshape}
\printbibliography[keyword=primary,heading=subbibliography,title={Primary Sources}]
\printbibliography[keyword=secondary,heading=subbibliography,title={Secondary Sources}]
\end{document}
1
  • Any idea's on how to make this work for report doc type? ''' \usepackage[ backend=biber, style=apa, citestyle= authoryear, %authoryear natbib, %or chicago-authordate, sorting=nyt, hyperref=true ]{biblatex} ''' Jul 20, 2020 at 8:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .