From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pedro Silva Subject: Re: Latex export postamble Date: Sun, 15 Apr 2012 00:40:16 +0100 Message-ID: <877gxh287z.fsf@pedrosilva.pt> References: <871unr3jyk.fsf@pedrosilva.pt> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJCa3-0000g3-AA for emacs-orgmode@gnu.org; Sat, 14 Apr 2012 19:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJCa1-0002Ds-GN for emacs-orgmode@gnu.org; Sat, 14 Apr 2012 19:40:34 -0400 Received: from li274-209.members.linode.com ([178.79.155.209]:56404 helo=pedrosilva.pt) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJCa1-0002CC-6x for emacs-orgmode@gnu.org; Sat, 14 Apr 2012 19:40:33 -0400 Received: from 197.28.166.178.rev.vodafone.pt ([178.166.28.197] helo=t61-arch) by pedrosilva.pt with esmtpsa (UNKNOWN:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1SJCZs-00051j-4V for emacs-orgmode@gnu.org; Sat, 14 Apr 2012 19:40:25 -0400 In-Reply-To: <871unr3jyk.fsf@pedrosilva.pt> (Pedro Silva's message of "Fri, 13 Apr 2012 13:16:51 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Pedro Silva writes: > Is it possible to insert text just before \end{document} on export, > similarly to org-export-html-postamble? > > I'd like to do this on a capture target file that contains the following > at the end: > > \bibliography{references} > > New capture entries keep getting inserted below it, which makes the > references section appear in the middle of the document if I forget to > move it to the end again. > > Or maybe there is another way to make this work? Looking at the relevant code in contrib/org-exp-bibtex.el, I managed to produce the following, which *almost* works: (defun org-export-bibliography-preprocess () "Insert \bibliography and \bibliographystyle commands at end of buffer if keyword `#+BIBLIOGRAPHY