## LaTeX forum ⇒ General ⇒ Section heading style for References

LaTeX specific issues not fitting into one of the other forums of this category.
curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

### Section heading style for References

Hi,

I want to change the section heading style for the "References" section. I want the word "References" appear in the center, bold, and font size 12pt (the same font size that I am using for the rest of my document).

The default style of section heading in the article class that is induced by the command \bibliography{filename.bib} is larger than the 12pt font and is not centered.

Is there an easy way to change the section heading style for the References section or suppress the heading so that I can manually typeset the heading?

Thanks very much.

curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm
From searching the web, I learnt the following way of suppressing the section title of the bibliography section, and then used my own custom style.

Command
\renewcommand{\refname}{}

gets rid of the section title name.

Stefan Kottwitz
Site Admin
Posts: 9444
Joined: Mon Mar 10, 2008 9:44 pm
Hi,

with the command above you would still get some vertical space. You could disable \section* temporarily:
{\def\section*#1{}\bibliography...}

Stefan
Site admin

curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm
Thanks very much Stefan. You are right. The vertical space was still present when I tried the solution in my post. I used \vspace to reduce that vertical space. However, your solution is better. Thanks.

TritonMan
Posts: 8
Joined: Tue Jun 01, 2010 1:58 am
I know this thread is old, but I think I have a more robust solution for anyone who
might still be trying to do this:

\renewcommand\bibsection{\subsection{\refname}}

You can replace \subsection with whatever section type you like, which will keep it nicely in line with the style of the rest of your doc. It worked nicely for a project report I had to do a while ago - I remember I had trouble finding anything documented about it then!

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
TritonMan wrote:I know this thread is old, but I think I have a more robust solution for anyone who
might still be trying to do this:

\renewcommand\bibsection{\subsection{\refname}}

You can replace \subsection with whatever section type you like, which will keep it nicely in line with the style of the rest of your doc. It worked nicely for a project report I had to do a while ago - I remember I had trouble finding anything documented about it then!

Please explain what exactly do you mean by "more robust" The line of code you just posted produces the error

! LaTeX Error: \bibsection undefined.

with the standard classes (book, report, article) and with the KOMA_Script document classes (scrbook, scrreprt); the cause of the error is simple: \bibsection is not defined for those classes.

In fact, your line only compiles with the memoir document class.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

TritonMan
Posts: 8
Joined: Tue Jun 01, 2010 1:58 am
Well, I just used a line like that in my thesis, which is based on the report class, and it compiles with no errors or warnings. I'm using the natbib package, which may define the \bibsection macro regardless of document class.

The line of code from my thesis is:

\renewcommand\bibsection{\chapter*{\refname}}

I mean it is more robust than adding negative lengths in your document, because if you do that then surely you have to keep an eye on how the layout changes if you change font size and the like, whereas this command makes it just the same as a regular title.

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
TritonMan wrote:[...] I'm using the natbib package, which may define the \bibsection macro regardless of document class. [...]

So it is. See the natbib manual (Section 2.12 - Other formatting options, p. 15f). But this is an essential information to be given together with your solution. Nobody knows at first sight where this command comes from.

Best regards
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Return to “General”

### Who is online

Users browsing this forum: No registered users and 7 guests