From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51755 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: from latex & pstricks to context Date: Mon, 13 Jul 2009 11:14:52 +0200 Message-ID: References: <20090713095558.7f319385@KUBUNTU64> <20090713110558.663d0d7e@KUBUNTU64> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1589456774==" X-Trace: ger.gmane.org 1247476578 24208 80.91.229.12 (13 Jul 2009 09:16:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 09:16:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 13 11:16:11 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1MQHdq-0008Q4-8a for gctc-ntg-context-518@m.gmane.org; Mon, 13 Jul 2009 11:16:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9536B1FBBA; Mon, 13 Jul 2009 11:16:07 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25188-05; Mon, 13 Jul 2009 11:15:11 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B8C751FB6B; Mon, 13 Jul 2009 11:15:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D073E1FB6B for ; Mon, 13 Jul 2009 11:15:08 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23229-05-7 for ; Mon, 13 Jul 2009 11:14:54 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by ronja.ntg.nl (Postfix) with ESMTP id 3A8AB1FB3C for ; Mon, 13 Jul 2009 11:14:54 +0200 (CEST) Original-Received: from mail-bw0-f207.google.com (mail-bw0-f207.google.com [209.85.218.207]) by filter2-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n6D9Erf8000583 for ; Mon, 13 Jul 2009 11:14:53 +0200 Original-Received: by bwz3 with SMTP id 3so1968062bwz.2 for ; Mon, 13 Jul 2009 02:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ErgVeAXHOfxlDYY9ZTGRlUDr/6BtCxTmyv67/YyyndM=; b=vWqI357mR8CG799XPUH0FLjwkal1dxxosv9YUA0wrb5ZN81logFd9KiImCm5Ln9hdo btyiwwqrh7cjZaTNSPd19oCZtrNbly9R+nRvVI2SrdLOkRlywLJgjTNTTyAQ5E3hbn7Q w0UQ0b0s4AKGfeGSTPASBrsmt/X1qJbvVXmq4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ECxtAb7f7sN/sUZItCi0COPQED3IB6s2y5/MJEOcoePuaInTfF8+2QOb0hDbL0JJaB RGItsNn3CQHyvX92dUYPzsiAl4A3YITKaSvIJ5/LKrMIPZnQPIF294f5B/OwVcnEaGJE AsUDljxMD4g+gAwXulCBn5H8M8JMTJeonNJdQ= Original-Received: by 10.204.119.70 with SMTP id y6mr5014244bkq.72.1247476492677; Mon, 13 Jul 2009 02:14:52 -0700 (PDT) In-Reply-To: <20090713110558.663d0d7e@KUBUNTU64> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.207; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 259867518 - 3735345e27cf - 20090713 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:51755 Archived-At: --===============1589456774== Content-Type: multipart/alternative; boundary=0016e6d588de36354a046e92c1a0 --0016e6d588de36354a046e92c1a0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Mon, Jul 13, 2009 at 11:05 AM, R. Bastian wrote: > What is the sense of \startPSTRICKS ... \stopPSTRICKS ? > A wrapper around \executesystemcommand, \long\def\dostartPSTRICKS[#1]#2\stopPSTRICKS {\doifelse{\jobsuffix}{dvi} % will some day move to app as switch {\hbox{#2}} {\startTEXapplication[#1]{\usemodule[pstric]}#2\stopTEXapplication}} for \startTEXapplication see page-app.tex \long\def\dostartTEXapplication[#1]#2#3\stopTEXapplication {\bgroup \bgroup \let\f!temporaryextension\c!tex \setbuffer[\@@texapp]% \starttext #2% preamble \startTEXpage[#1]% \topskip\zeropoint \setbox\scratchbox\hbox{#3}% \saveTEXapplication02% dimensions \box\scratchbox \stopTEXpage \stoptext \endbuffer \egroup \doifelse\jobsuffix{dvi}\donetrue\donefalse \executesystemcommand{texexec \bufferprefix\@@texapp.tex --once --batch}% \ifdone % eps \executesystemcommand{dvips -E* -o \@@texapp.eps \@@texapp}% \else % pdf \executesystemcommand{dvips \bufferprefix\@@texapp}% \executesystemcommand{ps2pdf \bufferprefix\@@texapp.ps\bufferprefix\@@texapp.pdf}% % \executesystemcommand{texmfstart pstopdf \bufferprefix\@@texapp.ps\bufferprefix\@@texapp.pdf}% \fi \restoreTEXapplication % dimensions \doifelse\jobsuffix{dvi}\donetrue\donefalse \setbox\scratchbox\hbox {\expanded{\externalfigure [\bufferprefix\@@texapp.\ifdone eps\else pdf\fi] [\c!object=\v!no]}}% \setbox\scratchbox\hbox {\lower\ht\scratchbox\hbox{\raise\dimen2\box\scratchbox}}% \wd\scratchbox\dimen0 \ht\scratchbox\dimen2 \dp\scratchbox\zeropoint \box\scratchbox \egroup} I suppose that works ok in mkii, but maybe not in mkiv so the actually the best way is (imho) make pdf images using traditional way (latex+dvips) and include them by \externalfigure -- luigi --0016e6d588de36354a046e92c1a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Mon, Jul 13, 2009 at 11:05 AM, R. Bas= tian <rbastian@fre= e.fr> wrote:
=C2=A0
What is the sense of \startPSTRICKS ... \stopPSTRICKS ?
A wrapper around \executesystemcommand,

=C2=A0\lon= g\def\dostartPSTRICKS[#1]#2\stopPSTRICKS
=C2=A0 {\doifelse{\jobsuffix}{d= vi} % will some day move to app as switch
=C2=A0=C2=A0=C2=A0=C2=A0 {\hbo= x{#2}}
=C2=A0=C2=A0=C2=A0=C2=A0 {\startTEXapplication[#1]{\usemodule[pst= ric]}#2\stopTEXapplication}}

for \startTEXapplication see
page-app.tex


\long\def\do= startTEXapplication[#1]#2#3\stopTEXapplication
=C2=A0 {\bgroup
=C2=A0=C2=A0 \bgroup
=C2=A0=C2=A0 \let\f!temporaryext= ension\c!tex
=C2=A0=C2=A0 \setbuffer[\@@texapp]%
=C2=A0=C2=A0=C2=A0= =C2=A0 \starttext
=C2=A0=C2=A0=C2=A0=C2=A0 #2% preamble
=C2=A0=C2=A0= =C2=A0=C2=A0 \startTEXpage[#1]%
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \to= pskip\zeropoint
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \setbox\scratchbox\= hbox{#3}%
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \saveTEXapplication02% dimensions
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \box\scratchbox
=C2=A0=C2=A0=C2=A0= =C2=A0 \stopTEXpage
=C2=A0=C2=A0=C2=A0=C2=A0 \stoptext
=C2=A0=C2=A0 \= endbuffer
=C2=A0=C2=A0 \egroup
=C2=A0=C2=A0 \doifelse\jobsuffix{dvi}\= donetrue\donefalse
=C2=A0=C2=A0 \executesystemcommand{texexec \bufferpre= fix\@@texapp.tex --once --batch}%
=C2=A0=C2=A0 \ifdone % eps
=C2=A0=C2=A0=C2=A0=C2=A0 \executesystemcomman= d{dvips -E* -o \@@texapp.eps \@@texapp}%
=C2=A0=C2=A0 \else % pdf
=C2= =A0=C2=A0=C2=A0=C2=A0 \executesystemcommand{dvips \bufferprefix\@@texapp}%<= br>=C2=A0=C2=A0=C2=A0=C2=A0 \executesystemcommand{ps2pdf \bufferprefix\@@texapp.ps \bufferprefix\@@texapp.pdf}%
%=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \executesystemcommand{texmfstart pstopdf \b= ufferprefix\@@texapp.ps \bufferprefix\@@te= xapp.pdf}%
=C2=A0=C2=A0 \fi
=C2=A0=C2=A0 \restoreTEXapplication % dim= ensions
=C2=A0=C2=A0 \doifelse\jobsuffix{dvi}\donetrue\donefalse
=C2=A0=C2=A0 \setbox\scratchbox\hbox
=C2=A0=C2=A0=C2=A0=C2=A0 {\expanded= {\externalfigure
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [\bufferpref= ix\@@texapp.\ifdone eps\else pdf\fi]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 [\c!object=3D\v!no]}}%
=C2=A0=C2=A0 \setbox\scratchbox\hbox=C2=A0=C2=A0=C2=A0=C2=A0 {\lower\ht\scratchbox\hbox{\raise\dimen2\box\scra= tchbox}}%
=C2=A0=C2=A0 \wd\scratchbox\dimen0
=C2=A0=C2=A0 \ht\scratchbox\dimen2=C2=A0=C2=A0 \dp\scratchbox\zeropoint
=C2=A0=C2=A0 \box\scratchbox
= =C2=A0=C2=A0 \egroup}


I suppose that works ok in mkii, but may= be not in mkiv
so the actually the best way is (imho) make pdf images=C2= =A0 using traditional way (latex+dvips)
and include them by \externalfigure

--
luigi

--0016e6d588de36354a046e92c1a0-- --===============1589456774== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1589456774==--