From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: Bug in latex export figure labels? Date: Fri, 16 Oct 2015 21:28:02 +0100 Message-ID: References: <8737xapyx4.fsf@pc-117-162.i-did-not-set--mail-host-address--so-tickle-me> <87a8rieq4r.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnBbO-0007Us-2S for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 16:27:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnBbJ-00012a-0o for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 16:27:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:55497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnBbI-00011l-Q8 for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 16:27:40 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZnBbG-0000T8-4y for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 22:27:38 +0200 Received: from cpc33-cmbg15-2-0-cust4.5-4.cable.virginm.net ([81.102.136.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Oct 2015 22:27:38 +0200 Received: from andreas.leha by cpc33-cmbg15-2-0-cust4.5-4.cable.virginm.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Oct 2015 22:27:38 +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 Nicolas Goaziou writes: > Hello, > > garjola@garjola.net writes: > >> I am having issues when exporting to LaTeX using labels in figures. The >> following snippet >> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > >>> #+CAPTION: Comparison > >>> #+NAME: fig:irreg2 > >>> #+attr_latex: :width 0.9\textwidth :placement [H] > >>> [[file:irregular_red.png]] > >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > >> >> gets exported as (see the label) >> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > >>> \begin{figure}[H] > >>> \centering > >>> \includegraphics[width=0.9\textwidth]{irregular_red.png} > >>> \caption{\label{fig:orgparagraph1} > >>> Comparison} > >>> \end{figure} > >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > >> >> instead of >> >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > >>> \begin{figure}[H] > >>> \centering > >>> \includegraphics[width=0.9\textwidth]{irregular_red.png} > >>> \caption{\label{fig:irreg2}Comparison} > >>> \end{figure} > >>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > >> >> I noticed this when updating the melpa package to the latest one. Using >> the git repository I have tried several versions of org-mode and the >> "bug" was introduced between release 8.2.9 and release 8.3. >> >> Since I am a little bit surprised that this has not been noticed, I am >> reluctant to say that this is a bug, but the same file gets exported >> differently with these 2 releases. >> >> I have also tried to change +NAME to +LABEL and the result is the same. >> >> Am I doing something wrong? > > This is a feature. See `org-latex-prefer-user-labels'. > Maybe `org-latex-prefer-user-labels' deserves its own FAQ entry. Or a changed default value. Regards, Andreas