emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to add a label in LaTeX export


From: Florian Lindner
Subject: Re: [O] How to add a label in LaTeX export
Date: Fri, 9 Sep 2016 10:53:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

Am 06.09.2016 um 10:59 schrieb Nicolas Goaziou:
> Hello,
> 
> Florian Lindner <address@hidden> writes:
> 
>> I have this org mode document:
>>
>> #+BEGIN_SRC python :exports results :results file
>>   import matplotlib.pyplot as plt, numpy as np
>>   x = np.linspace(-2, 2, 1000)
>>   plt.plot(x, np.exp(-np.power(4*x, 2)), label="shape-parameter=4")
>>   plt.plot(x, np.exp(-np.power(2*x, 2)), label="shape-parameter=2")
>>   for i in range(-6, 7): plt.axvline(1/6 * i, ymax = 0.1, ls = "-.", 
>> color="r")
>>   plt.grid()
>>   plt.legend()
>>   plt.savefig('rbf-gaussian-4.pdf')
>>   return "rbf-gaussian-4.pdf"
>> #+END_SRC
>> #+NAME: fig:GaussianExample
>> #+CAPTION: Gaussian Basis functions with vertex distances marked at $n \cdot 
>> \frac{1}{6}$.
>> #+RESULTS:
>> [[file:rbf-gaussian-4.pdf]]
>>
>>
>> which exports to:
>>
>>
>> \begin{document}
>>
>> \tableofcontents
>>
>> \begin{figure}[htb]
>> \centering
>> \includegraphics[width=.9\linewidth]{rbf-gaussian-4.pdf}
>> \caption{\label{fig:orgparagraph1}
>> Gaussian Basis functions with vertex distances marked at \(n \cdot 
>> \frac{1}{6}\).}
>> \end{figure}
>> \end{document}
>>
>>
>> The #+NAME which I expect to translate to a label is ignored.
> 
> It isn't. It is changed into
> 
>  \label{fig:orgparagraph1}
> 
> See also `org-latex-prefer-user-labels'.

Thanks, see related issue for org-ref: 
https://github.com/jkitchin/org-ref/issues/285

Florian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]