Discussion:
[XeTeX] pst-fill boxfill failure when compiling with XeLaTeX
Daniel Greenhoe
2017-06-13 06:00:27 UTC
Permalink
Dear All,

I have been having trouble with the pst-fill package's "boxfill"
(tiling) for some time when compiling with XeLaTeX. In short, I end up
getting the error
"GPL Ghostscript 9.21: Unrecoverable error, exit code 1"

I have upgraded to TeXLive 2017 and updated packages. I am running
this on Windows 7.

Here is a somewhat minimal code example:

\documentclass{standalone}%
\usepackage[tiling]{pst-fill}
\begin{document}%
\psset{unit=10mm}%
\begin{pspicture}(-1,-1)(9,9)%
\psset{fillstyle=solid,linecolor=red,fillcolor=blue,linewidth=2pt}
\psboxfill{%
\begin{pspicture}(0,0)(4,2)%
\psframe(0,0)(4,2)%
\end{pspicture}%
}%
\psframe[linecolor=black,fillstyle=boxfill](0,0)(8,6)%
\end{pspicture}%
\end{document}

If I compile this with latex==>dvips==>ps2pdf,
then I get an acceptable pdf file (see attached test_latex.pdf).

If I compile the code with xelatex, then I get
"GPL Ghostscript 9.21: Unrecoverable error, exit code 1"
and things like
Error: /syntaxerror in -file-
Operand stack:
Box
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- false 1 %stopped_push 2015
1 3 %oparray_pop 2014 1 3 %oparray_pop 1998 1 3
%oparray_pop 1884 1 3 %oparray_pop --nostringval--
%errorexec_pop .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- 2015 1 3
%oparray_pop 2014 1 3 %oparray_pop 1998 1 3
%oparray_pop 1884 1 3 %oparray_pop --nostringval--
%errorexec_pop .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push
Dictionary stack:
--dict:1218/1684(ro)(G)-- --dict:0/20(G)-- --dict:121/200(L)--
--dict:118/200(L)--

However, the log file maybe seems OK (see attached test_xelatex.log).

If I attempt to compile using pdflatex, I get
! Undefined control sequence.
\***@lor@***@ps ->\PSTricks
_Not_Configured_For_This_Format

Any suggestions?

Many thanks in advance ^____^
Dan
Akira Kakuto
2017-06-13 08:12:20 UTC
Permalink
Dear Daniel,

> I have been having trouble with the pst-fill package's "boxfill"
> (tiling) for some time when compiling with XeLaTeX.

pstricks for XeTeX is a limited subset of the full
set for dvips.
Please consider it is happy if pstricks for XeTeX
works ok.

If you need graphics by pstricks in XeTeX, please
create a pdf image for the graphics in other
process by dvips + ps2pdf, and include the image
by XeTeX.

Thanks,
Akira



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Daniel Greenhoe
2017-06-13 21:41:12 UTC
Permalink
Dear Akira,

Thank you for your reply.

> Please consider it is happy if pstricks for XeTeX works ok.

Indeed. I am very happy with and thankful for all the hard work you
and others have done to make quite a large portion of pstricks
available in the XeTeX environment. Thank you all very much.

> If you need graphics by pstricks in XeTeX, please
> create a pdf image for the graphics in other
> process by dvips + ps2pdf, and include the image
> by XeTeX.

Probably the most important reason I would like the XeTeX environment
is because of the unicode font handling and ease of font switching
(when the graphic includes text). However, even in that case, I could
render the graphic with dvips+ps2pdf (as you said) and then apply the
text on top of that using XeTeX.

Thank you again,
Daniel


On Tue, Jun 13, 2017 at 8:12 AM, Akira Kakuto <***@fuk.kindai.ac.jp> wrote:
> Dear Daniel,
>
>> I have been having trouble with the pst-fill package's "boxfill"
>> (tiling) for some time when compiling with XeLaTeX.
>
>
> pstricks for XeTeX is a limited subset of the full
> set for dvips.
> Please consider it is happy if pstricks for XeTeX
> works ok.
>
> If you need graphics by pstricks in XeTeX, please
> create a pdf image for the graphics in other
> process by dvips + ps2pdf, and include the image
> by XeTeX.
>
> Thanks,
> Akira
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Ross Moore
2017-06-13 22:29:47 UTC
Permalink
Hello Daniel,

On 14/06/2017, at 7:45, "Daniel Greenhoe" <***@gmail.com> wrote:

> Probably the most important reason I would like the XeTeX environment
> is because of the unicode font handling and ease of font switching
> (when the graphic includes text). However, even in that case, I could
> render the graphic with dvips+ps2pdf (as you said) and then apply the
> text on top of that using XeTeX.

There are several environments that help with this kind of thing;
e.g., LaTeX's {picture} environment
Tikz
Xy-pic's \xyimport function.

The latter is extremely versatile, as it sets up a coordinate system based on the size of the imported image, without needing to know explicit dimensions.
Then you can use it to go anywhere within the image and use any of Xy-pic's graphic elements to place text, draw lines and arrows in different styles, put frames around parts of the picture, and much more. All this in a coordinate independent way, in case you decide to rescale the imported image, but retain the same font sizes.

>
> Thank you again,
> Daniel


Hope this helps.

Ross


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Daniel Greenhoe
2017-06-15 21:19:31 UTC
Permalink
Hello Roger,

On Tue, Jun 13, 2017 at 10:29 PM, Ross Moore <***@mq.edu.au> wrote:
> There are several environments that help with this kind of thing;
> e.g., ... Xy-pic's \xyimport function.
> The latter is extremely versatile, as it sets up a coordinate system based on the size of the imported image, without needing to know explicit dimensions.

That sounds very interesting and powerful. Thank you for telling me
about it. I may give it a try at some time in the near future.

Dan

On Tue, Jun 13, 2017 at 10:29 PM, Ross Moore <***@mq.edu.au> wrote:
> Hello Daniel,
>
> On 14/06/2017, at 7:45, "Daniel Greenhoe" <***@gmail.com> wrote:
>
>> Probably the most important reason I would like the XeTeX environment
>> is because of the unicode font handling and ease of font switching
>> (when the graphic includes text). However, even in that case, I could
>> render the graphic with dvips+ps2pdf (as you said) and then apply the
>> text on top of that using XeTeX.
>
> There are several environments that help with this kind of thing;
> e.g., LaTeX's {picture} environment
> Tikz
> Xy-pic's \xyimport function.
>
> The latter is extremely versatile, as it sets up a coordinate system based on the size of the imported image, without needing to know explicit dimensions.
> Then you can use it to go anywhere within the image and use any of Xy-pic's graphic elements to place text, draw lines and arrows in different styles, put frames around parts of the picture, and much more. All this in a coordinate independent way, in case you decide to rescale the imported image, but retain the same font sizes.
>
>>
>> Thank you again,
>> Daniel
>
>
> Hope this helps.
>
> Ross
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Akira Kakuto
2017-06-13 23:54:50 UTC
Permalink
Dear Daniel,

> Indeed. I am very happy with and thankful for all the hard work you
> and others have done to make quite a large portion of pstricks
> available in the XeTeX environment.

In the environment of the very recent graphics and
graphics-def, a large portion of pstricks on XeTeX
may not work. I expect that it will be improved soon.

Best,
Akira



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Akira Kakuto
2017-06-14 00:29:54 UTC
Permalink
Dear Daniel,

> Indeed. I am very happy with and thankful for all the hard work ...

Almost all of pstricks on XeTeX was done by
Herbert Voss, S. Miyata, and Denis Girou.

Best,
Akira



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
Loading...