From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Reuleaux Subject: Re: org-ref code Date: Mon, 12 May 2014 18:20:04 +0100 Message-ID: <87zjimnccb.fsf@a-rx.info> References: <878uql7r7p.fsf@ucl.ac.uk> <87eh0d62ys.fsf@ucl.ac.uk> <87lhu9ofqa.fsf@ucl.ac.uk> <871tvzm859.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjtvU-000446-2y for emacs-orgmode@gnu.org; Mon, 12 May 2014 13:22:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjtvO-0004kR-AJ for emacs-orgmode@gnu.org; Mon, 12 May 2014 13:22:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:40610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjtvO-0004kM-4i for emacs-orgmode@gnu.org; Mon, 12 May 2014 13:22:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WjtvK-0004xV-5u for emacs-orgmode@gnu.org; Mon, 12 May 2014 19:21:58 +0200 Received: from stu826b.kent.ac.uk ([129.12.130.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 May 2014 19:21:58 +0200 Received: from andreas by stu826b.kent.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 May 2014 19:21:58 +0200 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: emacs-orgmode@gnu.org Eric S Fraga 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 "(%s)" 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