From mboxrd@z Thu Jan 1 00:00:00 1970 From: Indraneel Majumdar Subject: Re: Using \ref instead of \hyperref in LaTeX export? Date: Fri, 15 Oct 2010 23:58:58 +0530 Message-ID: <4CB89D6A.1030700@indraneel.info> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1227276739==" Return-path: Received: from [140.186.70.92] (port=42551 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6p1j-0004dw-67 for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 14:29:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6p1i-00010h-6b for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 14:29:11 -0400 Received: from mailout13.yourhostingaccount.com ([65.254.253.109]:43550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6p1i-0000zp-4Q for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 14:29:10 -0400 Received: from mailscan06.yourhostingaccount.com ([10.1.15.6] helo=mailscan06.yourhostingaccount.com) by mailout13.yourhostingaccount.com with esmtp (Exim) id 1P6p1f-0006iK-LQ for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 14:29:07 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Guy Wiener Cc: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --===============1227276739== Content-Type: multipart/alternative; boundary="------------000501030808040507090104" This is a multi-part message in MIME format. --------------000501030808040507090104 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Maybe use a hook like the following.. It's for cref, please modify to your liking: (defun creflink() "Change all solitary [[]] links to [[target][\cref]] links" (regex-replace "\\[\\[\\([^:\[]+?\\)\\]\\]" "[[\\1][\\\\cref{\\1}]]") ) (add-hook 'org-export-preprocess-hook 'creflink) Indraneel On 10/15/2010 04:10 PM, Guy Wiener wrote: > Hello, > Is there a way to tweak the LaTeX export so that for a link > [[label][desc]] it will produce the standard "\ref{label}" instead of > "\hyperref[label]{desc}"? I want to be able to use the standard > article writing, such as "in Section~\ref{sec:bla}...". > > Thanks, > Guy > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --------------000501030808040507090104 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Maybe use a hook like the following.. It's for cref, please modify to your liking:

(defun creflink()
  "Change all solitary [[]] links to [[target][\cref]] links"
  (regex-replace "\\[\\[\\([^:\[]+?\\)\\]\\]"  "[[\\1][\\\\cref{\\1}]]")
)
(add-hook 'org-export-preprocess-hook 'creflink)

Indraneel

On 10/15/2010 04:10 PM, Guy Wiener wrote:
Hello,
Is there a way to tweak the LaTeX export so that for a link [[label][desc]] it will produce the standard "\ref{label}" instead of "\hyperref[label]{desc}"? I want to be able to use the standard article writing, such as "in Section~\ref{sec:bla}...".

Thanks,
  Guy
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--------------000501030808040507090104-- --===============1227276739== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1227276739==--