emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mike Gauland <mikelygee@no8wireless.co.nz>
To: emacs-orgmode@gnu.org
Subject: Previewing inline-LaTeX with imagemagick?
Date: Mon, 2 Jul 2012 20:17:38 +0000 (UTC)	[thread overview]
Message-ID: <loom.20120702T220531-895@post.gmane.org> (raw)

I've been playing with tikz to create a flowchart in my org file. The image is
rendered correctly when I export to PDF, of course, and setting the 'latex'
option to 'imagemagick' generates a PNG when I export the file to HTML. However,
if I try to preview that block with org-preview-latex-fragment (C-c C-x C-l), I
 just get a blank square (a placeholder).

I think this is because dvipng doesn't handle the postscript generated by tikz.
I've worked around this by shadowing the system dvipng with a script in my local
bin directory, that sends the dvi through dvips then convert to generate the
png. This also works for HTML export (using latex:dvipng).  

The new 'latex:imagemagick' option is a cleaner solution. Would it be possible
to use the same code for previewing fragments?

I'm happy to help with the necessary changes, if some knowledgeable with the
relevant source code can get me started in the right direction.

--Mike

                 reply	other threads:[~2012-07-02 20:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=loom.20120702T220531-895@post.gmane.org \
    --to=mikelygee@no8wireless.co.nz \
    --cc=emacs-orgmode@gnu.org \
    /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).