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 <filename>"
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
___________________________________________________________________________________

Reply via email to