From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: from latex & pstricks to context
Date: Mon, 13 Jul 2009 11:14:52 +0200 [thread overview]
Message-ID: <fe8d59da0907130214q717ba3b2q28af2c9f7e21619@mail.gmail.com> (raw)
In-Reply-To: <20090713110558.663d0d7e@KUBUNTU64>
[-- Attachment #1.1: Type: text/plain, Size: 1912 bytes --]
On Mon, Jul 13, 2009 at 11:05 AM, R. Bastian <rbastian@free.fr> 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
[-- Attachment #1.2: Type: text/html, Size: 2719 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2009-07-13 9:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 7:55 R. Bastian
2009-07-13 8:11 ` luigi scarso
2009-07-13 9:05 ` R. Bastian
2009-07-13 9:09 ` luigi scarso
2009-07-13 8:19 ` Wolfgang Schuster
2009-07-13 8:40 ` luigi scarso
2009-07-13 9:05 ` R. Bastian
2009-07-13 9:14 ` luigi scarso [this message]
2009-07-13 9:23 ` Wolfgang Schuster
2009-07-13 9:37 ` luigi scarso
2009-07-13 9:50 ` Wolfgang Schuster
2009-07-13 9:53 ` Taco Hoekwater
2009-07-13 10:02 ` luigi scarso
2009-07-13 15:12 ` R. Bastian
2009-07-13 16:03 ` luigi scarso
2009-07-13 19:22 ` R. Bastian
2009-07-13 21:01 ` Wolfgang Schuster
2009-07-13 9:20 ` Wolfgang Schuster
2009-07-13 9:21 ` Vafa Khalighi
2009-07-13 8:46 ` Mojca Miklavec
2009-07-13 9:23 ` R. Bastian
2009-07-13 9:47 ` Mojca Miklavec
2009-07-13 9:53 ` Mojca Miklavec
2009-07-13 10:29 ` Renaud Aubin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe8d59da0907130214q717ba3b2q28af2c9f7e21619@mail.gmail.com \
--to=luigi.scarso@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).