emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Multiple bibliography files with ox-bibtex and html export


From: Thibault Marin
Subject: Re: [O] Multiple bibliography files with ox-bibtex and html export
Date: Thu, 08 Sep 2016 22:55:06 -0500
User-agent: mu4e 0.9.16; emacs 24.5.1

Clément Pit--Claudel writes:

> On 2016-09-06 23:46, Thibault Marin wrote:
>>>> I am attaching a patch which allows me to use multiple files with html
>>>> export.  It creates a combined bibliography file and call bibtex2html on
>>>> it.  I am not sure this is the best way to address this, so any
>>>> suggestion would be welcome.
>
> Sorry for the late comment.  bibtex2html can read from standard input; maybe 
> that would be cleaner?
>
> Clément.

That may be a good idea, it would prevent potential name clashing with
the created bib file.  Currently, the function creates a
<name-of-org-file>-combined.bib file with the content of all
bibliography files, then bibtex2html creates
<name-of-org-file>-combined.html and
<name-of-org-file>-combined_bib.html.  Passing the contents via stdin
would skip the <name-of-org-file>-combined.bib.  We could achieve the
same by simply deleting <name-of-org-file>-combined.bib after calling
bibtex2html.  I personally don't mind leaving the .bib file after
processing, but if there is a consensus to limit the side effect, we can
do that.

As far as the implementation goes, I am not sure what is the best way to
get this to work with stdin.  In the attached patch (which does *not*
work) I tried to use `call-process-region' and dump the bibliography
files into a temporary buffer.  This complicates the code a little.
Alternatively, we could use the `INFILE' parameter from `call-process',
but it looks that this would require a file, so it would not change much
from the previous patch.

Any thoughts?

Attachment: 0002-contrib-lisp-ox-bibtex.el-org-bibtex-process-bib-fil.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]