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: Tue, 06 Sep 2016 22:46:57 -0500
User-agent: mu4e 0.9.16; emacs 24.5.1

Nicolas Goaziou writes:

> Hello,
>
> Thibault Marin <address@hidden> writes:
>
>> I would like to use ox-bibtex to export a bibliography to html with
>> multiple bibliography files, as follows:
>>
>> #+BIBLIOGRAPHY: bibtex_1.bib,bibtex_2.bib plain option:-d option:-noabstract 
>> limit:t
>>
>> This works with latex export but not with html (I get a "Executing
>> bibtex2html failed").  It appears that bibtex2html can only process a
>> single file.
>>
>> 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.
>>
>> Does this look like something that could be merged?
>
> Apparently no objection was raised, so I think this can be merged. Some
> minor comments below.
>
>> +        (let ((files (org-split-string file ",")))
>
> I think `split-string' is sufficient here.
>
>> +          (when (< 1 (length files))
>> +            (let ((combined-bib-file
>> +                   (concat
>> +                    (file-name-sans-extension
>> +                     (file-name-nondirectory
>> +                      (buffer-file-name))) "-combined.bib")))
>> +              (with-temp-file combined-bib-file
>> +                (dolist (bib files)
>> +                  (insert-file-contents
>> +                   (if (equal (file-name-extension bib) "bib")
>> +                       bib
>> +                     (concat bib ".bib")
>> +                     )
>> +                   )
>> +                  )
>> +                )
>> +              (setq file combined-bib-file)
>> +              )
>> +            )
>> +          )
>
> There should be no dangling parenthesis in Lisp.
>
> Could you send an updated patch?
>
> Thank you.
>
>
> Regards,

Thanks for the review, here is an updated patch.

Best,

thibault

Attachment: 0001-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]