From: Eric Schulte <schulte.eric@gmail.com>
To: Derek Thomas <derekcthomas@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Change latex export to use cref
Date: Tue, 25 Jun 2013 23:43:46 -0600 [thread overview]
Message-ID: <878v1xh1f1.fsf@gmail.com> (raw)
In-Reply-To: <CALDRGc_55qwYDR+6Oz79zR5PjofcnWMxKt41Q8OKBgJz63BAoQ@mail.gmail.com> (Derek Thomas's message of "Tue, 25 Jun 2013 22:57:32 -0600")
Derek Thomas <derekcthomas@gmail.com> 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
prev parent reply other threads:[~2013-06-26 5:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 4:57 Change latex export to use cref Derek Thomas
2013-06-26 5:43 ` Eric Schulte [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878v1xh1f1.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=derekcthomas@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).