emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Alan Schmitt
Subject: Re: [O] using vref in latex export, and normal links in html export
Date: Mon, 14 Mar 2016 10:29:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

On 2016-03-12 09:44, Stefan Nobis <address@hidden> writes:

> Alan Schmitt <address@hidden> 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.
>
> I solve this with the help of an export filter:
>
> (defun sn/ox-latex-filter-varioref (text backend info)
>   (when (org-export-derived-backend-p backend 'latex)
>     (replace-regexp-in-string "\\\\ref{" "\\\\vref{" text)))
>     
> (eval-after-load "ox-latex"
>   '(progn
>      (add-to-list 'org-export-filter-link-functions 
> 'sn/ox-latex-filter-varioref)))

Thank you for the suggestion, but this would convert every link in a
vref link. What I want to do is to be able to handle some links as vref.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-02, Mauna Loa Obs.): 404.02

Attachment: signature.asc
Description: PGP signature


reply via email to

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