1

I am new to this, so if I have left out any information please just let me know, I will fill it in if I can.

I am trying to get bold volume numbers in my bibliography, and it seems that the solution is to edit the .bst file (Harvard agsm bibliography style no comma and bold volume and How to edit a .bst file to get bold volume number in case of articles? for example).

However, I can't find the .bst file! It appears that it should be in C:\Program Files (x86)\MiKTeX 2.9\bibtex\bst\numeric.bst (Add bst file with LaTeX / MiKTeX) or something similar, but there are no MiKTeX program files! I know that sounds crazy.

I am using MiKTeX 2.9 and TexMaker on Windows 7.

Here is a basic example:

\documentclass[12pt,oneside]{report}
\usepackage[backend=biber,style=numeric,sorting=none,natbib=true,firstinits=true,uniquename=false]{biblatex}

\addbibresource{bibliography.bib}

\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit*{\addnbspace}% NEW (optional)
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\DeclareFieldFormat{volume}{\mkbibbold{#1}}

\begin{document}
Example text with citation \citep{Liu14}.
\printbibliography
\end{document}

This is the bibliography file content:

@article{Liu14,
    Author = {F. Liu and L. Chen and B. Tang and Y. Hu and Q. Lin and L. Lei},
    Journal = {Lighting Res. Technol.},
    Numpages = {9},
    Pages = {567--575},
    Title = {{A discontinuous surface reflector for
high-power integrated LEDs}},
    Volume = {46},
    Number = {},
    doi = {},
    Year = {2014}
}

And here is the output:

Text

Bibliography

  • 2
    .bst files are for BibTeX. You are using BibLaTeX, which is very different. For BibLaTeX there should be an option that does this. No .bst trickery needed :) – Phelype Oleinik May 1 '18 at 14:46
  • 4
    You are almost there, you want \DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}. – moewe May 1 '18 at 14:47
  • 1
    You are using biblatex, it doesn't use bst-files. All references to them are irrelevant for you. – Ulrike Fischer May 1 '18 at 14:47
  • Thank you all! I was so confused! @moewe that sorted it. – cohara May 1 '18 at 14:58
2

biblatex does not use .bst files for its bibliography styles. .bst files are an integral part of creating bibliographies with BibTeX. But biblatex uses a different language and different files (.bbx, .cbx) for bibliography and citation styles. So if you are using biblatex editing .bst files is a thing of the past. There is actually one .bst file that belongs to biblatex: biblatex.bst, but you should never have to edit that file and it has no influence on the style of the output. If you recall that the .bst files essentially tell bibtex how to produce the .bbl file, the discussion about the differences between .bbls for biblatex and BibTeX that I explained in an answer to Making the arXiv accept a BibTeX BBL (May 2018) today might be of interest, so I might as well link it here.

You only need

\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}

the \DeclareFieldFormat{volume}{\mkbibbold{#1}} was almost there. But because the standard styles have a type-specific formatting for volume, you need to overwrite the type-specific format using the optional argument - if you don't use the optional argument you only overwrite the generic format. Another possible way to make the volume bold would have been a starred \DeclareFieldFormat{volume}{\mkbibbold{#1}} which would have influenced all types with undesirable consequences.

Uncomment each of the volume lines in the example below to see their effect.

\documentclass[12pt,oneside]{article}
\usepackage[backend=biber, style=numeric, sorting=none, natbib=true, giveninits=true, uniquename=false]{biblatex}

\addbibresource{biblatex-examples.bib}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addnbspace}% NEW (optional)
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}

\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}% <- good, changes only @article and @periodical
%\DeclareFieldFormat{volume}{\mkbibbold{#1}}% <- doubly bad, doesn't help and destroys the format for e.g. @book
%\DeclareFieldFormat*{volume}{\mkbibbold{#1}}% <- bad, destroys the format for e.g. @book

\begin{document}
\citep{sigfridsson,knuth:ct:a}.
\printbibliography
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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