From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Alexander Gerds Subject: orgmode latex export: reference to label rather than section Date: Mon, 18 Jun 2012 12:35:45 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgZJP-0002eF-BQ for emacs-orgmode@gnu.org; Mon, 18 Jun 2012 06:36:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgZJI-00039h-RU for emacs-orgmode@gnu.org; Mon, 18 Jun 2012 06:35:58 -0400 Received: from va3ehsobe005.messaging.microsoft.com ([216.32.180.31]:25296 helo=va3outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgZJI-00039I-Nl for emacs-orgmode@gnu.org; Mon, 18 Jun 2012 06:35:52 -0400 Received: from mail127-va3 (localhost [127.0.0.1]) by mail127-va3-R.bigfish.com (Postfix) with ESMTP id E8EA61600AD for ; Mon, 18 Jun 2012 10:34:32 +0000 (UTC) Received: from VA3EHSMHS019.bigfish.com (unknown [10.7.14.235]) by mail127-va3.bigfish.com (Postfix) with ESMTP id 7D187E0049 for ; Mon, 18 Jun 2012 10:34:30 +0000 (UTC) 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: emacs-orgmode@gnu.org Hi I would be grateful if someone could help me sort out my confusion regarding references to headings (sections) in latex export. I am used to latex section labels and references via reftex, e.g. ,---- | \section{This is a test} | \label{sec:testit} | | In Section \ref{sec:testit} `---- To achieve this in orgmode it seems that one should set ,---- | (setq org-export-latex-hyperref-format "\\ref{%s}") `---- and then write: ,---- | * This is a test | | In Section [[This is a test]] `---- This seems to work! However, if I later change the specific section title ("This is a test"), then I have to remember to also change all links [[references]] to this section. I feel this is a potential source of error and would therefore prefer to explicitly set and refer to a label for this section. But, the following statement ,---- | #+LABEL: sec:testit | * This is a test `---- is exported as ,---- | \section{This is a test} | \label{sec-2} `---- so, my label is ignored. Is there a workaround for this? Thanks, Thomas ps: running orgmode version 7.8.11 on emacs version 23.3.1