From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: using vref in latex export, and normal links in html export Date: Sat, 12 Mar 2016 16:36:27 -0500 Message-ID: References: <8737rxwa2i.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aerD8-000137-EQ for emacs-orgmode@gnu.org; Sat, 12 Mar 2016 16:36:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aerD3-0002Oc-MT for emacs-orgmode@gnu.org; Sat, 12 Mar 2016 16:36:34 -0500 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:36073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aerD3-0002OY-Hj for emacs-orgmode@gnu.org; Sat, 12 Mar 2016 16:36:29 -0500 Received: by mail-qg0-x22c.google.com with SMTP id u110so125877122qge.3 for ; Sat, 12 Mar 2016 13:36:29 -0800 (PST) In-reply-to: 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: Alan Schmitt Cc: emacs-orgmode I guess these are defined in backends, e.g. org-latex-link. Alan Schmitt writes: > On 2016-03-11 16:05, Alan Schmitt writes: > >> On 2016-03-11 15:02, John Kitchin writes: >> >>> Try: >>> >>> (setq org-latex-prefer-user-labels t) >>> >>> I think this does what you want for org 8.3.4 at least. >> >> Thank you! This is what I was missing. > > As a followup question, I read the documentation for `org-add-link-type` > which says "Org mode has a built-in default for exporting links." What > is the name of that function? I would like to change Eric's function to > something like: > > #+begin_src elisp > (org-add-link-type "vref" nil > (lambda (path desc format) > (cond > ((eq format 'latex) > (format "\\vref{%s}" path)) > (t (call org default))))) > #+end_src > > I searched through ox.el but could not find that function. > > Thanks, > > Alan -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu