emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Jeff Horn <jrhorn424@gmail.com>
Cc: Org-mode ml <emacs-orgmode@gnu.org>
Subject: Re: [babel] Including TikZ diagrams as figures in export
Date: Mon, 21 Feb 2011 09:57:51 -0700	[thread overview]
Message-ID: <87pqql5mss.fsf@gmail.com> (raw)
In-Reply-To: AANLkTikkxjFi1UGja36dt7JzXSbDiiLXe1UaNKmNmnQO@mail.gmail.com

Jeff Horn <jrhorn424@gmail.com> writes:

> On Sun, Feb 20, 2011 at 8:56 PM, Erik Iverson <eriki@ccbr.umn.edu> 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.
>

I agree this is not ideal.  The solution here is for the Org-mode
exporter to recognize blocks as figure-wrapable items.  This would solve
the above, as well as make it possible to reference exported source
code, verbatim environments, quotes, etc...

I haven't looked at the org exporter to see how large of a change this
would be, however I'll put this on my growing TODO list.

>
>>> 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 is not deprecated, the Org manual maintains an up-to-date list
of code block header arguments.
http://orgmode.org/manual/Working-With-Source-Code.html

Cheers -- Eric

  reply	other threads:[~2011-02-21 17:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 23:03 [babel] Including TikZ diagrams as figures in export Jeffrey Horn
2011-02-21  1:56 ` Erik Iverson
2011-02-21 15:11   ` Jeff Horn
2011-02-21 16:57     ` Eric Schulte [this message]
2011-02-21 19:27       ` Jeff Horn
2011-02-21 16:44   ` Andreas Leha
2011-02-21 19:29     ` Jeff Horn

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=87pqql5mss.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jrhorn424@gmail.com \
    /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).