[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Change latex export to use cref
From: |
Eric Schulte |
Subject: |
Re: [O] Change latex export to use cref |
Date: |
Tue, 25 Jun 2013 23:43:46 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Derek Thomas <address@hidden> writes:
> Is there a variable that can be set so that latex export uses \cref instead
> of \ref? Thanks,
>
Adding the following to your config should work.
;; -*- emacs-lisp -*-
(defun org-latex-ref-to-cref (text backend info)
"Use \\cref instead of \\ref in latex export."
(when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "\\\\ref{" "\\\\cref{" text)))
(add-to-list 'org-export-filter-final-output-functions
'org-latex-ref-to-cref)
Hope this helps,
--
Eric Schulte
http://cs.unm.edu/~eschulte