emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-ref code


From: Andreas Reuleaux
Subject: Re: [O] org-ref code
Date: Mon, 12 May 2014 18:20:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Eric S Fraga <address@hidden> writes:

> Is there some org variable I have not set that tells org to treat cite:
> plain text as a link on export?  Obviously org already recognises it as
> a link but the export doesn't...  org-link-protocols and org-link-types
> look fine.
>

Being just a org-ref beginner, I don't know if there is a more
straightforward solution but, I have configured:


  (org-add-link-type
   "cite"
   'org-ref-cite-onclick-minibuffer-menu
   ;; formatting
   (lambda (keyword desc format)
     (cond
      ((eq format 'html) (format "(<cite>%s</cite>)" path))
      ((eq format 'latex)
       (concat "\\cite{"
               (mapconcat (lambda (key) key) (org-ref-split-and-strip-string 
keyword) ",")
               "}")))))


and similarily for autocite and textcite (the citation types that I am
using), that works for me. Adapted (copied) from the org-add-link-type
for autocite given in the org-ref.org description.  Not sure if this
should just work out of the box (without configuration), but then, it's
not that much code.

-Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]