|
From: | Stefan Nobis |
Subject: | Re: [O] using vref in latex export, and normal links in html export |
Date: | Sat, 12 Mar 2016 09:44:11 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
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: --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.
[Prev in Thread] | Current Thread | [Next in Thread] |