[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [babel] Including TikZ diagrams as figures in export
From: |
Jeff Horn |
Subject: |
Re: [Orgmode] [babel] Including TikZ diagrams as figures in export |
Date: |
Mon, 21 Feb 2011 10:11:51 -0500 |
On Sun, Feb 20, 2011 at 8:56 PM, Erik Iverson <address@hidden> wrote:
> See http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html
> and search for "tikz" for an example. I think you do need to use the :file
> argument
> for this to have org-mode take care of it automatically.
Thanks for the link. I was glad to find out I could include a TikZ
library in the code block instead of the LaTeX header!
> Alternatively, you could just include *all* the latex you want, including
> constructing your own figure environment and caption and refs, in the latex
> code block.
This is the workaround I've used thus far. I don't like it very much,
since it is fragile w.r.t. HTML export.
>> 4) (optional) To be able to seamlessly export to both LaTeX and HTML
>
> So should the HTML exporter generate a PNG file then, as opposed to PDF?
> This is possible, but requires some 'conditional' elisp code in your :file
> source block argument. I think I can help if that's indeed what you want.
This would be handy information to have, but definitely not a top
priority ATM. (That is, if you're busy, feel free to put this on low
priority!)
>> And somewhat unrelated, is ":results" now deprecated in favor of
>> ":exports"? What about ":file"? I'm sufficiently new to babel that these all
>> seem like they could be taken care of with a single header argument with
>> many options...
>
> Not deprecated at all according to my understanding:
>
> :results determines how the results are collected from a process. So, in R,
> we
> might want the standard output ':results output' or we might just want the
> last
> value returned by the code block, ':results value'. This determines what is
> inserted into the org-mode buffer or the export stream when the code block
> is evaluated.
>
> :exports determines if the code and/or the results will be inserted upon
> exporting. *If* the results are inserted, then :results will determine how.
>
> :file is useful for code blocks that generate graphical output, such as
> tikz.
> This will divert the output into the named file, and exporting will insert
> that file. In the org-mode buffer, a link will be inserted. If a png file
> is
> generated, it can even be displayed inline in the org-mode buffer if you
> turn
> on that functionality.
This was also extremely helpful in clarifying my thinking. I
particularly liked the interplay between exports/results. I need more
practice, and more time with the docs. :)
Jeff
--
Jeffrey Horn
http://www.failuretorefrain.com/jeff/