emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Reftex in Org-Mode exporting and recognizing figures or equations
Date: Fri, 03 Aug 2012 10:38:50 +0100	[thread overview]
Message-ID: <87a9yc5n85.fsf@pank.lan> (raw)
In-Reply-To: CALmFPZ2RJB1s24KasgbKivvD7euTqaHSGMJj7ObCgnx1jCNmBg@mail.gmail.com


Jeffrey Spencer <jeffspencerd@gmail.com> 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

-- 
⠠⠵

  parent reply	other threads:[~2012-08-03  9:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03  3:39 Reftex in Org-Mode exporting and recognizing figures or equations Jeffrey Spencer
2012-08-03  6:20 ` Thomas S. Dye
2012-08-03  9:38 ` Rasmus [this message]
2012-08-05  9:02   ` Jeffrey Spencer
2012-08-05 11:18     ` Rasmus

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=87a9yc5n85.fsf@pank.lan \
    --to=rasmus@gmx.us \
    --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).