biblatex 输出类似 BibTeX 的 unsrt 样式

biblatex 输出类似 BibTeX 的 unsrt 样式

我使用biblatex来为每章提供参考书目。我尝试过chapterbibbibtopic,但前者没有成功,而后者没有对引文进行排序。

该文件如下所示:

\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}

这样,我就可以得到按外观排序的每章参考书目和引用。

但我不喜欢这样的参考文献格式:

[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.

我更喜欢采用经典unsrt书目样式所获得的格式:

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.

我怎样才能改变这一点?

答案1

numeric对样式所需的大部分更改biblatex都很容易 —— 有点棘手的部分(我希望我做对了)是切换页面字段的位置。传统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}

在此处输入图片描述

biblatex仿真:

\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}

在此处输入图片描述

注意:我假设您issue错误地使用了该字段,并且该number字段是正确的字段(对于传统的 BibTeX 和而言biblatex)。

答案2

根据 lockstep 的答案,我制作了以下一段自定义代码以供参考,看起来与 unsrt 样式非常相似。希望这个答案能真正帮助您理解它的工作原理。

首先说一点小意见。根据我的经验,如果您想使用 bibtex 中的默认样式之一,使用“bibtex”既快捷又简单。使用更现代的软件包“biblatex”,这些样式集不易获得,但更容易定制。

下面是我的(注释的) unsrt 类 bibtex 样式代码。此代码可直接用于 .tex 文件,但您可以放入单独的 biblatex.cfg 以将其重复用于多个 .tex 文件。有关更多信息,请参阅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}

相关内容