[pstricks] Re: Migrating PSTricks \pslongbox macro use to pdflatex via ps4pdf
Herbert Voss
Herbert.Voss at gmx.net
Fri Jul 16 22:16:34 CEST 2004
abhi wrote:
> I have a large document which makes heavy use of PSTricks. I have been
> able to use the ps4pdf package and its \PSforPDF macro to convert most
> of the PSTRicks macros to work with pdflatex. However, I am stuck on
> how to do convert over the \pslongbox macro which I make extensive use
> of. I use pslongbox to create different layout environments or Lemmas,
> exercises, remarks etc. An example is
>
> \pslongbox{MyLemma}{\psshadowbox[shadowcolor=gray,shadowsize=.15in,framearc=.3
> ,framesep=10pt]}
>
> This allows me to create a framed lemma using
>
> \begin{MyLemma}
>
> Lemma 1: blah blah blah
> blah blah
>
> \end{MyLemma}
>
> I cannot figure out the correct way to use \PSforPDF with \pslongbox
> to make this work for pdflatex. Neither
>
> \PSforPDF{\pslongbox{MyLemma}{\psshadowbox[shadowcolor=gray,shadowsize=.15in,framearc=.3},framesep=10pt]}}
>
> nor
>
> \pslongbox{MyLemma}{\PSforPDF{\psshadowbox[shadowcolor=gray,shadowsize=.15in,framearc=.3},framesep=10pt]}}
>
> work - and I can see why. Any suggestions on what the correct usage
> might be? Do I need to create the MyLemma environment in a different
> way?
here is an example with a variable parbox, you can ignore
the package varwidth if you have only one line.
ps4pdf can not deal with empty lines, put a % in the
first column
Herbert
\documentclass[a4paper,12pt]{article}
\usepackage{varwidth}
\usepackage{ps4pdf}
\PSforPDF{
\usepackage{pstricks}
\psset{shadowcolor=gray,shadowsize=.15in,framearc=.3,framesep=10pt}
\pslongbox{MyLemma}{\psshadowbox}
}
\begin{document}
This allows me to create a framed lemma using
\PSforPDF{
\begin{MyLemma}
\begin{varwidth}{\linewidth}
Lemma 1: blah blah blah\\
blah blah
\end{varwidth}
\end{MyLemma}
}
\end{document}
--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
More information about the PSTricks
mailing list