emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: Benjamin Motz <benni.motz@gmail.com>
Cc: Emacs-orgmode@gnu.org
Subject: Re: [patch] Problems producing TikZ PNGs from LaTeX src blocks (was: Problems producing TikZ PNGs from LaTeX src blocks)
Date: Sun, 30 Sep 2018 21:43:07 +0200	[thread overview]
Message-ID: <87o9cebwl0.fsf@christianmoe.com> (raw)
In-Reply-To: <m236ts108f.fsf_-_@gmail.com>


Benjamin Motz writes:

> It seems that the function `org-babel-execute:latex' ignores the
> property :headers under certain circumstances. Therefore the line
> "\usepackage{tikz}" will be missing in your resulting latex document.
>
> The property is not ignored if you also append the property
> ":imagemagick t" to the #+header line. So you can use the following
> header as a fix (for another fix, see below):
>
> #+header: :file "tikzpic.png" :fit yes :results raw file :exports results :headers '("\\usepackage{tikz}") :imagemagick t

Thank you. When I try this workaround, I run into another issue, which
may be local to my setup. When I add the :imagemagick header, Org tries
to generate a PDF.  This gives me a message that the file wasn't
produced, but in fact a PDF with the correct image is produced --
however, it has a temporary file name, not the one I assigned to
it. (The same problem occurs if I try to create file output from this or
any other Babel latex block with a .pdf extension instead of .png.) It
looks like Org for some reason fails to take a last step in the
latex-to-PDF export -- changing the file name and cleaning up temporary
files. Probably as a result of this failure, no PNG is created.

I have also tried to apply your patch, without effect. Maybe I did it
wrong, but it increasingly looks like I have some weird problem with my
setup in addition to the issue you uncovered.

Yours,
Christian Moe

  reply	other threads:[~2018-09-30 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  9:39 Problems producing TikZ PNGs from LaTeX src blocks Christian Moe
2018-09-28 10:27 ` Eric S Fraga
2018-09-29 21:07   ` [patch] Problems producing TikZ PNGs from LaTeX src blocks (was: Problems producing TikZ PNGs from LaTeX src blocks) Benjamin Motz
2018-09-30 19:43     ` Christian Moe [this message]
     [not found]   ` <87mus18z8t.fsf@christianmoe.com>
2018-09-30 18:47     ` Fwd: Re: Problems producing TikZ PNGs from LaTeX src blocks Christian Moe
     [not found]     ` <87sh1tsmm0.fsf@delle7240.chemeng.ucl.ac.uk>
2018-09-30 18:56       ` Christian Moe

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=87o9cebwl0.fsf@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=benni.motz@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).