From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Change latex export to use cref Date: Tue, 25 Jun 2013 23:43:46 -0600 Message-ID: <878v1xh1f1.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UriXF-00060w-N9 for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 01:44:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UriXE-0000ik-Pc for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 01:44:53 -0400 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:60798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UriXE-0000iY-I2 for emacs-orgmode@gnu.org; Wed, 26 Jun 2013 01:44:52 -0400 Received: by mail-pa0-f42.google.com with SMTP id rl6so13678788pac.29 for ; Tue, 25 Jun 2013 22:44:51 -0700 (PDT) In-Reply-To: (Derek Thomas's message of "Tue, 25 Jun 2013 22:57:32 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Derek Thomas Cc: Org Mode Derek Thomas 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