[pstricks] Problem with pstricks/tex4ht when using \rput

Oliver Körber o.koerber at gmx.de
Wed Sep 28 15:02:24 CEST 2011


Hi all,

as I'm currently authoring a bunch of html files using latex and tex4ht I'm encountering a really strange problem. I've created several images using pstricks within my latex files. Those images contain text, that I placed using the \rput command inside the pspicture environment. When I create the html-files out of my source-files, something strange happens: I only get really really tiny images, about 10x15 pixels that contain a small piece of the picture's lower left corner.

This however does not happen, when I remove the \rput-commands from my source code. As soon as there is no \rput left, my picture is generated exactly the way it should be, without any unwanted cropping. Example:

\documentclass[10pt,twoside]{article}
\usepackage{pst-all}
\begin{document}
\begin{pspicture}(0,0)(5,5)
\psline(0,0)(0,4)
\rput(2,2){\textbf{bla}}
\end{pspicture}
\end{document}

This doesn't work, I just get a few pixels painted black.

\documentclass[10pt,twoside]{article}
\usepackage{pst-all}
\begin{document}
\begin{pspicture}(0,0)(5,5)
\psline(0,0)(0,4)
% \rput(2,2){\textbf{bla}}
\end{pspicture}
\end{document}

As soon as I comment the \rput out, I get a full sized image containing the painted line, exactly as it should be.

I'm using TeXLive 2010 on Mac OS X Lion, I didn't manipulate the packages installed by default. 

I convert using the command ' htlatex test.tex html "" -d/tmp/ '

Additional info:

I tracked down the problem to the execution of the convert utility. I commented out the deletion of the generated postscript files inside the .env file and could look at my zztest.ps file. When I open it with TeXShop, which transforms it to pdf for viewing purposes, everything looks perfectly fine. My generated picture looks exactly the way it should, with the painted line AND the text. Whenever I run the convert command to convert the postscript version into the png image the cropping takes place. This also happens when I remove all parameters, only typing ' convert zztest.ps output.png '. So it doesn't have to do with the parameters I suppose

PSTricks says: `PSTricks' v2.08  <2010/06/06> (tvz)
ImageMagick: ImageMagick 6.6.1-3 2010-04-16

Is there any known bug concerning this problem? Can I use another command instead of rput to place my text elements that could perhaps be a workaround?

Thanks in advance for any hint and help.

Oliver


More information about the PSTricks mailing list