使用 biblatex 的复数 cite 宏时 Org-mode 无法导出

发布于 2025-01-01 12:27:49 字数 564 浏览 1 评论 0原文

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

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

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

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

如果将上述示例放置在 Org 缓冲区中并按下 Ce L ,则导出失败并显示上面引用的消息。

如何使 Org 模式识别复数 biblatex 引用宏以便导出成功?

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

When I try to export an Org buffer containing plural biblatex cite macros the export fails and I get the following message:

org-export-latex-preprocess: Wrong type argument: stringp, nil

A plural biblatex macros is macros, such as \autocites, \textcites, that can take multiple argument where each argument in curly braces is a bibliography reference and a concrete example is the following

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

If the above example is placed in an Org-buffer and C-e L is pressed the export fails with the message quoted above.

How can I make Org-mode recognize plural biblatex cite macros so that export is successful?

I am running Org-mode 7.6 in Emacs 23.3.1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

み格子的夏天 2025-01-08 12:27:50

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

* 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 (Cc Ce d)。 LaTeX 导出成功,但无法转换为 pdf(我可能没有为其正确配置序言或包)。我假设如果乳胶正确地出来,应该能够在需要时将其生成 pdf 格式。

Latex 导出(缺少前导码):

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

似乎因此适用于所有情况

I think it may now be working, I just tested the following:

* 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 export succeeded, however I was not able to have it push all the way to pdf (C-c C-e d). The LaTeX export succeded but it could not convert to pdf (I likely don't have my preamble or packages configured properly for it). I'm assuming if the latex comes out properly it should be able to be possible to get it to result in a pdf if required.

Latex export (missing preamble):

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

Assuming this is the output you'd be expecting from that file, I'd guess that the issue has been resolved at some point between 7.6 and 7.8.


Further testing as requested

- 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

becomes

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

It seems it would therefore be working for all cases

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文