Medical Nerds Blog Logo
medicalnerds.com

technology, stats and IT for medics

 

Custom LaTeX bibliography style files: Part 2/4

March 22nd, 2008 by Mark · 8 Comments

In this article, I will show the steps involved in creating a bibliography style file for the Journal Brain and include the relevant BST file for LaTeX, a powerful typesetting system available for all common platforms, including Windows, Linux and Mac OS X.

It is important to realise that there are several different but equally important factors to consider when preparing a manuscript for publication. Readers are advised to read the “Information for Authors” pages as they will detail the requirements in detail. For the journal Brain, the requirements are listed very clearly.

The fundamental factors to consider are:

  1. How to cite within the text
  2. Where to cite in the text
  3. How to format the reference list

How to cite within the text

This is not a function of the .bst file. However, the bst file does impact on citing within the text as citing requires bibtex to generate the correct data for use. In general terms, you should regard citation format within the text to be independent of bibliography style. The only time you will encounter problems is that if you use a bibliography style that uses numbered references and attempt to reference by author/date.

I use the natbib package to handle citation formatting. Brain requires Author Year citations, so read the natbib documentation and define the correct format in the \usepackage{} command.

Where to cite in the text

This is of considerable concern when switching an article from one journal style to another. If your paper is rejected from one journal, you may be faced with switching citation style, bibliography style and citation positioning.

For example:

Diabetes is very common. [1]

Diabetes is very common (Smith, 1994).

In LaTeX, you might write:
Diabetes is very common.\cite{Smith:1994}
Or
Diabetes is very common \cite{Smith:1994}.

Notice that we have to position punctuation correctly.

The easiest way of fixing this is to use regular expressions. My text editor of choice (TextMate) has powerful support for regular expressions. Using these, it is possible to search for citations with preceding punctuation
and replace them with citations that move the punctuation to the end. I shall save a more detailed description of this for another article.

Brain – journal of Neurology, Latex style file

I have created a style file for this journal. Please let me know if you have any difficulties with this and I hope you put it to good use. Credit really must go to the author of custom.bib (and indeed he is the author of natbib too) Patrick W Daly.

The Brain bibliography style file.

If you have problems with this style file, or want to make a minor change, then review the custom.bib log file that was used to create this style file. In it you will see the answers I made to the custom.bib questions.

Good luck!

Tags: LaTeX

8 responses so far ↓

  • 1 Adrian // Mar 23, 2008 at 6:02 pm

    Awesome, this just works great for me :). There’s just a minor detail I had to adjust. When I looked at some Brain publications, I noticed that they print “et al” in italics in the text, but normal font is used in the bibliography. So I ran makebst.tex and chose “FONT OF `ET AL'” to be “(i) Italic et al “. However, “et al” is now printed in italics both in the text and the bibliography.

    The solution was to change lines 1170 and 1176 of your brain.bst file both from

    ” ” * bbl.etal *

    to

    ” ” * bbl.etal emphasize *

    Now, “et al” is in italics in the text, but normal font in the bibliography. Thanks again for sharing your knowledge :).

    BTW: You may want to consider uploading your brain.bst to the LaTeX Bibliography Styles Database (http://jo.irisson.free.fr/bstdatabase/)

  • 2 Mark // Mar 25, 2008 at 7:30 pm

    Thanks for this. I am off to Dublin this week, so will update the style file and upload to this resource on my return. I was not aware of such a database!

    Many thanks!

  • 3 David // Sep 22, 2009 at 2:08 pm

    That seems to work properly! Thank you so much (perhaps you should ask the journal editor to put your file on the website, it may be useful to other latex users)

  • 4 Steffi // Oct 18, 2009 at 12:43 pm

    Thanks a lot! That is really great for me, as it is exactly the style my tutor wants me to take!

    I have just one question left:
    If I have got one sentence and I want to cite several authors, I do it that way at the moment:
    citep{ABC}; citep{DEF}; citep{GHI}.

    The result in the pdf is: (ABC et al., 1990); (DEF et al., 1990); (GHI et al., 1990).

    What to do, that I get all the cited authors together in one bracket, separated by a semicolon (and not every author in extra brackets)?

    So the way I would like to have it, would be:
    (ABC et al., 1990; DEF et al., 1990; GHI et al., 1990)

    Thank you very much in advance!
    (Unfortunately I do not know anything about creating/modifying styles 🙁 ).

  • 5 Steffi // Nov 6, 2009 at 5:34 pm

    A friend of me gave me the straight tip for my problem. 🙂
    It is a little bit circuitous but it works!
    (\citeauthor{ABC}, \citeyear{ABC}; \citeauthor{DEF}, \citeyear{DEF}; \citeauthor{GHI}, \citeyear{GHI}).
    Maybe that will be useful to someone else.

  • 6 mvavrek // Jan 18, 2010 at 5:12 am

    @Steffi: if you want more than one author at a time, just put all the authors inside a single \cite tag like this:

    \cite{ABC, DEF, GHI}

    and it will turn in to this:

    (ABC et al., 1990; DEF et al., 1990; GHI et al., 1990).

  • 7 Pradeep // Feb 29, 2012 at 11:56 pm

    Dude, the bst file can NOT be downloaded anymore. Please check the link and update it.. Or please email me the bst file. thanks a lot!!

  • 8 Martin // Jun 12, 2013 at 12:25 am

    The bst link is no longer functional, please re-enable?

Leave a Comment

(Don't forget to fill in the Captcha)

CAPTCHA image