emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8


From: Rasmus
Subject: Re: [O] 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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

☕◦m̰̱̐y̿q̟̽ <address@hidden> writes:


> Given the following Org document:
>
> ,----
> | #+MACRO: refp \autoref{$1}, \autopageref{$1}
> |
> |
> | * section
> |
> | Please see the results in {{{refp(sec:info)}}}.
> |
> | * info<<sec: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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]