《工程数学杂志》(Springer)的 BibTeX 样式文件?

《工程数学杂志》(Springer)的 BibTeX 样式文件?

以下是参考书目的示例。它按作者年份排序,但有编号标签、非斜体标题、删除了几个句号,并以卷:页结尾。以下是示例

  1. Gower AL, Destrade M, Ogden R (2013) 声弹性的反直觉结果。Wave Motion 50:1218–1228
  2. Golub GH,Van Loan CF (1996) 矩阵计算。约翰霍普金斯大学出版社,巴尔的摩

第一个是一篇文章,第二个是一本书。如果不了解 bibtex 代码的复杂性,我该如何做到这一点?

答案1

以下是您的操作方法!(无需像我一样受苦)。请注意,我的答案仅涵盖书籍和文章 bibtex 条目。

当你向 springer 提交稿件时,你应该使用他们的 tex class svjour3 found这里,但接下来的内容不需要它。现在下载 biblatex 并创建一个名为 biblatex.cfg 的文件,并将其放在与 .tex 文件相同的文件夹中。每次编译 latex 时都会自动读取此文件。稍后我将展示此文件的内容,但首先是 .tex 文件的最小示例:

\documentclass{article}
\usepackage[citestyle=numeric,bibstyle=authoryear]{biblatex}

\begin{filecontents}{\jobname.bib}
@ARTICLE{liu:11,
  author = {Peter Fox and Richard Rabbit and Franc Bird},
  title = {Animals are the better humans},
  journal = {Horse and Hound},
  year = {2011},
  volume = {10},
  pages = {11--15}
}
@BOOK{bibbook,
title = {How to do all the typographic editing for free. },
publisher = {Open Access, University},
author = {Mathematician, D r},
year = {2012}
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*}

\begin{document}
\printbibliography
\end{document}

现在来看看 biblatex.cfg 中更令人痛苦的内容

% $Id: biblatex.cfg,v 1.7 2011/11/13 19:09:07 lehman stable $

\ProvidesFile{biblatex.cfg}
\RequireBibliographyStyle{standard}
\RequireBibliographyStyle{authoryear}

\ExecuteBibliographyOptions{firstinits=true,terseinits=true, doi=false,url=false, isbn=false,maxbibnames=99}

\usepackage{csquotes}

\DeclareNameAlias{sortname}{last-first}

\DeclareFieldFormat{journaltitle}{#1} %remove comma after title 
\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[article]{volume}{#1\addcolon} %add colon after volume 

\renewcommand*\finentrypunct{} %Remove last full stop
\renewcommand*{\bibpagespunct}{% remove space before pages
\ifentrytype{article}
  {}
  {\addcomma}}

%remove quotation marks from titles  
  \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{citetitle}{#1}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1} 
\DeclareFieldFormat{pages}{#1}% no prefix for the `pages` field in the bibliography

\renewbibmacro{in:}{} %remove in: before journal title
\renewcommand*{\finalnamedelim}{\addcomma\space}
\renewcommand{\labelnamepunct}{\addspace}

\AtEveryBibitem{%
  \clearfield{day}%
  \clearfield{month}%
  \clearfield{endday}%
  \clearfield{endmonth}%
  \clearfield{number}%
}

% Add numeric label in the bibliography without brakets
\DeclareFieldFormat{labelnumberwidth}{#1.}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

% Change order to last name then first name abbreviate without a full stop at the end. This should be at the end!
\renewbibmacro*{name:last-first}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifblank{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
     {\mkbibnameprefix{#3}\isdot}%
       \ifpunctmark{'}{}{\bibnamedelimc}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%\ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}}}% NEW
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%      \ifblank{#2#3}{}{\addcomma}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
     \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}

\endinput

以下是运行 latex bibtex latex latex 的结果:

  1. Fox P, Rabbit R, Bird F (2011) 动物是更好的人类。《马与猎犬》10:11–15
  2. 数学家博士 (2012) 如何免费完成所有印刷编辑。开放获取,大学

这段代码是从几篇帖子拼凑起来的,我记不清所有要感谢的人的名字,所以我要感谢整个社区,你们太棒了!

答案2

根据 moewes 评论进行编辑:

这个答案改进了 Artur Gower 的答案(感谢您投入这项繁琐的工作!),因为它几乎满足了我的所有需求,但例如对 techreports 不起作用。最重要的变化是使用

\DeclareFieldFormat*{fieldname}{#1}

删除各个字段的斜体和引号。星号版本还会覆盖特定条目的 FieldFormats,正如 moewe 指出的那样(谢谢!)

此外,我用较新的变体替换了一些选项,否则乳胶会发出警告。

在我的主要应用中我使用了:

\usepackage[backend=bibtex,sorting=none,citestyle=numeric,bibstyle=authoryear]{biblatex}

这是我的新版本的 biblatex.cfg:

% $Id: biblatex.cfg,v 1.7 2011/11/13 19:09:07 lehman stable $

\ProvidesFile{biblatex.cfg}
\RequireBibliographyStyle{standard}
\RequireBibliographyStyle{authoryear}

\ExecuteBibliographyOptions{giveninits=true,terseinits=true, doi=false,url=false, isbn=false,maxbibnames=99}

\usepackage{csquotes}

\DeclareNameAlias{sortname}{family-given}
\renewcommand*{\revsdnamepunct}{}

\DeclareFieldFormat*{journaltitle}{#1} %remove comma after title 
\DeclareFieldFormat*{volume}{#1\addcolon}
\DeclareFieldFormat*{citetitle}{#1}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat*{pages}{#1}% no prefix for the `pages` field in the bibliography


\renewcommand*\finentrypunct{} %Remove last full stop
\renewcommand*{\bibpagespunct}{% remove space before pages
\ifentrytype{article}
  {}
  {\addcomma}}

%remove quotation marks from titles


\renewbibmacro{in:}{} %remove in: before journal title
\renewcommand*{\finalnamedelim}{\addcomma\space}
\renewcommand{\labelnamepunct}{\addspace}

\AtEveryBibitem{%
  \clearfield{day}%
  \clearfield{month}%
  \clearfield{endday}%
  \clearfield{endmonth}%
  \clearfield{number}%
}

% Add numeric label in the bibliography without brakets
\DeclareFieldFormat{labelnumberwidth}{#1.}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
    \printfield{labelprefix}%
    \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

% Change order to last name then first name abbreviate without a full stop at the end. This should be at the end!
\renewbibmacro*{name:last-first}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifblank{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
     {\mkbibnameprefix{#3}\isdot}%
       \ifpunctmark{'}{}{\bibnamedelimc}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%\ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}}}% NEW
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%      \ifblank{#2#3}{}{\addcomma}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
     \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}

\endinput

相关内容