1
votes

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.

1
Did you happen to look at 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
@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.
@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.

1 Answers

1
votes

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