From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to add a label in LaTeX export Date: Tue, 06 Sep 2016 10:59:10 +0200 Message-ID: <87zinlv1y9.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhCDt-0003rJ-IT for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 04:59:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhCDo-0007dY-L9 for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 04:59:17 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:47919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhCDo-0007dP-Db for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 04:59:12 -0400 In-Reply-To: (Florian Lindner's message of "Tue, 6 Sep 2016 10:32:57 +0200") 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" To: Florian Lindner Cc: emacs-orgmode@gnu.org Hello, Florian Lindner 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'. Regards, -- Nicolas Goaziou