From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Multiple bibliography files with ox-bibtex and html export Date: Tue, 06 Sep 2016 11:09:30 +0200 Message-ID: <87vay9v1h1.fsf@saiph.selenimh> References: <87k2f6x0q6.fsf@dell-desktop.WORKGROUP> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhCNu-0002IZ-Sq for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 05:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhCNp-0001Ux-Nx for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 05:09:37 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:54654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhCNp-0001Ui-GP for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 05:09:33 -0400 In-Reply-To: <87k2f6x0q6.fsf@dell-desktop.WORKGROUP> (Thibault Marin's message of "Tue, 23 Aug 2016 23:14:09 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Thibault Marin Cc: emacs-orgmode Hello, Thibault Marin 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