1

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.

N.N.
  • 8,336
  • 12
  • 54
  • 94
  • 1
    Did you happen to look at http://lists.gnu.org/archive/html/emacs-orgmode/2009-05/msg00236.html ? It would seem to indicate the issue is partly within reftex. I do remember seeing some updates on the ML regarding bibtex/biblatex, export may be improved in 7.8. I haven't had to use LaTeX for documents in a while so can't really test for improvements (I have no bibliography to cite from at the moment) – Jonathan Leech-Pepin Feb 01 '12 at 13:47
  • @JonathanLeech-Pepin I checked that post. It says "I've had to hack at a couple of reftex functions to change the regular expressions that are used to identify citation macros for" but it does not include the hacks. The others parts of the message is not relevant for this particular issue it seems. – N.N. Feb 01 '12 at 21:23
  • @JonathanLeech-Pepin You do not need a bibliography to test this issue. It is enough to include something like `\autocites[11]{someref}[22]{anotherref}` in an empty Org-buffer to get the error for me. If the exporter get past the export phase and tries to compile to LaTeX it will be a success. – N.N. Feb 02 '12 at 07:40

1 Answers1

1

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

Jonathan Leech-Pepin
  • 7,684
  • 2
  • 29
  • 45
  • Indeed, since you got past exportation and it tries to compile it seems to accept `\autocites` in 7.8. Did you try other plural variants too? A full test would try all of the macros in §3.6.3 of [the biblatex manual](http://mirror.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf): `\cites`, `\Cites`, `\parencites`, `\Parencites`, `\footcites`, `\footcitetexts`, `\smartcites`, `\Smartcites`, `\textcites`, `\Textcites`, `\supercites`, `\autocite` and `\Autocites`. All are testable with the same arguments, e.g. `[11]{someref}[22]{anotherref}`. – N.N. Feb 02 '12 at 15:13
  • Good to hear. Thanks for your effort! – N.N. Feb 02 '12 at 15:41