emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Ken Mankoff <mankoff@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>,
	Sharon Kimble <boudiccas@skimble.plus.com>
Subject: Re: bibliography as part of the source document?
Date: Wed, 15 Jun 2016 08:41:13 -0400	[thread overview]
Message-ID: <m2lh2662vq.fsf@Johns-MacBook-Air.local> (raw)
In-Reply-To: <m2twguljua.fsf@x-128-101-83-174.eduroam.wireless.umn.edu>

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 <mankoff@gmail.com> 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 <some_known_language>", 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

      reply	other threads:[~2016-06-15 12:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13 18:07 bibliography as part of the source document? Sharon Kimble
2016-06-13 18:11 ` Ken Mankoff
2016-06-13 18:28   ` Sharon Kimble
2016-06-15  2:29     ` Ken Mankoff
2016-06-15 12:25       ` Ken Mankoff
2016-06-15 12:41         ` John Kitchin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2lh2662vq.fsf@Johns-MacBook-Air.local \
    --to=jkitchin@andrew.cmu.edu \
    --cc=boudiccas@skimble.plus.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).