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 17:30:18 +0000 Message-ID: References: <87613awcqw.fsf@nicolasgoaziou.fr> <871tdywafy.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114214788dfea1051fe0a748 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcGXQ-00056V-8N for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 13:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcGXM-00067F-US for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 13:30:32 -0400 Received: from authsmtp01.uchicago.edu ([128.135.12.121]:39176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcGXM-000674-Cl for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 13:30:28 -0400 Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com [209.85.160.181]) (Authenticated sender: amdavis) by authsmtp01.uchicago.edu (Postfix) with ESMTP id F07E04980C6 for ; Wed, 16 Sep 2015 12:30:27 -0500 (CDT) Received: by ykdt18 with SMTP id t18so206083748ykd.3 for ; Wed, 16 Sep 2015 10:30:27 -0700 (PDT) In-Reply-To: <871tdywafy.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 --001a114214788dfea1051fe0a748 Content-Type: text/plain; charset=UTF-8 You are getting the same results I am. What is concerning me is the fact that the label you are applying in the document: #+NAME: fig:result_plot is not the label that is being applied to the the exported tex document, i.e. \label{fig:orgparagraph1} \ref{fig:orgparagraph1} This is rather problematic as there are a variety of things that sometimes need to be done with just pure LaTeX in a babel source block that operate on the figures elsewhere in the org document. If I want to create some multi figure plot in which the internal caption references another figure, the reference in that caption to \ref{fig:result_plot} will no longer work. Again, I am pretty sure this is a bug as it was previously possible to refer to the assigned labels (i.e. fig:result_plot) rather than needing to know whatever sequential reference is assigned by org mode on the export. Best, Andrew On Wed, Sep 16, 2015 at 12:15 PM Nicolas Goaziou wrote: > Andrew Davis writes: > > > 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. > > I cannot reproduce it. With the following document > > #+CAPTION: Plot of something interesting. > #+ATTR_LaTeX: :width \textwidth > #+NAME: fig:result_plot > file:./img/plot.pdf > > [[fig:result_plot]] > > I get > > \begin{figure}[htb] > \centering > \includegraphics[width=\textwidth]{./img/plot.pdf} > \caption{\label{fig:orgparagraph1} > Plot of something interesting.} > \end{figure} > > \ref{fig:orgparagraph1} > > which seems fine. > > Regards, > --001a114214788dfea1051fe0a748 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You are getting the same results I am. What is concerning = me is the fact that the label you are applying in the document:

#+NAME: fig:result_plot

is not the label t= hat is being applied to the the exported tex document, i.e.

<= /div>
\label{fig:orgparagraph1}

\ref{fig:orgpa= ragraph1}

This is rather problematic as there are = a variety of things that sometimes need to be done with just pure LaTeX in = a babel source block that operate on the figures elsewhere in the org docum= ent. If I want to create some multi figure plot in which the internal capti= on references another figure, the reference in that caption to \ref{fig:res= ult_plot} will no longer work.

Again, I am pretty = sure this is a bug as it was previously possible to refer to the assigned l= abels (i.e. fig:result_plot) rather than needing to know whatever sequentia= l reference is assigned by org mode on the export.

Best,
Andrew

On Wed, Sep 16, 2015 at 12:15 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Andrew Davis <amdavis@uchicago.edu> writes:

> Thanks for getting back to me. Unfortunately this is not the issue I a= m
> 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 f= igure
> as.
>
> You are right that [[fig:result_plot]] does produce the
> \ref{fig:result_plot}, However, the reference appears unresolved in th= e
> resulting document because the figure itself is incorrectly labeled.
I cannot reproduce it. With the following document

=C2=A0 #+CAPTION: Plot of something interesting.
=C2=A0 #+ATTR_LaTeX: :width \textwidth
=C2=A0 #+NAME: fig:result_plot
=C2=A0 file:./img/plot.pdf

=C2=A0 [[fig:result_plot]]

I get

=C2=A0 \begin{figure}[htb]
=C2=A0 \centering
=C2=A0 \includegraphics[width=3D\textwidth]{./img/plot.pdf}
=C2=A0 \caption{\label{fig:orgparagraph1}
=C2=A0 Plot of something interesting.}
=C2=A0 \end{figure}

=C2=A0 \ref{fig:orgparagraph1}

which seems fine.

Regards,
--001a114214788dfea1051fe0a748--