emacs-orgmode
[Top][All Lists]

## Re: [O] Bug: LaTeX export #+NAME failing [8.3.1 (release_8.3.1-123-g823c

 From: Andrew Davis Subject: Re: [O] 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

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 <address@hidden> wrote:
Andrew Davis <address@hidden> 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,

reply via email to