From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Reftex in Org-Mode exporting and recognizing figures or equations Date: Sun, 05 Aug 2012 12:18:41 +0100 Message-ID: <87wr1d37u6.fsf@pank.eu> References: <87a9yc5n85.fsf@pank.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxyvY-0000Kg-Ja for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 07:23:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxyvX-0000ST-C4 for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 07:23:20 -0400 Received: from mailout-eu.gmx.com ([213.165.64.42]:51661) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SxyvX-0000SD-2P for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 07:23:19 -0400 In-Reply-To: (Jeffrey Spencer's message of "Sun, 5 Aug 2012 19:02:53 +1000") 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: jeffspencerd@gmail.com Cc: emacs-orgmode@gnu.org Jeffrey Spencer writes: > When I use your setup and insert a citation then export to latex I get: > [[cite:Paper]] > turns into: > \ref{cite-Paper} You need to add them as link types: See Worg. Here's my setup #+begin_src emacs-lisp ;; add latex:link-type [[latex:textsc][small caps]] (org-add-link-type "latex" nil (lambda (path desc format) (cond ((eq format 'html) (format "%s" path desc)) ((eq format 'latex) (format "\\%s{%s}" path desc))))) (org-add-link-type "citepos" 'ebib (lambda (path desc format) (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "citepos:" desc))) (format "\\posscite{%s}" path) (format "\\posscite[%s]{%s}" desc path) ))))) (org-add-link-type "citep" 'ebib (lambda (path desc format) (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "citep:" desc))) (format "\\citep{%s}" path) (format "\\citep[%s]{%s}" desc path) ))))) (org-add-link-type "citet" 'ebib (lambda (path desc format) (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "citet:" desc))) (format "\\citet{%s}" path) (format "\\citet[%s]{%s}" desc path) ))))) (org-add-link-type "citeauthor" 'ebib (lambda (path desc format) (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "citeauthor:" desc))) (format "\\citeauthor{%s}" path) (format "\\citeauthor[%s]{%s}" desc path) ))))) (org-add-link-type "citeyear" 'ebib (lambda (path desc format) (cond ((eq format 'latex) (if (or (not desc) (equal 0 (search "citeyear:" desc))) (format "\\citeyear{%s}" path) (format "\\citeyear[%s]{%s}" desc path) ))))) (org-add-link-type "cite" 'ebib (lambda (path desc format) (cond ((eq format 'html) (format "(%s)" path)) ((eq format 'latex) (if (or (not desc) (equal 0 (search "cite:" desc))) (format "\\textcite{%s}" path) (format "\\textcite[%s][%s]{%s}" (cadr (split-string desc ";")) (car (split-string desc ";")) path)))))) (org-add-link-type "parencite" 'ebib (lambda (path desc format) (cond ((eq format 'html) (format "(%s)" path)) ((eq format 'latex) (if (or (not desc) (equal 0 (search "parencite:" desc))) (format "\\parencite{%s}" path) (format "\\parencite[%s][%s]{%s}" (cadr (split-string desc ";")) (car (split-string desc ";")) path)))))) #+end_src -- When the facts change, I change my mind. What do you do, sir?