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: Nicolas Goaziou
Subject: Re: [O] Multiple bibliography files with ox-bibtex and html export
Date: Tue, 06 Sep 2016 11:09:30 +0200

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,

-- 
Nicolas Goaziou



reply via email to

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