Re: [O] using vref in latex export, and normal links in html export

2016-03-14 Thread Alan Schmitt
On 2016-03-12 22:36, John Kitchin writes: > I guess these are defined in backends, e.g. org-latex-link. Ah, yes, thanks a lot. Unfortunately this approach does not work because org-add-link-type uses a function whose argument do not contain enough information to call the backend functions (for i

Re: [O] using vref in latex export, and normal links in html export

2016-03-14 Thread Alan Schmitt
On 2016-03-12 09:44, Stefan Nobis writes: > Alan Schmitt writes: > >> I'm converting a latex document into org-mode to easily export it both >> to latex and html. I've just encountered something that I don't know how >> to do: export a \vref reference. I would like to have something that >> expo

Re: [O] using vref in latex export, and normal links in html export

2016-03-12 Thread John Kitchin
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. >

Re: [O] using vref in latex export, and normal links in html export

2016-03-12 Thread John Kitchin
you could also try redefining the export of a ref link like this. #+BEGIN_SRC emacs-lisp (setf (elt (assoc "ref" org-link-protocols) 2) (lambda (keyword desc format) (cond ((eq format 'latex) "\\vref{keyword}") ((eq format 'html) (format

Re: [O] using vref in latex export, and normal links in html export

2016-03-12 Thread Stefan Nobis
Alan Schmitt writes: > I'm converting a latex document into org-mode to easily export it both > to latex and html. I've just encountered something that I don't know how > to do: export a \vref reference. I would like to have something that > exports to \vref in latex, and to a normal link in html

Re: [O] using vref in latex export, and normal links in html export

2016-03-11 Thread Alan Schmitt
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 f

Re: [O] using vref in latex export, and normal links in html export

2016-03-11 Thread Alan Schmitt
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. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂ (2016-02, Mauna Loa Obs.): 404.02

Re: [O] using vref in latex export, and normal links in html export

2016-03-11 Thread John Kitchin
Try: (setq org-latex-prefer-user-labels t) I think this does what you want for org 8.3.4 at least. Alan Schmitt writes: > Hello Eric, > > On 2016-03-11 12:03, Eric S Fraga writes: > >> On Friday, 11 Mar 2016 at 11:20, Alan Schmitt wrote: >>> Hello, >>> >>> I'm converting a latex document into

Re: [O] using vref in latex export, and normal links in html export

2016-03-11 Thread Alan Schmitt
Hello Eric, On 2016-03-11 12:03, Eric S Fraga writes: > On Friday, 11 Mar 2016 at 11:20, Alan Schmitt wrote: >> Hello, >> >> I'm converting a latex document into org-mode to easily export it both >> to latex and html. I've just encountered something that I don't know how >> to do: export a \vref

Re: [O] using vref in latex export, and normal links in html export

2016-03-11 Thread Eric S Fraga
On Friday, 11 Mar 2016 at 11:20, Alan Schmitt wrote: > Hello, > > I'm converting a latex document into org-mode to easily export it both > to latex and html. I've just encountered something that I don't know how > to do: export a \vref reference. I would like to have something that > exports to \vr

[O] using vref in latex export, and normal links in html export

2016-03-11 Thread Alan Schmitt
Hello, I'm converting a latex document into org-mode to easily export it both to latex and html. I've just encountered something that I don't know how to do: export a \vref reference. I would like to have something that exports to \vref in latex, and to a normal link in html. I thought I could do