From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-preview-latex-fragment, pstricks Date: Thu, 14 Aug 2014 15:01:37 -0400 Message-ID: <87y4uqgajy.fsf@alphaville.bos.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI0He-0000d0-UG for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 15:02:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XI0HZ-0006Up-Tk for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 15:01:58 -0400 Received: from plane.gmane.org ([80.91.229.3]:43032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI0HZ-0006Ui-Mk for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 15:01:53 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XI0HY-0002hG-3K for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 21:01:52 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Aug 2014 21:01:52 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Aug 2014 21:01:52 +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 Christian Straßer writes: > Dear all, > > I have a problem producing correct preview images when using pstricks. > Here's a minimal example to illustrate the problem. > I have an org-file "test.org" with the following content: > > \begin{equation} > \varphi > \end{equation} > \begin{pspicture} > \psframebox{text in box} > test outside box > \rnode{a}{a} \rnode{b}{b} > \ncline{a}{b} > \end{pspicture} > I had to get rid of the \rnode and \ncline calls - apparently I don't have the packages where they are defined. But once I did that, the preview succeeded and I get a box around "text in box". Org-mode version 8.3beta (release_8.3beta-177-gfe133a @ /home/nick/elisp/org-mode/lisp/) > Executing "org-preview-latex-fragment" is successful for both > environments (the equation and the pspicture). So no error message is > produced and no orgtex*.log files are in /tmp. The problem is though > that for the pspicture environment the psframebox is not produced. > "Test in a box" appears without a box. > > In order to see whether the same problem appears for tex-files and > preview-latex I created a corresponding tex-file: > > \documentclass{article} > \usepackage{pstricks} > \begin{document} > \begin{pspicture} > \psframebox{text in box} > test outside box > \end{pspicture} > \end{document} > > Here everything is displayed as expected/desired. > Are there orgtex*.tex files in /tmp? If so, try processing one of those from the command line and see what you get. If not, the trick I use is to introduce a deliberate error (call undefined macro \foo) in the tex code and then try the preview. That leaves a .tex file behind, which I can edit to get rid of the error and then process by hand. It might be interesting to compare that with what you have above. > Similar problems can be produced e.g. when drawing lines with the > \ncline command and using other pstricks-commands. > > Here's the relevant settings from my .emacs: > (custom-set-variables > '(org-latex-create-formula-image-program (quote dvipng)) > '(org-latex-default-packages-alist (quote (("AUTO" "inputenc" t) > ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t) ("" > "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "rotating" > nil) ("normalem" "ulem" t) ("" "amsmath" t) ("" "textcomp" t) ("" > "marvosym" t) ("" "wasysym" t) ("" "amssymb" t) ("" "hyperref" nil) > "\\tolerance=1000" ("" "pstricks" t) )))) > I don't know whether this causes your problems (probably not), but as the doc for the variable says, it's not a good idea to change org-latex-default-packages-alist unless there is a conflict. You should add the pstricks entry to org-latex-packages-alist instead and leave org-latex-default-packages-alist alone. > I also tried to set the org-latex-create-formula-image-program to > imagemagick: the problem remains the same. > I also tried to remove the pstricks-entry from > org-latex-default-packages-alist and manually add it via > #+LATEX_HEADER > which did not change the result. > > Finally, here's my org-mode version: 8.2.7b. > > Any help is highly appreciated. > -- Nick