emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Florian Lindner <mailinglists@xgm.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to add a label in LaTeX export
Date: Tue, 06 Sep 2016 10:59:10 +0200	[thread overview]
Message-ID: <87zinlv1y9.fsf@saiph.selenimh> (raw)
In-Reply-To: <nqluvo$vm4$1@blaine.gmane.org> (Florian Lindner's message of "Tue, 6 Sep 2016 10:32:57 +0200")

Hello,

Florian Lindner <mailinglists@xgm.de> 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

  reply	other threads:[~2016-09-06  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06  8:32 How to add a label in LaTeX export Florian Lindner
2016-09-06  8:59 ` Nicolas Goaziou [this message]
2016-09-09  8:53   ` Florian Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zinlv1y9.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mailinglists@xgm.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).