From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: cite with reftex for html and latex export Date: Sun, 5 Jan 2014 09:22:30 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bfcfc8256dca804ef34d9e2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vziyz-0006EQ-5d for emacs-orgmode@gnu.org; Sun, 05 Jan 2014 03:22:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vziyx-0001Cr-OU for emacs-orgmode@gnu.org; Sun, 05 Jan 2014 03:22:53 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:44748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vziyx-0001Cj-HA for emacs-orgmode@gnu.org; Sun, 05 Jan 2014 03:22:51 -0500 Received: by mail-we0-f171.google.com with SMTP id q58so14898416wes.16 for ; Sun, 05 Jan 2014 00:22:50 -0800 (PST) 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 list --047d7bfcfc8256dca804ef34d9e2 Content-Type: text/plain; charset=UTF-8 Hello, I believe that this post is not without link with the thread "HTML Export doesn't handle internal link with post. In order to obtain via reftex a code which produces links to reference in "plain" style, I have put in my init.el file the following code: (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 '((?b . "[cite:%l ]") ) ) ) ) (define-key org-mode-map (kbd "C-c )") 'reftex-citation) (define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search) ) (add-hook 'org-mode-hook 'org-mode-reftex-setup) The space between %l and ] allows me to write the page of reference. The result is for example : Quine [[3 ], p. 10] Of course, it would be better to obtain: [3, p. 10], but I do not succed to find the good solution. If someone can help me... Best wishes, Jo. --047d7bfcfc8256dca804ef34d9e2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,=C2=A0

I believe that =C2=A0this = post is not without link with the thread "HTML Export doesn't hand= le internal link with post.

In order to obtain via= reftex a code which produces links to reference in "plain" style= , I have put in my init.el file the following code:=C2=A0

(defun org-mode-reftex-setup ()
=C2=A0 (load-= library "reftex")
=C2=A0 (and (buffer-file-name) (file-= exists-p (buffer-file-name))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(progn
;enable auto-re= vert-mode to update reftex when bibtex file changes on disk
(global-auto-rever= t-mode t)
(re= ftex-parse-all)
;add a custom reftex cite format to insert links
(reftex-set-cite-f= ormat
=C2=A0&= #39;((?b . "[cite:%l ]")
=C2=A0 =C2=A0)
=C2=A0)
= )
=C2=A0 =C2= =A0 =C2=A0 =C2=A0)
=C2=A0 (define-key org-mode-map (kbd "C-c= )") 'reftex-citation)
=C2=A0 (define-key org-mode-map (kbd "C-c (") 'org-mode-= reftex-search)
=C2=A0 )

(add-hook 'o= rg-mode-hook 'org-mode-reftex-setup)=C2=A0

The= space between %l and ] allows me to write the page of reference.

The result is for example :

Qu= ine [[3], p. 10] =C2=A0

Of course, it would be better to= obtain: [3, p. 10], but I do not succed to find the good solution.=C2=A0

If someone can help me...=C2=A0

Best wishes,

Jo.=C2=A0

--047d7bfcfc8256dca804ef34d9e2--