在 Emacs Org-mode 中使用 Biblatex \DeclareLabelname

在 Emacs Org-mode 中使用 Biblatex \DeclareLabelname

我有一个名为“film”的自定义 biblatex 条目类型。它有几个自定义字段,特别是“director”字段。

虽然我可以让它作为直接的 LaTeX 文档工作,但我无法让“director”字段在从#+LaTeX_Header:Emacs org-mode 中设置时显示出来。我做错了什么?

这是 LaTeX 版本:

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa, natbib]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{apamovie.bib}

\DeclareLabelname[film]{
  \field{director}
  \field{producer}
  \field{actor}
}

\begin{document}
I've read a book \citep{book}.
I've seen a movie \citep{highlander}.

\printbibliography
\end{document}

这是 Emacs Org-Mode 版本:

#+TITLE: LaTeX Output with Emacs org-mode
#+options: toc:nil
#+latex_header: \usepackage[american]{babel}
#+latex_header: \usepackage{csquotes}
#+latex_header: \usepackage[style=apa, natbib]{biblatex}
#+latex_header: \DeclareLanguageMapping{american}{american-apa}
#+latex_header: \addbibresource{./apamovie.bib}
#+latex_header: \DeclareLabelname[film]{\field{director}}

I've read a book cite:book. I've seen a film cite:highlander.

\printbibliography

文件如下.bib

@Book{book,
  author =       {A. U. Thor},
  title =        {My first book},
  publisher =    {Methuen},
  year =         {1999}
}

@film{highlander,
  title =        {Highlander},                  
  director =     {Mulcahy, Russell},
  year =         {1986},
  publisher =    {Cannon Films},
  type =         {DVD}
}

以下是我在文件中设置新字段和条目类型的方法init.el

;;-- Create custom fields for FILM entry type ----
(add-to-list 'bibtex-biblatex-field-alist
             '(("director" "Director(s) of a film, video or DVD title")
               ("producer" "Producer of the film title")
               ("actor" "Actor in the film title")
               ("distributor" "Distributor of a film title")))

;; Create FILM entry type
(add-to-list 'bibtex-biblatex-entry-alist
             '("Film" "Film, video or DVD"
               ("title" "year" "type")
               nil
               ("director" "address" "distributor")))

(require 'bibtex)
(bibtex-set-dialect 'biblatex)

相关内容