From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Gauland Subject: Previewing inline-LaTeX with imagemagick? Date: Mon, 2 Jul 2012 20:17:38 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sln4D-0001M4-JT for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 16:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sln4B-0004hF-Vk for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 16:17:53 -0400 Received: from plane.gmane.org ([80.91.229.3]:56175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sln4B-0004h3-Ou for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 16:17:51 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sln48-0004L2-C4 for emacs-orgmode@gnu.org; Mon, 02 Jul 2012 22:17:49 +0200 Received: from 114-134-7-152.rurallink.co.nz ([114.134.7.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jul 2012 22:17:48 +0200 Received: from mikelygee by 114-134-7-152.rurallink.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jul 2012 22:17:48 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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