From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: org-ref code Date: Mon, 12 May 2014 22:37:05 -0400 Message-ID: References: <878uql7r7p.fsf@ucl.ac.uk> <87eh0d62ys.fsf@ucl.ac.uk> <87lhu9ofqa.fsf@ucl.ac.uk> <87iopbv2j9.fsf@a-rx.info> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0122999086060904f93ef087 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk2aa-00051V-VV for emacs-orgmode@gnu.org; Mon, 12 May 2014 22:37:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wk2aZ-0004ay-8s for emacs-orgmode@gnu.org; Mon, 12 May 2014 22:37:08 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:48392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk2aY-0004ar-UN for emacs-orgmode@gnu.org; Mon, 12 May 2014 22:37:07 -0400 Received: by mail-wg0-f47.google.com with SMTP id x12so7762959wgg.30 for ; Mon, 12 May 2014 19:37:05 -0700 (PDT) In-Reply-To: <87iopbv2j9.fsf@a-rx.info> 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: Andreas Reuleaux Cc: "emacs-orgmode@gnu.org" --089e0122999086060904f93ef087 Content-Type: text/plain; charset=UTF-8 Here is a way you can add new citation formats to the reftex format: ;; get builtin formats (setq formats (nth 2 (assoc 'org reftex-cite-format-builtin))) ;; add new format (setf (nth 2 (assoc 'org reftex-cite-format-builtin)) (append formats '((?W . "textcite:%l") (?z . "newcite:%l")))) This does not define the links, but it does add the formats to the reftex menu. I have figured out how to add new citation links without alot of cut and pasted code. I do not use biblatex much though. What are the common citation formats, and are they mostly written as \citation{label}? John ----------------------------------- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Mon, May 12, 2014 at 4:12 AM, Andreas Reuleaux wrote: > John Kitchin writes: > > > > C-c ] should be bound by default to org-ref-insert-cite-link. It is > defined > > in a hook function in line 104 of org-ref.org. > > > > I made a custom variable to store the key-binding, but I realized it > > probably doesn't help, since the binding > > > > > >> > >> 1. C-u on it does not give me a choice of citation method > >> > > > > If you type C-u M-x org-ref-insert-cite-link > > > > do you get a choice? > > > > I just tried this on a fresh pull and it does work for me. I am not sure > > why this wouldn't work for you. Do you tangle the .el file from the .org > > file? I have this code somewhere else to build it when needed: > > > I can confirm that C-c ] and C-u C-c ] > work fine for me. > > my setup if fairly simple (with org-ref.el tangled from org-ref.org) > > (require 'org-ref) > > (custom-set-variables > '(org-ref-bibliography-notes "notes.org") > '(org-ref-default-bibliography (list "refs.bib")) > ;; '(org-ref-pdf-directory "...") > ;; '(org-ref-default-citation-link "...") > ;; '(org-ref-insert-cite-key "...") > ) > > looking forward to discover more of org-ref. > > FWIW, I was using textcite:... (with biblatex) as well, helped myself by > just inserting a cite:... and then changing the link with C-c C-l from > cite to textcite. But I really need read up on all those different > citations commands once more, maybe textcite is not really necessary? > Could I add it somehow to the list of choices available in "C-u C-c ]" ? > (I realized there are citetext, citep*, citep as well, that I yet have > to discover). > > By the way: the org-ref.org literate programming docs are fine > for someone interested in the gory details / relatively experienced. > Ist there a simpler document just describing its usage - that > you would hand out to your chemistry students e. g. ? > > Somehting maybe explaining the differences from the other approaches > that can be found e g in > > > http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/ > > > http://www-public.it-sudparis.eu/~berger_o/weblog/2012/03/23/how-to-manage-and-export-bibliographic-notesrefs-in-org-mode/ > > Thanks for org-ref. > > -Andreas > > > --089e0122999086060904f93ef087 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here is a way you can add new citation formats t= o the reftex format:

;; get builtin formats
(setq formats (nth 2 = (assoc 'org reftex-cite-format-builtin)))

;; add new format
(setf (nth 2 (assoc 'org reftex-cite-format-builtin))
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (append formats '((?W=C2=A0 . "textcite:%l"= ;)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (?z=C2=A0 . = "newcite:%l"))))

This does not define the links, but= it does add the formats to the reftex menu.

I have figured out how to add new citation links without alot of = cut and pasted code. I do not use biblatex much though. What are the common= citation formats, and are they mostly written as \citation{label}?

John

-------= ----------------------------
John Kitchin
Associate Professor
Dohe= rty Hall A207F
Department of Chemical Engineering
Carnegie Mellon Uni= versity
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

<= /div>

On Mon, May 12, 2014 at 4:12 AM, Andreas= Reuleaux <andreas@a-rx.info> wrote:
John Kitchin <jkitchin@andrew.cmu.edu> writes:


> C-c ] should be bound by default to org-ref-insert-cite-link. It is de= fined
> in a hook function in line 104 of org-ref.org.
>
> I made a custom variable to store the key-binding, but I realized it > probably doesn't help, since the binding
>
>
>>
>> 1. C-u on it does not give me a choice of citation method
>>
>
> If you type C-u M-x =C2=A0org-ref-insert-cite-link
>
> do you get a choice?
>
> I just tried this on a fresh pull and it does work for me. I am not su= re
> why this wouldn't work for you. =C2=A0Do you tangle the .el file f= rom the .org
> file? I have this code somewhere else to build it when needed:


I can confirm that C-c ] and C-u C-c ]
work fine for me.

my setup if fairly simple (with org-ref.el tangled from org-ref.org)

=C2=A0 (require 'org-ref)

=C2=A0 (custom-set-variables
=C2=A0 =C2=A0'(org-ref-bibliography-notes "notes.org")
=C2=A0 =C2=A0'(org-ref-default-bibliography =C2=A0(list "refs.bib&= quot;))
=C2=A0 =C2=A0;; '(org-ref-pdf-directory "...")
=C2=A0 =C2=A0;; '(org-ref-default-citation-link "...")
=C2=A0 =C2=A0;; '(org-ref-insert-cite-key "...")
=C2=A0 =C2=A0)

looking forward to discover more of org-ref.

FWIW, I was using textcite:... (with biblatex) as well, helped myself by just inserting a cite:... and then changing the link with C-c C-l from
cite to textcite. But I really need read up on all those different
citations commands once more, maybe textcite is not really necessary?
Could I add it somehow to the list of choices available in "C-u C-c ]&= quot; ?
(I realized there are citetext, citep*, citep as well, that I yet have
to discover).

By the way: the org-ref.or= g literate programming docs are fine
for someone interested in the gory details / relatively experienced.
Ist there a simpler document just describing its usage - that
you would hand out to your chemistry students e. g. ?

Somehting maybe explaining the differences from the other approaches
that can be found e g in

=C2=A0 http://tincman.= wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-= reftex/

=C2=A0 http://www-public.it-sudparis.eu/~berger_o/weblog/2012/03/23/ho= w-to-manage-and-export-bibliographic-notesrefs-in-org-mode/

Thanks for org-ref.

-Andreas



--089e0122999086060904f93ef087--