From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Target and link text normalised to `orgtargetn' Date: Tue, 14 Apr 2015 14:08:52 +0200 Message-ID: <20150414120852.GD2957@chitra.no-ip.org> References: <20150414092530.GC2957@chitra.no-ip.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhzeG-0007vg-UL for emacs-orgmode@gnu.org; Tue, 14 Apr 2015 08:09:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhzeB-0000Sw-B1 for emacs-orgmode@gnu.org; Tue, 14 Apr 2015 08:09:00 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:38105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhzeB-0000Rj-32 for emacs-orgmode@gnu.org; Tue, 14 Apr 2015 08:08:55 -0400 Received: by wiun10 with SMTP id n10so19104603wiu.1 for ; Tue, 14 Apr 2015 05:08:54 -0700 (PDT) Received: from chitra.no-ip.org ([2001:610:120:3001:2ad2:44ff:fe4a:b029]) by mx.google.com with ESMTPSA id n1sm2559790wix.0.2015.04.14.05.08.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2015 05:08:53 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20150414092530.GC2957@chitra.no-ip.org> 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 Org mode Hi, I found a partial answer. On Tue, Apr 14, 2015 at 11:25:30AM +0200, Suvayu Ali wrote: > > I am exporting Org files to LaTeX. I noticed something strange > happening. The text of all my target text gets changed to `orgtargetn' > where n is some number. This breaks a lot of my LaTeX specific links. > > For example, I use the varioref package to get entity specific Typo here, the package name is actually refstyle. > references, so \secref{sec:foo}, \figref{fig:bar}, \tabref{sec:baz} (it > even takes care of language, or punctuation as needed!). Now if the > target text changes from sec:foo to orgtarget1, of course the link > breaks. The commit 4bbc054 introduces a variable org-latex-prefer-user-labels. which is reponsible for this behaviour. Setting this variable to t doesn't entirely solve my problem though. Normal targets like <> are still altered. I think the docstring hints at that already. For headlines that do not define the CUSTOM_ID property or elements without a NAME, Org will continue to use its default labeling scheme to generate labels and resolve links into proper references. I guess a bare target is an element without a NAME. I find this a bit strange, since the user already adds the target manually. So I think it is already the user's responsibility to ensure it is consistent. Shouldn't then Org leave this unchanged? Thanks, -- Suvayu Open source is the future. It sets us free.