From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85468 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: pstrics module again Date: Mon, 25 Nov 2013 18:45:06 -0500 (EST) Message-ID: References: <5293A2C0.3060904@FU-Berlin.DE> <5293B2F9.1010007@FU-Berlin.DE> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1385423118 7064 80.91.229.3 (25 Nov 2013 23:45:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Nov 2013 23:45:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 26 00:45:25 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vl5qF-0008SM-T4 for gctc-ntg-context-518@m.gmane.org; Tue, 26 Nov 2013 00:45:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7CAE101FF; Tue, 26 Nov 2013 00:45:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CvLmcVCYa+Mt; Tue, 26 Nov 2013 00:45:20 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 662C410200; Tue, 26 Nov 2013 00:45:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8CB5310200 for ; Tue, 26 Nov 2013 00:45:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ChmkqrLYswk6 for ; Tue, 26 Nov 2013 00:45:17 +0100 (CET) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 0B6B9101FF for ; Tue, 26 Nov 2013 00:45:16 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAPNo1a2018131 for ; Tue, 26 Nov 2013 00:50:07 +0100 Original-Received: FROM Decentralized.ECE.McGill.CA (Decentralized.ECE.McGill.CA [132.206.69.142]) By hellskitchen.mr.itd.umich.edu ID 5293E103.B83F6.17472 ; Authuser adityam; 25 Nov 2013 18:45:07 EST In-Reply-To: User-Agent: Alpine 2.03 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04KRXO1iA - b0b8a89471db - 20131126 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85468 Archived-At: On Mon, 25 Nov 2013, DesdeChaves wrote: > I d'ont know how to fix the picture size. > No errors at all, but the figure size isn't correct. Confirmed. > \usemodule[pstric] > > \starttext > > Hydrogen spectrum > > \startPSTRICKS > \input pst-spectra.tex > \input pstricks-add.tex > \pspicture(0,-2.5)(\textwidth,1.6) > \psspectrum[element=H, emission](0,0)(\textwidth,1.5) > \rput(2,1){Hydrogen spetrum} > \endpspicture > \stopPSTRICKS > > \stoptext The proper interface is \usemodule[pstricks] \usePSTRICKSmodule[pst-add] \usePSTRICKSmodule[pst-spectra] When you run the above file, ConTeXt creates the following temp file: \starttext \pushcatcodetable \setcatcodetable\texcatcodes \usemodule[pstric] \readfile{pst-add}{}{} \readfile{pst-spectra}{}{} \popcatcodetable \startTEXpage \hbox\bgroup \ignorespaces \pspicture(0,-2.5)(\textwidth,1.6) \psspectrum[element=H, emission](0,0)(\textwidth,1.5) \rput(2,1){Hydrogen spetrum} \endpspicture \removeunwantedspaces \egroup \obeydepth % temp hack as we need to figure this out \stopTEXpage \stoptext runs ""mtxrun --script texexec %s --once --dvips " and then runs "ps2pdf inputname outputname" but that generates the file with the wrong size. dvips gives the following error message: ' TeX output 2013.11.25:1841' -> test-pstricks-0001.ps Page 1 may be too complex to print dvips: no match for special paper size found; using default (and that is the reason for the wrong paper size). It has been years since I used dvips, so I don't remember how to correct that. Basically, the "bug" is with the following file: \starttext \startTEXpage What will happen now \stopTEXpage \stoptext Process using "mtxrun --script test --dvips" and then "ps2pdf" and the resulting pdf file has the wrong bounding box. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________