【问题标题】:Org-mode fails to export when the plural cite macros of biblatex are used使用 biblatex 的复数引用宏时,org-mode 无法导出
【发布时间】:2012-02-24 01:45:08
【问题描述】:

当我尝试导出包含复数 biblatex 引用宏的 Org 缓冲区时,导出失败并收到以下消息:

org-export-latex-preprocess:错误的类型参数:stringp,nil

复数 biblatex 宏是可以接受多个参数的宏,例如 \autocites\textcites,其中花括号中的每个参数都是参考书目,具体示例如下

\autocites[11]{someref}[22]{anotherref}

如果将上面的示例放在 Org-buffer 中并按下 C-e L,则导出失败并显示上面引用的消息。

如何让 Org-mode 识别复数 biblatex cite 宏以便导出成功?

我在 Emacs 23.3.1 中运行 Org-mode 7.6。

【问题讨论】:

  • 你有没有碰巧看到lists.gnu.org/archive/html/emacs-orgmode/2009-05/msg00236.html?这似乎表明问题部分在 reftex 中。我记得在 ML 上看到一些关于 bibtex/biblatex 的更新,导出可能会在 7.8 中得到改进。我有一段时间不用在文档中使用 LaTeX,所以无法真正测试改进(我目前没有参考书目)
  • @JonathanLeech-Pepin 我检查了那个帖子。它说“我不得不破解几个 reftex 函数来更改用于识别引用宏的正则表达式”,但它不包括这些破解。消息的其他部分似乎与此特定问题无关。
  • @JonathanLeech-Pepin 您不需要参考书目来测试这个问题。在空的 Org-buffer 中包含类似 \autocites[11]{someref}[22]{anotherref} 的内容就足以为我获取错误。如果导出器通过了导出阶段并尝试编译为 LaTeX,它将是成功的。

标签: emacs latex org-mode biblatex


【解决方案1】:

我认为它现在可能正在工作,我刚刚测试了以下内容:

* test
  - Inline LaTeX \autocites[11]{someref}[22]{anotherref}
  - Latex single line block
    #+latex: \autocites[11]{someref}[22]{anotherref}
  - Latex code block
    #+begin_latex
      \autocites[11]{someref}[22]{anotherref}
    #+end_latex

LaTeX 导出成功,但是我无法将它一直推送到 pdf (C-c C-e d)。 LaTeX 导出成功,但无法转换为 pdf(我可能没有为它正确配置序言或软件包)。我假设如果乳胶正确出来,它应该能够在需要时将其生成 pdf。

乳胶导出(缺少序言):

\section{test}
\label{sec-1}

\begin{itemize}
\item Inline \LaTeX{} \autocites[11]{someref}[22]\{anotherref\}
\item Latex single line block
  \autocites[11]{someref}[22]{anotherref}
\item Latex code block
    \autocites[11]{someref}[22]{anotherref}
\end{itemize}

假设这是您期望从该文件获得的输出,我猜这个问题在 7.6 和 7.8 之间的某个时间点已经解决。


根据要求进一步测试

- Latex code block
  #+begin_latex
    \cites[11]{someref}[22]{anotherref}
    \Cites[11]{someref}[22]{anotherref}
    \parencites[11]{someref}[22]{anotherref}
    \Parencites[11]{someref}[22]{anotherref}
    \footcites[11]{someref}[22]{anotherref}
    \footcitetexts[11]{someref}[22]{anotherref}
    \smartcites[11]{someref}[22]{anotherref}
    \Smartcites[11]{someref}[22]{anotherref}
    \textcites[11]{someref}[22]{anotherref}
    \Textcites[11]{someref}[22]{anotherref}
    \supercites[11]{someref}[22]{anotherref}
    \autocite[11]{someref}[22]{anotherref}
    \Autocites[11]{someref}[22]{anotherref}
  #+end_latex

变成

\item Latex code block
    \cites[11]{someref}[22]{anotherref}
    \Cites[11]{someref}[22]{anotherref}
    \parencites[11]{someref}[22]{anotherref}
    \Parencites[11]{someref}[22]{anotherref}
    \footcites[11]{someref}[22]{anotherref}
    \footcitetexts[11]{someref}[22]{anotherref}
    \smartcites[11]{someref}[22]{anotherref}
    \Smartcites[11]{someref}[22]{anotherref}
    \textcites[11]{someref}[22]{anotherref}
    \Textcites[11]{someref}[22]{anotherref}
    \supercites[11]{someref}[22]{anotherref}
    \autocite[11]{someref}[22]{anotherref}
    \Autocites[11]{someref}[22]{anotherref}

因此它似乎适用于所有情况

【讨论】:

  • 确实,因为你已经通过了导出并且它试图编译它似乎在 7.8 中接受\autocites。您是否也尝试过其他复数变体?完整的测试将尝试the biblatex manual 的§3.6.3 中的所有宏:\cites\Cites\parencites\Parencites\footcites\footcitetexts\smartcites\Smartcites\textcites\Textcites\supercites\autocite\Autocites。所有都可以用相同的参数进行测试,例如[11]{someref}[22]{anotherref}.
  • 很高兴听到。感谢您的努力!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-26
相关资源
最近更新 更多