From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Davis Subject: Re: Bug: LaTeX export #+NAME failing [8.3.1 (release_8.3.1-123-g823cad @ /home/amdavis/src/org-mode/lisp/)] Date: Wed, 16 Sep 2015 16:35:03 +0000 Message-ID: References: <87613awcqw.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c07b550f0e266051fdfe13e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcFfy-0003Yf-My for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 12:35:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcFft-0000Ll-Fe for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 12:35:18 -0400 Received: from authsmtp03.uchicago.edu ([128.135.165.74]:37968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcFft-0000Lh-8o for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 12:35:13 -0400 Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) (Authenticated sender: amdavis) by authsmtp03.uchicago.edu (Postfix) with ESMTPSA id 9F8EB1F500 for ; Wed, 16 Sep 2015 11:35:12 -0500 (CDT) Received: by ykdt18 with SMTP id t18so204415023ykd.3 for ; Wed, 16 Sep 2015 09:35:12 -0700 (PDT) In-Reply-To: <87613awcqw.fsf@nicolasgoaziou.fr> 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 --94eb2c07b550f0e266051fdfe13e Content-Type: text/plain; charset=UTF-8 Thanks for getting back to me. Unfortunately this is not the issue I am reporting. The problem is that the #+NAME that produces the label is incorrectly exported to the LaTeX document. That is it is the weird \label{fig:orgparagraph1} which is not what I am trying to label the figure as. You are right that [[fig:result_plot]] does produce the \ref{fig:result_plot}, However, the reference appears unresolved in the resulting document because the figure itself is incorrectly labeled. Best, Andrew On Wed, Sep 16, 2015 at 11:26 AM Nicolas Goaziou wrote: > Hello, > > Andrew Davis writes: > > > #+CAPTION: Plot of something interesting. > > #+ATTR_LaTeX: :width \textwidth > > #+NAME: fig:result_plot > > file:./img/plot.pdf > > > > This method of placing plots into an org document no longer > > works. Previously, this would correctly produce the figure with > > a consistent label for internal references within the org document and > > the exported LaTeX document. Now, the export results in the following > > TeX code: > > > > \begin{figure}[htb] > > \centering > > \includegraphics[width=\textwidth]{./img/plot.pdf} > > \caption{\label{fig:orgparagraph1} > > Plot of something interesting.} > > \end{figure} > > > > As it can be seen above, the intended label of fig:result_plot is no > > longer exported. This breaks any reference to \ref{fig:result_plot} in > > the LaTeX document while the label of ref:fig:result_plot only works > > within the org document. > > This is usually not an issue since [[fig:result_plot]] will results in > \ref{fig:result_plot}. > > In any case, see `org-latex-prefer-user-labels'. > > Regards, > > -- > Nicolas Goaziou > --94eb2c07b550f0e266051fdfe13e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for getting back to me. Unfortunately this is not t= he issue I am reporting. The problem is that the #+NAME that produces the l= abel is incorrectly exported to the LaTeX document. That is it is the weird= \label{fig:orgparagraph1} which is not what I am trying to label the figur= e as.

You are right that [[fig:result_plot]] does produc= e the \ref{fig:result_plot}, However, the reference appears unresolved in t= he resulting document because the figure itself is incorrectly labeled.

Best,
Andrew

On Wed, Sep 16, 2015 at 11:26 AM Nicolas Goaziou <<= a href=3D"mailto:mail@nicolasgoaziou.fr">mail@nicolasgoaziou.fr> wro= te:
Hello,

Andrew Davis <= amdavis@uchicago.edu> writes:

> #+CAPTION: Plot of something interesting.
> #+ATTR_LaTeX: :width \textwidth
> #+NAME: fig:result_plot
> file:./img/plot.pdf
>
> This method of placing plots into an org document no longer
> works. Previously, this would correctly produce the figure with
> a consistent label for internal references within the org document and=
> the exported LaTeX document. Now, the export results in the following<= br> > TeX code:
>
> \begin{figure}[htb]
> \centering
> \includegraphics[width=3D\textwidth]{./img/plot.pdf}
> \caption{\label{fig:orgparagraph1}
> Plot of something interesting.}
> \end{figure}
>
> As it can be seen above, the intended label of fig:result_plot is no > longer exported. This breaks any reference to \ref{fig:result_plot} in=
> the LaTeX document while the label of ref:fig:result_plot only works > within the org document.

This is usually not an issue since [[fig:result_plot]] will results in
\ref{fig:result_plot}.

In any case, see `org-latex-prefer-user-labels'.

Regards,

--
Nicolas Goaziou
--94eb2c07b550f0e266051fdfe13e--