[Top][All Lists]

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

Re: [O] [new exporter] no \caption and \label upon export of #+BEGIN_LAT

From: Nicolas Goaziou
Subject: Re: [O] [new exporter] no \caption and \label upon export of #+BEGIN_LATEX block
Date: Sat, 10 Nov 2012 23:52:26 +0100


Myles English <address@hidden> writes:

> I'd like to use a tikz snippet in a few different documents and it would
> be convenient to be able to include it in a latex document like so:
> #+CAPTION: a fine figure
> #+NAME:   figure:fine_figure
> #+ATTR_LaTeX: width=5cm
> \input{/home/myles/tex/tikz_figure.tex}
> What is exported is just the \input line, with no \label or \caption, i.e.:
> \input{/home/myles/tex/tikz_figure.tex}

Well, IMO, it doesn't make much sense to add a caption or a label to an
export block. Just write whatever you want within the block. I.e.:

    \caption{\label{figure:fine_figure}a fine figure}

Is there any downside to it?

> I believe this was possible with current (old) exporter, based on this
> thread:
> http://lists.gnu.org/archive/html/emacs-orgmode/2012-10/msg00267.html

This thread is about src blocks. Adding a label or a caption is fine for

> On second thoughts, perhaps another way to do it would be to have a
> source block make the tikz graphic as a standalone pdf/eps and then
> insert it as a link to the file.  The disadvantage of that would be that
> the tikz .tex file would need to be expanded to have it's own
> \begin/end{document} and would loose some flexibility.  Any thoughts on
> that route?

I don't know. for my graphics, I use Asymptote src-blocks generating
links to pdf files. E.g.:

  #+NAME: app
  #+BEGIN_SRC asymptote :file application.pdf
  import graph;
  pen p=blue;
  real f(real x) { return x**2; }
  real g(real x) { return -x + 2; }

  #+RESULTS: app


Nicolas Goaziou

reply via email to

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