On 2016-03-12 09:44, Stefan Nobis <stefan...@snobis.de> writes:

> Alan Schmitt <alan.schm...@polytechnique.org> 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