[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Reftex in Org-Mode exporting and recognizing figures or equation
From: |
Rasmus |
Subject: |
Re: [O] Reftex in Org-Mode exporting and recognizing figures or equations |
Date: |
Fri, 03 Aug 2012 10:38:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Jeffrey Spencer <address@hidden> writes:
> 1) I was wondering if anyone has got the reftex feature of easily
> recognizing the figures and equations to insert as a ref command to work in
> org-mode.
I haven't gotten this to work. It's doable, but requires some work.
For now I'd be happy if I could replace the \ref
> 2) Also I had seen on a website that you can use the command to get
> org-mode type citations. This seems to export to latex as a \ref command
> with citep in the middle (eg. \ref{citep}).
> (reftex-set-cite-format
> "[[citep][%l]]")
> This doesn't seem to work for me but maybe I'm doing something wrong.
Here's my setup which works decently:
#+begin_src emacs-lisp
(defun org-mode-reftex-setup ()
(load-library "reftex")
(and (buffer-file-name)
(file-exists-p (buffer-file-name))
(reftex-parse-all))
(make-local-variable 'reftex-cite-format)
(setq reftex-cite-format 'org)
(define-key org-mode-map (kbd "C-c )") 'reftex-citation))
(add-hook 'org-mode-hook 'org-mode-reftex-setup)
(eval-after-load 'reftex-vars
'(progn
(add-to-list 'reftex-cite-format-builtin
'(org "Org-mode citation"
((?\C-m . "[[cite:%l]]")
(?t . "[[textcite:%l]]")
(?p . "[[parencite:%l]]")
(?s . "[[posscite:%l]]")
(?a . "[[citeauthor:%l]]")
(?y . "[[citeyear:%l]]"))))))
#+end_src
I add nodes manually with C-l after inserting, if needed.
–Rasmus
--
⠠⠵