Could someone tell me how to install and use PSTricks in Context Many Thanks Jeroen
On Sun, Dec 14, 2014 at 6:45 PM, context context wrote:
Could someone tell me how to install and use PSTricks in Context
First of all try to figure out if you could use MetaPost or TikZ instead. Either of them is a lot more "pdf-friendly". Unless you still work with MkII and go via dvi->ps->pdf, you need to compile the PSTricks graphic separately into DVI, then PS, then PDF, and include the final graphic into the document. While ConTeXt macros can do that for you, it's still very ugly. Unless you have a very very very strong reason to use PSTricks, you would be better off with other solutions. In any case PSTricks isn't supported in the standalone distribution, so you need to use TeX Live. This is (probably) the proper syntax to get it running: \usemodule[pstricks] \starttext \startPSTRICKS \psline(0,0)(3,3) \stopPSTRICKS \stoptext But for MkII you need to enable unrestricted write18, else you end up with runsystem(texexec test-texapp.tex --once --batch)...disabled (restricted). runsystem(dvips test-texapp)...disabled (restricted). runsystem(ps2pdf test-texapp.ps test-texapp.pdf)...disabled (restricted). (and maybe then it won't work anyway) and for MkIV it currently fails to work as well: (/usr/local/texlive/2014/texmf-dist/tex/generic/pst-tools/pst-tools.tex `PST-tools' v0.05, 2014/05/12 (hv)) v1.63, 2014/06/24 (tvz,hv)) pstricks : loading colors from colo-rgb ! I can't find file `colo-rgb'. \loadpstrickscolors ...g colors from #1}\input #1 \relax \popmacro \dodefine... l.47 ...s}{using indirect method; enable write18}} (Press Enter to retry, or Control-D to exit) Mojca
Am 15.12.2014 um 09:13 schrieb Mojca Miklavec:
(and maybe then it won't work anyway) and for MkIV it currently fails to work as well:
(/usr/local/texlive/2014/texmf-dist/tex/generic/pst-tools/pst-tools.tex `PST-tools' v0.05, 2014/05/12 (hv)) v1.63, 2014/06/24 (tvz,hv)) pstricks : loading colors from colo-rgb ! I can't find file `colo-rgb'. \loadpstrickscolors ...g colors from #1}\input #1 \relax \popmacro \dodefine... l.47 ...s}{using indirect method; enable write18}}
(Press Enter to retry, or Control-D to exit)
for mkiv read: http://www.ntg.nl/pipermail/ntg-context/2014/079514.html Herbert
On Mon, Dec 15, 2014 at 9:28 AM, Herbert Voss wrote:
Am 15.12.2014 um 09:13 schrieb Mojca Miklavec:
(and maybe then it won't work anyway) and for MkIV it currently fails to work as well:
(/usr/local/texlive/2014/texmf-dist/tex/generic/pst-tools/pst-tools.tex `PST-tools' v0.05, 2014/05/12 (hv)) v1.63, 2014/06/24 (tvz,hv)) pstricks : loading colors from colo-rgb ! I can't find file `colo-rgb'. \loadpstrickscolors ...g colors from #1}\input #1 \relax \popmacro \dodefine... l.47 ...s}{using indirect method; enable write18}}
(Press Enter to retry, or Control-D to exit)
for mkiv read:
Ah. I was running ConTeXt from TL 2014, but I was looking at the sources from the latest distribution where the problem has already been fixed. That confused me. Anyway, the version in TeX Live now runs, but creates wrong results (it prints out "(0,0)(3,3)" instead of drawing the line for example). (And I'm not too eager to add support for PSTricks to the distribution. It's a "can of worms" with zillion of other utilities that we don't ship. And close-to-zero users.) Mojca
Am 15.12.2014 um 09:55 schrieb Mojca Miklavec:
Anyway, the version in TeX Live now runs, but creates wrong results (it prints out "(0,0)(3,3)" instead of drawing the line for example).
(And I'm not too eager to add support for PSTricks to the distribution. It's a "can of worms" with zillion of other utilities that we don't ship. And close-to-zero users.)
huh?? The only problem is this line \loadpstrickscolors{colo-rgb}} as mentioned in my mail. Herbert
On Mon, Dec 15, 2014 at 12:53 PM, Herbert Voss
Am 15.12.2014 um 09:55 schrieb Mojca Miklavec:
Anyway, the version in TeX Live now runs, but creates wrong results
(it prints out "(0,0)(3,3)" instead of drawing the line for example).
(And I'm not too eager to add support for PSTricks to the distribution. It's a "can of worms" with zillion of other utilities that we don't ship. And close-to-zero users.)
huh?? The only problem is this line
\loadpstrickscolors{colo-rgb}}
as mentioned in my mail.
Herbert
If we have a postscript interpreter, Is it possible to avoid dvi2ps at all,
using only a context mkiv ? -- luigi
On Mon, Dec 15, 2014 at 9:46 PM, Herbert Voss
Am 15.12.2014 um 14:06 schrieb luigi scarso:
If we have a postscript interpreter, Is it possible to avoid dvi2ps at all, using only a context mkiv ?
Yes, that could be possible.
It would be interesting (well, at least for me)
to have a "how to" --- if only for a specific pst module known to work with mkiv. -- luigi
On Tue, Dec 16, 2014 at 1:27 PM, luigi scarso
On Mon, Dec 15, 2014 at 9:46 PM, Herbert Voss
wrote: Am 15.12.2014 um 14:06 schrieb luigi scarso:
If we have a postscript interpreter, Is it possible to avoid dvi2ps at all, using only a context mkiv ?
Yes, that could be possible.
It would be interesting (well, at least for me)
to have a "how to" --- if only for a specific pst module known to work with mkiv.
I have done something here
https://foundry.supelec.fr/scm/viewvc.php/trunk/ghostscript/9.15/?root=swigl... using barcode.ps from http://bwipp.terryburton.co.uk/ -- luigi
On Mon, Dec 15, 2014 at 12:53 PM, Herbert Voss wrote:
Am 15.12.2014 um 09:55 schrieb Mojca Miklavec:
Anyway, the version in TeX Live now runs, but creates wrong results (it prints out "(0,0)(3,3)" instead of drawing the line for example).
(And I'm not too eager to add support for PSTricks to the distribution. It's a "can of worms" with zillion of other utilities that we don't ship. And close-to-zero users.)
huh?? The only problem is this line
\loadpstrickscolors{colo-rgb}}
as mentioned in my mail.
The problem is that this is not the only problem ;) Or at least that didn't solve all the problems for me. First of all I had to use Kakuto-san's example, adding something like \pspicture(0mm,0mm)(30mm,30mm) ... \endpspicture in front and at the back (which is extremely ugly to see in ConTeXt). So the complete minimal example was: \usemodule[pstricks] \starttext \startPSTRICKS \pspicture(0mm,0mm)(30mm,30mm) \psline(0,0)(3,3) \endpspicture \stopPSTRICKS \stoptext However that still doesn't work with TeX Live 2014 even after fixing the issue with mkii in the filename: ! Missing } inserted. <inserted text> } <to be read again> \endgroup \endpspicture ...]\fi \fi \pst@killglue \endgroup \egroup \ifdim \wd \pst@hb... l.12 \endpspicture According to Kakuto-san it works with the latest ConTeXt, but I need a bit of tweaking to try it out and even if it does users would need to install (at least part of) W32TeX, wait for TLContrib to release a newer version of ConteXt or tweak themselves in order to try it out. Mojca
Am 15.12.2014 um 15:27 schrieb Mojca Miklavec:
First of all I had to use Kakuto-san's example, adding something like
\pspicture(0mm,0mm)(30mm,30mm) ... \endpspicture
in front and at the back (which is extremely ugly to see in ConTeXt).
I see, \tikzpicture .. \endtikzpicture looks nicer ;-) Herbert
On Mon, Dec 15, 2014 at 9:45 PM, Herbert Voss wrote:
Am 15.12.2014 um 15:27 schrieb Mojca Miklavec:
First of all I had to use Kakuto-san's example, adding something like
\pspicture(0mm,0mm)(30mm,30mm) ... \endpspicture
in front and at the back (which is extremely ugly to see in ConTeXt).
I see,
\tikzpicture .. \endtikzpicture
looks nicer ;-)
Well, that also, but in that case it would be \starttikzpicture ... \stoptikzpicture. The pairs \tikzpicture ... \endtikzpicture and \pspicture ... \endpspicture are plain TeX commands. I would expect from ConTeXt to support \startpspicture ... \stoppspicture out of the box (if it supported PST properly). Mojca
On Mon, 15 Dec 2014, Mojca Miklavec wrote:
On Mon, Dec 15, 2014 at 9:45 PM, Herbert Voss wrote:
Am 15.12.2014 um 15:27 schrieb Mojca Miklavec:
First of all I had to use Kakuto-san's example, adding something like
\pspicture(0mm,0mm)(30mm,30mm) ... \endpspicture
in front and at the back (which is extremely ugly to see in ConTeXt).
I see,
\tikzpicture .. \endtikzpicture
looks nicer ;-)
Well, that also, but in that case it would be \starttikzpicture ... \stoptikzpicture. The pairs \tikzpicture ... \endtikzpicture and \pspicture ... \endpspicture are plain TeX commands.
I would expect from ConTeXt to support
\startpspicture ... \stoppspicture
out of the box (if it supported PST properly).
This is a minor issue that can be easily fixed by a few lines of wrapper code in m-pstricks. pstricks relies on other parts of the tex ecosystem (a tex.pro file IIRC, and some binaries) that are not shipped with ConTeXt standalone. It will be great if MKIV supports pstricks out of the box. There are some very nice pstricks packages that are hard (and time consuming) to replicate. Aditya
On Mon, 15 Dec 2014 21:45:52 +0100
Herbert Voss
Am 15.12.2014 um 15:27 schrieb Mojca Miklavec:
First of all I had to use Kakuto-san's example, adding something like
\pspicture(0mm,0mm)(30mm,30mm) ... \endpspicture
in front and at the back (which is extremely ugly to see in ConTeXt).
I see,
\tikzpicture .. \endtikzpicture
looks nicer ;-)
No, but \startMPcode draw origin--(1,1) scaled 30mm ; \stopMPcode DOES look nicer ;-)
On Mon, Dec 15, 2014 at 3:27 PM, Mojca Miklavec < mojca.miklavec.lists@gmail.com> wrote:
On Mon, Dec 15, 2014 at 12:53 PM, Herbert Voss wrote:
Am 15.12.2014 um 09:55 schrieb Mojca Miklavec:
Anyway, the version in TeX Live now runs, but creates wrong results (it prints out "(0,0)(3,3)" instead of drawing the line for example).
(And I'm not too eager to add support for PSTricks to the distribution. It's a "can of worms" with zillion of other utilities that we don't ship. And close-to-zero users.)
huh?? The only problem is this line
\loadpstrickscolors{colo-rgb}}
as mentioned in my mail.
The problem is that this is not the only problem ;)
Or at least that didn't solve all the problems for me.
First of all I had to use Kakuto-san's example, adding something like
\pspicture(0mm,0mm)(30mm,30mm) ... \endpspicture
in front and at the back (which is extremely ugly to see in ConTeXt).
So the complete minimal example was:
\usemodule[pstricks] \starttext \startPSTRICKS \pspicture(0mm,0mm)(30mm,30mm) \psline(0,0)(3,3) \endpspicture \stopPSTRICKS \stoptext
However that still doesn't work with TeX Live 2014 even after fixing the issue with mkii in the filename:
! Missing } inserted. <inserted text> } <to be read again> \endgroup \endpspicture ...]\fi \fi \pst@killglue \endgroup \egroup \ifdim \wd \pst@hb... l.12 \endpspicture
According to Kakuto-san it works with the latest ConTeXt, but I need a bit of tweaking to try it out and even if it does users would need to install (at least part of) W32TeX, wait for TLContrib to release a newer version of ConteXt or tweak themselves in order to try it out.
Mojca
I have downloaded cont-mpd.zip cont-ppc.zip cont-tmf.zip and unzipped them into texmf-dist of my 2014 TL (and rebuilt the formats and ls-R). I have tried mtxrun --script update but it fails with resolvers | tds | no 'texmf-linux-64' under tree '/opt/luatex/texlive/2014/tex' (with a missed newline in my linux box) The example works if one copies colo-rgb.mkii as colo-rgb.tex in the same folder of the example so I guess that we need to find a suitable location for colo-rgb.tex in the tds (I dont know if it's safe to add colo-rgb.tex to the base folder of context, but I suspect it is not) -- luigi
participants (6)
-
Aditya Mahajan
-
Alan BRASLAU
-
context context
-
Herbert Voss
-
luigi scarso
-
Mojca Miklavec