emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in latex export figure labels?
@ 2015-10-16 16:21 garjola
  2015-10-16 16:26 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: garjola @ 2015-10-16 16:21 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

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?

Thank you.

Garjola




-- 
Dr. Dindi
Dad, Philosopher, Hacker

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in latex export figure labels?
  2015-10-16 16:21 Bug in latex export figure labels? garjola
@ 2015-10-16 16:26 ` Nicolas Goaziou
  2015-10-16 20:28   ` Andreas Leha
  2015-10-16 21:30   ` garjola
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2015-10-16 16:26 UTC (permalink / raw)
  To: garjola; +Cc: emacs-orgmode

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'.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in latex export figure labels?
  2015-10-16 16:26 ` Nicolas Goaziou
@ 2015-10-16 20:28   ` Andreas Leha
  2015-10-16 20:33     ` Rasmus
  2015-10-16 21:30   ` garjola
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Leha @ 2015-10-16 20:28 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in latex export figure labels?
  2015-10-16 20:28   ` Andreas Leha
@ 2015-10-16 20:33     ` Rasmus
  0 siblings, 0 replies; 5+ messages in thread
From: Rasmus @ 2015-10-16 20:33 UTC (permalink / raw)
  To: emacs-orgmode

Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:

> Maybe `org-latex-prefer-user-labels' deserves its own FAQ entry.

It should perhaps be mentioned explicitly in the manual as this topic pops
up too frequently.  A worg faq entry is also fine.

Feel free to submit a patch towards this end.

> Or a changed default value.

I disagree.

Rasmus

-- 
One thing that is clear: it's all down hill from here 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in latex export figure labels?
  2015-10-16 16:26 ` Nicolas Goaziou
  2015-10-16 20:28   ` Andreas Leha
@ 2015-10-16 21:30   ` garjola
  1 sibling, 0 replies; 5+ messages in thread
From: garjola @ 2015-10-16 21:30 UTC (permalink / raw)
  To: emacs-orgmode


Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> 
> Hello,
>> Am I doing something wrong?
>
> This is a feature. See `org-latex-prefer-user-labels'.
>
>

Oups! Thank you and apologies!
-- 
Dr. Dindi
Dad, Philosopher, Hacker

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-16 21:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 16:21 Bug in latex export figure labels? garjola
2015-10-16 16:26 ` Nicolas Goaziou
2015-10-16 20:28   ` Andreas Leha
2015-10-16 20:33     ` Rasmus
2015-10-16 21:30   ` garjola

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).