Alan Schmitt <[email protected]> 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:
--8<---------------cut here---------------start------------->8---
(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)))
--8<---------------cut here---------------end--------------->8---
--
Until the next mail...,
Stefan.