From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: bibliography as part of the source document? Date: Wed, 15 Jun 2016 08:41:13 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDA8I-0007CG-6L for emacs-orgmode@gnu.org; Wed, 15 Jun 2016 08:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDA8D-0000VM-GF for emacs-orgmode@gnu.org; Wed, 15 Jun 2016 08:41:22 -0400 Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]:34901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDA8D-0000VG-Bi for emacs-orgmode@gnu.org; Wed, 15 Jun 2016 08:41:17 -0400 Received: by mail-qk0-x22a.google.com with SMTP id c73so16265246qkg.2 for ; Wed, 15 Jun 2016 05:41:16 -0700 (PDT) In-reply-to: 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: Ken Mankoff Cc: org-mode-email , Sharon Kimble You might checkout the function at the end of this org-ref issue: https://github.com/jkitchin/org-ref/issues/176 It provides a way to extract all bibtex src blocks to a file and is a bit different than using org-babel-tangle. Ken Mankoff writes: > On 2016-06-14 at 21:29, Ken Mankoff wrote: >> I don't know how to tell Org to tangle-on-export with an argument or a >> setting, but it can evaluate code blocks on export, and one of those >> can do the tangling for you. The following might work? >> >> #+begin_src emacs-lisp :exports none >> (org-babel-goto-named-src-block "bibtex") >> (org-babel-tangle) >> #+end_src >> >> #+begin_src bibtex :tangle file.bib >> bib contents go here >> #+end_src > > Oops. Consider the above pseudo-code. The bibtex block must be named, so that (org-babel-goto-NAMED...) can find it. And I'm not sure what "#+begin_src bibtex" actually means to Org. It might have to be a #+BEGIN_EXAMPLE or a "#+BEGIN_SRC ", but tangled to a .Bib file. If running latest Git head, it might also need ":eval no-export" on the bibtex block. Hopefully this is enough to help you solve it. Feel free to post an MWE if you get it working. > > -k. -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu