From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: pstricks in org-mode? Date: Fri, 02 Oct 2009 15:34:01 -0300 Message-ID: <4ac6c92c.1702be0a.68af.163a@mx.google.com> References: <417457b50909301530p2ac1a332ua287699c28012ceb@mail.gmail.com> <417457b50910011346o533328e6obcc5769295b214c6@mail.gmail.com> <417457b50910020552q366316bek88f6d73224940e9b@mail.gmail.com> <4ac5fff0.47c2f10a.46ff.166d@mx.google.com> <417457b50910020753l6e64e753ra45be481dbb9f0c@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtvaI-0005Cp-Vr for emacs-orgmode@gnu.org; Fri, 02 Oct 2009 23:47:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtvaE-00057H-3N for emacs-orgmode@gnu.org; Fri, 02 Oct 2009 23:47:02 -0400 Received: from [199.232.76.173] (port=38723 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtvaE-000577-0A for emacs-orgmode@gnu.org; Fri, 02 Oct 2009 23:46:58 -0400 Received: from mx20.gnu.org ([199.232.41.8]:45894) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtvaD-0001Mm-DQ for emacs-orgmode@gnu.org; Fri, 02 Oct 2009 23:46:57 -0400 Received: from mail-gx0-f214.google.com ([209.85.217.214]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtvaB-0003qL-39 for emacs-orgmode@gnu.org; Fri, 02 Oct 2009 23:46:55 -0400 Received: by gxk6 with SMTP id 6so359319gxk.13 for ; Fri, 02 Oct 2009 20:46:54 -0700 (PDT) In-Reply-To: <417457b50910020753l6e64e753ra45be481dbb9f0c@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Johan Ekh Cc: emacs-orgmode@gnu.org =46rom the documentation it seems that org-mode uses dvipng. [[info:org:LaTeX%20fragments][info:org:LaTeX fragments]] But I don't know how it behaves with pstricks. I usually create the graphics in a separated file when I'm working with latex. It's a complete latex file with the necessary preamble that will be later turned into comments when I'm finished and want to actually include t= he graphic in my document. (using \input{graphic.tex}) When I'm working on it, Emacs occupies half of my screen (or more) and evin= ce occupies the other half. Whenever I compile the document (using pdflatex si= nce I use tikz to draw graphics) the pdf is automatically reloaded by evince. Sin= ce I don't rely on the preview-latex for developing the graphics I don't know if= it works with tikz. I guess I'll give it a try. ... I tried with the simple example ,---- | \begin{tikzpicture} | \draw (0,0) -- (1,1); | \end{tikzpicture} `---- and it does not work. Only a little square is show in the Emacs buffer. Wel= l, this is expected since the package tikz is not included in the temporary .t= ex file (and neither is pstricks as I could see). After included the usepackage{tikz} in org-format-latex-header the preview = is "created". However nothing is show, since the graphic generated by tikz (and pstricks) is not present at the DVI stage. This seems to be a limitation of dvipng and not org-mode. Darlan At Fri, 2 Oct 2009 16:53:54 +0200, Johan Ekh wrote: >=20 > [1.1 ] > But is pdflatex also used for rendering the previews in emacs? The most > convenient thing for me would > be to see the preview while I am developing the picture and then as a last > step export it to my latex document. >=20 > Do you this is possible somehow? >=20 > Best regards, > Johan >=20 > On Fri, Oct 2, 2009 at 3:28 PM, Darlan Cavalcante Moreira > wrote: >=20 > > > > Remember that because pstricks use postscript commands it is necessary = to > > take > > the long route in latex (latex->DVI->PS->PDF) instead of just using > > pdflatex. Therefore, if you put some pstricks code in the org-file and > > export to > > PDF to see the result then this is the reason, since the exporter seems= to > > use > > pdflatex to process the generated .tex file (I'm assuming this, since I > > don't > > see any DVI or PS file created by the exporter). > > > > Best, > > Darlan > > > > At Fri, 2 Oct 2009 14:52:33 +0200, > > Johan Ekh wrote: > > > > > > [1 ] > > > [1.1 ] > > > It seems that I can use any latex package that I want except for the > > > pstricks ones. > > > No picture is produced. No error message either. I load the same pack= ages > > > and use the same > > > pstricks code that I have in a regular latex document (on the same > > computer) > > > and > > > it works in that document. > > > > > > Any ideas? > > > > > > //Johan > > > > > > On Thu, Oct 1, 2009 at 10:46 PM, Johan Ekh wrot= e: > > > > > > > Thanks, I'll try it! > > > > /Johan > > > > > > > > > > > > On Thu, Oct 1, 2009 at 1:55 PM, Carsten Dominik < > > carsten.dominik@gmail.com > > > > > wrote: > > > > > > > >> > > > >> On Oct 1, 2009, at 12:30 AM, Johan Ekh wrote: > > > >> > > > >> Hi all, > > > >>> I'm using org-mode to write LaTeX snippets that I later (usually) > > > >>> transfer into a separate latex document. > > > >>> Can I also write and preview pstricks code in org-mode? > > > >>> > > > >>> Also, can I do "usepackage(xxx)" someway do use LaTeX extensions? > > > >>> > > > >> > > > >> #+LaTeX_HEADER: \usepackage{pstricks} > > > >> > > > >> or something along those lines. > > > >> > > > >> HTH > > > >> > > > >> - Carsten > > > >> > > > >> > > > > > > > [1.2 ] > > > > > > [2 ] > > > _______________________________________________ > > > Emacs-orgmode mailing list > > > Remember: use `Reply All' to send replies to the list. > > > Emacs-orgmode@gnu.org > > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > > [1.2 ] >=20