6

I use biblatex in order to have a bibliography per chapter. I tried chapterbib and bibtopic, but I did not succeed with the former and citations were not sorted with the latter.

This what the document looks like :

\documentclass{book}

\usepackage[refsection=chapter, sorting=none]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@ARTICLE{Kresse1993,
  author = {Kresse, G. and Hafner, J.},
  title = {\textit{Ab initio} molecular dynamics for liquid metals},
  journal = {Phys. Rev. B},
  year = {1993},
  volume = {47},
  pages = {558--561},
  month = {Jan},
  doi = {10.1103/PhysRevB.47.558},
  issue = {1},
  publisher = {American Physical Society},
  url = {http://link.aps.org/doi/10.1103/PhysRevB.47.558}
}

@ARTICLE{Blochl1994,
  author = {Bl\"ochl, P. E.},
  title = {Projector augmented-wave method},
  journal = {Phys. Rev. B},
  year = {1994},
  volume = {50},
  pages = {17953--17979},
  month = {Dec},
  doi = {10.1103/PhysRevB.50.17953},
  issue = {24},
  publisher = {American Physical Society},
  url = {http://link.aps.org/doi/10.1103/PhysRevB.50.17953}
}

@ARTICLE{Dudarev1998,
  author = {Dudarev, S. L. and Botton, G. A. and Savrasov, S. Y. and Humphreys,
    C. J. and Sutton, A. P.},
  title = {Electron-energy-loss spectra and the structural stability of nickel
    oxide: An LSDA+U study},
  journal = {Phys. Rev. B},
  year = {1998},
  volume = {57},
  pages = {1505--1509},
  month = {Jan},
  doi = {10.1103/PhysRevB.57.1505},
  issue = {3},
  publisher = {American Physical Society},
  url = {http://link.aps.org/doi/10.1103/PhysRevB.57.1505}
}

@ARTICLE{Henkelman2006,
  author = {Henkelman, G.a and Arnaldsson, A.b and Jonsson, H.b c},
  title = {A fast and robust algorithm for Bader decomposition of charge density},
  journal = {Computational Materials Science},
  year = {2006},
  volume = {36},
  pages = {354-360},
  number = {3},
  note = {cited By (since 1996) 559}
}

@ARTICLE{Kresse1996,
  author = {G. Kresse and J. Furthmüller},
  title = {Efficiency of ab-initio total energy calculations for metals and
    semiconductors using a plane-wave basis set},
  journal = {Computational Materials Science},
  year = {1996},
  volume = {6},
  pages = {15 - 50},
  number = {1},
  doi = {10.1016/0927-0256(96)00008-0},
  issn = {0927-0256},
  url = {http://www.sciencedirect.com/science/article/pii/0927025696000080}
}

\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\chapter{Chapitre 1}

\nocite{Dudarev1998,Henkelman2006,Blochl1994}

\printbibliography

\chapter{Chapitre 2}

\nocite{Kresse1993,Kresse1996}

\printbibliography

\end{document}

With that, I get per chapter bibliography and citation are sorted by appearance.

But I do not like the format of references which look like :

[1] S. L. Dudarev et al. “Electron-energy-loss spectra and the structural sta-
 bility of nickel oxide: An LSDA+U study”. In: Phys. Rev. B 57 (3 1998),
  pp. 1505–1509. doi: 10.1103/PhysRevB.57.1505. url: http://link.
   aps.org/doi/10.1103/PhysRevB.57.1505.

I would prefer to have the format we obtain with classic unsrt bibliography style :

S. L. Dudarev, G. A. Botton, S. Y. Savrasov, C. J. Humphreys, and A. P.
Sutton. Electron-energy-loss spectra and the structural stability of nickel
oxide: An lsda+u study. Phys. Rev. B, 57:1505–1509, Jan 1998.

How can I change that?

4
  • 2
    Please provide the relevant bib entry so that we can test. – Marco Daniel Jun 1 '12 at 13:57
  • 1
    It sounds like you don't want to change the citation format, but want instead to adjust the biblatex bibliography output only: is that correct? – Joseph Wright Jun 1 '12 at 14:03
  • @JosephWright Without label numbers in the bibliography, the citation style must also be different from the default numeric. – lockstep Jun 1 '12 at 14:20
  • @JosephWright That is, unless the OP simply forgot to add the label. – lockstep Jun 1 '12 at 14:28
8

Most of the needed changes to the numeric style of biblatex are easy -- the somewhat tricky part (I hope I got it right) is switching the location of the pages field. Traditional unsrt:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@ARTICLE{Dudarev1998,
  author = {Dudarev, S. L. and Botton, G. A. and Savrasov, S. Y. and Humphreys,
    C. J. and Sutton, A. P.},
  title = {Electron-energy-loss spectra and the structural stability of nickel
    oxide: An LSDA+U study},
  journal = {Phys. Rev. B},
  year = {1998},
  volume = {57},
  pages = {1505--1509},
  month = {Jan},
  doi = {10.1103/PhysRevB.57.1505},
  number = {3},
  publisher = {American Physical Society},
  url = {http://link.aps.org/doi/10.1103/PhysRevB.57.1505}
}
\end{filecontents}

\begin{document}

\nocite{*}

\bibliographystyle{unsrt}
\bibliography{\jobname}

\end{document}

enter image description here

biblatex emulation:

\documentclass{article}

\usepackage[sorting=none,maxnames=99,firstinits=true,doi=false,url=false]{biblatex}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1}

\renewbibmacro{in:}{%
  \ifentrytype{article}{%
  }{%
    \printtext{\bibstring{in}\intitlepunct}%
  }%
}

\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\renewbibmacro*{volume+number+eid}{%
  \setunit{\addcomma\space}%  
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}%
  \setunit{\addcolon}%
  \printfield{pages}}

\renewbibmacro*{issue+date}{%
  \setunit{\addcomma\space}%
  \iffieldundef{issue}
    {\usebibmacro{date}}
    {\printfield{issue}%
     \setunit*{\addspace}%
     \usebibmacro{date}}%
\newunit}

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \newunit}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@ARTICLE{Dudarev1998,
  author = {Dudarev, S. L. and Botton, G. A. and Savrasov, S. Y. and Humphreys,
    C. J. and Sutton, A. P.},
  title = {Electron-energy-loss spectra and the structural stability of nickel
    oxide: An LSDA+U study},
  journal = {Phys. Rev. B},
  year = {1998},
  volume = {57},
  pages = {1505--1509},
  month = {Jan},
  doi = {10.1103/PhysRevB.57.1505},
  number = {3},
  publisher = {American Physical Society},
  url = {http://link.aps.org/doi/10.1103/PhysRevB.57.1505}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

Note: I assumed that you used the issue field by mistake and that the number field is the correct one (both for traditional BibTeX and biblatex).

1
  • Thanks for the answer. Finally I used chapterbib which is really simplier. – Ger Jun 5 '12 at 8:52
0

Based on the answer of lockstep, I made following piece of customized code for references that looks quite similar to the unsrt style. Hopefully this answer adds to really understanding on how it works.

First a small comment. In my experience usage of 'bibtex' is fast and easy if you want to use one of the default styles from bibtex. Using the more modern package 'biblatex', those set of styles are not (easily) available but it is easier to customize.

Below my (commented) code for an unsrt-like bibtex style. This code can be used directly into the .tex file but you put in a separate biblatex.cfg to reuse it for multiple .tex files . For more info, see https://tex.stackexchange.com/editing-help.

% package for libraries
% settings: do not use ISSN/url/doi, use year as date, do not sort on name, replace first name by innitials, use 'et al' for more than 5 names
\usepackage[isbn=false,date=year,sorting=none,maxnames=5,giveninits=true,doi=false,url=false]{biblatex}

% include a .bib file
\addbibresource{PHD-UGENT.bib}
% omit some stupid fields from bibtex
\AtEveryBibitem{%
  \clearfield{note}%
  \clearfield{eventtitle}%
  \clearfield{journaltitle}%
  \clearlist{publisher}%
}

% omit the fixed 'in' macro used in bibliography
\renewbibmacro{in:}{}

% re-declare field formats (font, brackets ...)
% omit " around title
\DeclareFieldFormat*{title}{#1}
% omit the 'pp' for pages
\DeclareFieldFormat*{pages}{#1}
% put brackets around number
\DeclareFieldFormat*{number}{\mkbibparens{#1}}

% print format <vol><number>:<pages>
\renewbibmacro*{volume+number+eid}{%
  \setunit{\addcomma\space}%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcolon}%
  \printfield{pages}}
% do not print the pages in this part (already done before)
\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \newunit}
1
  • There is also biblatex-trad' style=trad-unsrt, that tries to reproduce the output of the standard BibTeX unsrt style. (Disclaimer: I did not write the original code for that package. It was written by Marco Daniel for tex.stackexchange.com/q/58152/35864. But I am the current maintainer of biblatex-trad.) – moewe Jun 13 at 4:56

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.