fhsst-authors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fhsst-authors] Re: [l2h] Another pstricks question


From: Ross Moore
Subject: [Fhsst-authors] Re: [l2h] Another pstricks question
Date: Wed, 1 Dec 2004 17:30:14 +1100


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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]