[l2h] Another pstricks question
Ross Moore
ross at maths.mq.edu.au
Wed Dec 1 07:30:14 CET 2004
On 01/12/2004, at 12:38 PM, Mark Horner wrote:
> Hi Ross
>
> Thanks very much for the explanation and solution. I have tried a few
> of them and things look fine.
That's good.
Try simply putting the following in the document preamble:
\usepackage{html}
\begin{imagesonly}
\let\PSTpspicture\pspicture
\let\PSTendpspicture\endpspicture
\def\HTMLpspicture{\begingroup\setbox0=\hbox\bgroup\PSTpspicture}
\def\HTMLendpspicture{\PSTendpspicture\egroup\colorbox{white}{\box0}\end
group}
\let\pspicture\HTMLpspicture
\let\endpspicture\HTMLendpspicture
\end{imagesonly}
This obviates the need to explicitly put in the \framebox (or
\colorbox{white}{....} )
around every {pspicture}.
The code rebinds \pspicture to first set the picture's contents within
a temporary
box-register (in fact within \box0 ) before putting a white rectangle
under it,
via the \colorbox{white}{\box0} .
It all happens inside a \begingroup .... \endgroup to preserve any
previous
contents of \box0 . So there may be problems with any \label, \index or
similar
commands within the {pspicture} creating flags to be accessed from
outside it.
But that's a pretty rare thing, that probably doesn't work in
LaTeX2HTML anyway.
Also, it only happens when using LaTeX2HTML via the {imagesonly}
environment
construction, from the {html} package.
>
> I really appreciate the help as you've saved me a tremendous amount of
> work :-D
This little hack may save you some more. :-)
Cheers
Ross
>
> Thanks again,
>
> Mark
>
More information about the latex2html
mailing list