From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: current status of citation syntax discussion Date: Tue, 18 Aug 2015 16:38:13 +0200 Message-ID: References: <87bngfa0un.fsf@gmx.us> <87bngf9yf3.fsf@selenimh.access.network> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c06bef2558d6d051d96dfb2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRi26-0007lo-VO for emacs-orgmode@gnu.org; Tue, 18 Aug 2015 10:38:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRi25-0002XY-S0 for emacs-orgmode@gnu.org; Tue, 18 Aug 2015 10:38:34 -0400 Received: from mail-yk0-x22d.google.com ([2607:f8b0:4002:c07::22d]:33423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRi25-0002Wt-N0 for emacs-orgmode@gnu.org; Tue, 18 Aug 2015 10:38:33 -0400 Received: by ykll84 with SMTP id l84so96560137ykl.0 for ; Tue, 18 Aug 2015 07:38:32 -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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Price , Rasmus , Org Mode Cc: eschulte@cs.unm.edu --94eb2c06bef2558d6d051d96dfb2 Content-Type: text/plain; charset=UTF-8 2015-08-18 9:53 GMT+02:00 Joseph Vidal-Rosset : > Thanks to Eric's example (here : > https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01262.html ) > I have succeeded to use ox-bibtex.el. \cite{} in the org file works both > for html and latex. > > Nevertheless, I wonder how to get for org-file the org citation syntax > [[cite: ]] instead of \cite{} when I choose a reference from my > references.bib file . Is it possible to change this point in order to get > the same org file than in Eric's example ? I just finded a solution here : https://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/ and here is the adaptation of the code in my init.el : (defun org-mode-reftex-setup () (load-library "reftex") (and (buffer-file-name) (file-exists-p (buffer-file-name)) (progn ;enable auto-revert-mode to update reftex when bibtex file changes on disk (global-auto-revert-mode t) (reftex-parse-all) ;add a custom reftex cite format to insert links (reftex-set-cite-format '((?c . "[[cite:%l]]"))))) (define-key org-mode-map (kbd "C-c ]") 'reftex-citation)) (add-hook 'org-mode-hook 'org-mode-reftex-setup) with # \bibliography{reforg} at the beginning of my .org file, referring to my .bib file, it works. Best wishes, Jo. --94eb2c06bef2558d6d051d96dfb2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= 2015-08-18 9:53 GMT+02:00 Joseph Vidal-Rosset <joseph.vidal.ro= sset@gmail.com>:
Tha= nks to Eric's example (here : https://lists.g= nu.org/archive/html/emacs-orgmode/2014-01/msg01262.html ) I have succee= ded to use ox-bibtex.el. \cite{} in the org file works both for html and la= tex.

Nevertheless, I wonder how to get for org-file the org c= itation syntax [[cite: ]] instead of \cite{} when I choose a reference from= my references.bib file . Is it possible to change this point in order to g= et the same org file than in Eric's example ?

and here is the adaptation of the code in my init.el :
(defun org-mode-reftex-setup ()
=C2=A0 (load-library "reftex&q= uot;)
=C2=A0 (and (buffer-file-name) (file-exists-p (buffer-file-name))<= br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (progn
=C2=A0=C2=A0=C2=A0 =C2=A0= ;enable auto-revert-mode to update reftex when bibtex file changes on disk<= br>=C2=A0=C2=A0=C2=A0 =C2=A0(global-auto-revert-mode t)
=C2=A0=C2=A0=C2= =A0 =C2=A0(reftex-parse-all)
=C2=A0=C2=A0=C2=A0 =C2=A0;add a custom reft= ex cite format to insert links
=C2=A0=C2=A0=C2=A0 =C2=A0(reftex-set-cite= -format
=C2=A0=C2=A0=C2=A0 =C2=A0 '((?c . "[[cite:%l]]")))= ))
=C2=A0 (define-key org-mode-map (kbd "C-c ]") 'reftex-c= itation))

(add-hook 'org-mode-hook 'org-mode-reftex-setup)
with # \bibliography{reforg} at the = beginning of my .org file, referring to my .bib file, it works.

Best wishes,

Jo.


--94eb2c06bef2558d6d051d96dfb2--