BibTeX, biblatex and biberModifications to BibTeX Style File

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
melaw
Posts: 2
Joined: Thu Apr 11, 2013 11:31 am

Modifications to BibTeX Style File

Post by melaw »

Hi!

I am currently working on my thesis and I am using "apalike" as BibTeX Style.

However, I now was told the volume number has to be bold, and I struggle in doing so. I tried to find a .bst that does what I want, but only to find ametsoc.

That .bst does make the volume number bold, but shows DOIs and URLs behind every bibliography entry, which I don't want.
makebst from custom-bib seems overkill for what I want to do, and "Tame the BeaST" did not help either as I try to avoid coding around for hours while thesis writing.

My humble question is: How can I change apalike to make the volume numbers bold?

I already tried to apply the aproach in this thread. But replacing the corresponding function inside the .bst did not change anything.

Thanks a lot!
Last edited by melaw on Thu Apr 11, 2013 2:11 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

melaw
Posts: 2
Joined: Thu Apr 11, 2013 11:31 am

Modifications to BibTeX Style File

Post by melaw »

Hi folks!

This is a bit strange, but I managed to fix it by myself.
I will give you the solution:

In the apalike.bst, delete the functions format.bvolume and forman.vol.num.pages in Notepad++.

Then add this code:

Code: Select all

FUNCTION {bolden}
{ duplicate$ empty$
    { pop$ "" }
    { "\textbf{" swap$ * "}" * }
  if$
}


FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { bbl.volume volume tie.or.space.prefix
      "volume" bibinfo.check * *
      series "series" bibinfo.check
      duplicate$ empty$ 'pop$
%%% NO ITALIC SERIES        { emphasize ", " * swap$ * }
      {", " * swap$ * }
      if$
	  bolden
      "volume and number" number either.or.check
    }
  if$
}


FUNCTION {format.vol.num.pages}
{ volume field.or.null
  number empty$
    'skip$
    { "(" number * ")" * *
      volume empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
    }
  if$
  bolden
  pages empty$
    'skip$
    { duplicate$ empty$
        { pop$ format.pages }
        { ":" * pages n.dashify * }
      if$
    }
  if$
}
This is basically the part from ametsoc, that handles the bold sections.

My solution may not be the best code imaginable, but it works.
Last edited by cgnieder on Thu Apr 11, 2013 7:17 pm, edited 1 time in total.
Post Reply