From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)] Date: Wed, 21 Oct 2015 21:35:10 +0200 Message-ID: <87twpkgglt.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZozAX-0007AQ-Hp for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 15:35:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZozAU-0005RS-BB for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 15:35:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:35299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZozAU-0005Qz-4I for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 15:35:26 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZozAN-0004ZD-4b for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 21:35:19 +0200 Received: from 46.166.188.236 ([46.166.188.236]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Oct 2015 21:35:19 +0200 Received: from rasmus by 46.166.188.236 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Oct 2015 21:35:19 +0200 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 ☕◦m̰̱̐y̿q̟̽ writes: > Given the following Org document: > > ,---- > | #+MACRO: refp \autoref{$1}, \autopageref{$1} > | > | > | * section > | > | Please see the results in {{{refp(sec:info)}}}. > | > | * info<> > | > | The results are here. > `---- > > When exporting to LaTex, I expect `autoref' and `autopageref' to > correctly refer to the target `sec:info'. However, recent versions of > Org do not do that. I now get the following when exporting to LaTeX: > > ,---- > | % Created 2015-10-21 Wed 03:25 > | \documentclass[11pt]{article} > | % [...] > | \begin{document} > | % [...] > | \section{section} > | \label{sec:orgheadline1} > | > | Please see the results in \autoref{sec:info}, \autopageref{sec:info}. > | > | \section{info\label{orgtarget1}} > | \label{sec:orgheadline2} > | > | The results are here. > | \end{document} > `---- > > When compiled, the following warning is issued: > > ,---- > | Latex failed to resolve 2 reference(s) > `---- > > > This did not occur in Org Mode 8.3beta. Can you try (setq org-latex-prefer-user-labels t). This works as expected: #+MACRO: refp \autoref{$1}, \autopageref{$1} * section Please see the results in {{{refp(sec:info)}}}. * info :PROPERTIES: :CUSTOM_ID: sec:info :END: The results are here. Hope it helps, Rasmus -- Sådan en god dansk lagereddike kan man slet ikke bruge mere