分类
LaTeX

Biblatex参考文献(biber引擎)用法举例

虽然BibLaTeX作为新的参考文献引擎有很多优点, 但是其上手稍显困难,特别是对于使用bibtex的用户更是如此。这里分享一下最简单的模板:



\hypersetup{
  pdfstartview=FitH,
  bookmarksopen=false,
  pdfencoding=auto,
  colorlinks=true,
  linkcolor=blue,
  pdfinfo={
    Title={your title},
    Subject={},
    Author={Your name},
    Keywords={your keywords}%
  }
}


\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
\end{filecontents}
\addbibresource{\jobname.bib}

Some text \autocite{A01,B02}.
\printbibliography

其实说起来也简单, 就是几点要注意:

  • 首先是引用宏包biblatex此时我们指定的引擎是biber, 这对后面的配置造成一定的困难。 如果你嫌麻烦, 可以改为老引擎bibtex. biber 的好处是支持utf8, 或许还有其他的好处, 具体见biblatex文档.
  • 其次是需要在preamble指定参考文献数据库\addbibresource{\jobname.bib}, 这里用了filecontents宏包整合到一个文件
  • 最后在指定位置输出参考文献\printbibliography
  • 此时注意编译的顺序是(参考这里):pdflatex+biber+pdflatex, 当然pdflatex可以换成任何tex引擎

接下来我们来具体配置WinEdt, 方便编译:

  1. 参考这里下载并安装WinEdt宏包LaTeXify, 具体安装可以参考里面的readme. 更多编辑器的配置可以参考这篇 post.
  2. 安装好后你会发现多了一个B+按钮,这个就是biber编译按钮来. 此外还增加了PDFLaTeXfy等一键编译方式
  3. 安装好后可以使用 如果提示版本不对, 建议升级Miktex及其宏包即可,可以参考这里
  4. 关于宏包biblatex的更多选项可以参考上面给出的宏包文档, 特别backref=true表示反向引用, 即在每条参考文献后面列出对应引用的页码. firstinits=true表示缩写作者名, style=alphabetic表示文献条目以字母方式显示, 默认是数字;natbib=true表示兼容 natbib, 这主要是考虑到可能用到各种引用方式, 请参考宏包文档的3.7.9;url=falsedoi=false不显示url和doi字段; eprint=true对arxiv上面的文章引用特别有用. 可以参考这里的说明, 以及下面完整的例子:
    
    
    \hypersetup{
      pdfstartview=FitH,
      bookmarksopen=false,
      pdfencoding=auto,
      colorlinks=true,
      linkcolor=blue,
      pdfinfo={
        Title={your title},
        Subject={},
        Author={Your name},
        Keywords={your keywords}%
      }
    }
    
    
    \begin{filecontents}{\jobname.bib}
    @misc{A01,
      author = {Author, A.},
      year = {2001},
      title = {Alpha},
    }
    @misc{B02,
      author = {Buthor, B.},
      year = {2002},
      title = {Bravo},
    }
    @Article{baez/article,
      author      = {Baez, John C. and Lauda, Aaron D.},
      title       = {Higher-Dimensional Algebra V: 2-Groups},
      journaltitle= {Theory and Applications of Categories},
      volume      = {12},
      version     = {3},
      date        = {2004},
      pages       = {423--491},
      urldate     = {2006-10-01},
      eprinttype  = {arxiv},
      eprint      = {math/0307200v3}
    }
    @Online{baez/online,
      hyphenation = {american},
      author      = {Baez, John C. and Lauda, Aaron D.},
      title       = {Higher-Dimensional Algebra V: 2-Groups},
      version     = {3},
      date        = {2004-10-27},
      eprinttype  = {arxiv},
      eprint      = {math/0307200v3}
    }
    @Online{wassenberg,
      hyphenation = {american},
      author      = {Wassenberg, Jan and Sanders, Peter},
      title       = {Faster Radix Sort via Virtual Memory and Write-Combining},
      version     = {1},
      date        = {2010-08-17},
      eprinttype  = {arxiv},
      eprintclass = {cs.DS},
      eprint      = {1008.2849v1}
    }
    \end{filecontents}
    \addbibresource{\jobname.bib}
    
    Some text \autocite{A01,B02}.
    \printbibliography
     
    
参考文献

    “Biblatex参考文献(biber引擎)用法举例”上的一条回复

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用*标注

    此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据