emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
To: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: cite with reftex for html and latex export
Date: Sun, 5 Jan 2014 09:22:30 +0100	[thread overview]
Message-ID: <CAD-VTcH-SvRsuFDnAhxCV0K226SQyoAMKx_TG8Xxd3nXvKG0jg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

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 <file:///home/joseph/Dropbox/org/minimal-paper.html#quine2010mot>],
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.

[-- Attachment #2: Type: text/html, Size: 2195 bytes --]

                 reply	other threads:[~2014-01-05  8:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAD-VTcH-SvRsuFDnAhxCV0K226SQyoAMKx_TG8Xxd3nXvKG0jg@mail.gmail.com \
    --to=joseph.vidal.rosset@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).