[pdftex] pdftricks problem in \parbox?
Troy Goodson
Troy.D.Goodson at jpl.nasa.gov
Fri May 2 14:33:41 CEST 2003
On Friday, May 2, 2003, at 12:02 PM, Radhakrishnan CV wrote:
>>>>>> "Troy" == Troy Goodson <Troy.D.Goodson at jpl.nasa.gov> writes:
>
> Troy> I tried to wrap a \begin{pdfpic} ... \end{pdfpic} in a
> Troy> \parbox (or even an \fbox}, but I get an error (see below).
> Troy> Also, the example-fig1.tex file is empty.
>
> pdftricks provides this facility even now. It seems that you haven't
> read the manual (see p. 7 of the manual).
>
> \configure[pdfgraphic][width=<dimen>, % width
> linecolor=<color>, % color of the rule
> linewidth=<dimmen>,% width of rule
> background=<color>,% background color
> rulesep=<dimen>] % fboxsep
> Best.
>
> Radhakrishnan
I did read the manual, but I'm not savvy enough to understand it. I
didn't realize that the \configure[pdfgraphic] command would give me a
\parbox.
I want the pdftricks graphic side-by-side with an itemized list on the
left-hand side of the page. Before using pdftricks, I was doing this
with \parbox commands. With pdftricks, I still can't seem to get it to
work.
After some trial and error, it seems that the \configure[pdfgraphic]
command goes before the \begin{document} command. My first thought was
to put it after the \begin{pdfpic} command, but that doesn't seem to
work.
Anyway, my revised pdfLaTeX code is below. The \configure command
seems to work, but the graphic ends up _after_ the itemized list (in
this example, on page 2!). How can I get them to be side-by-side ?
---------example.tex------------
\documentclass[landscape]{slides}
\usepackage{ifthen}
\usepackage{pdftricks}
\begin{psinputs}
\usepackage{pstricks}
\usepackage{ifthen}
\usepackage{pst-eps}
\usepackage{pst-plot}
\usepackage{pst-node}
\usepackage{pstcol}
\end{psinputs}
% workaound for pdftricks with slides
\def\BeforeIncludedStream
{\stepcounter{psfig}\xdef\PDFCutFile{\PDFTfigname.tex}%
\message{Opening PDFStream=\PDFCutFile}%
\immediate\openout\PDFStream=\PDFCutFile
\immediate\write\PDFStream{\string\documentclass{slides}}
\immediate\write\PDFStream{\string\input\space tmp.inputs}
\immediate\write\PDFStream{\string\pagestyle{empty}}
\immediate\write\PDFStream{\string\usepackage{amssymb,amsbsy}}
\immediate\write\PDFStream{\string\begin{document}}
\let\ThisStream\WriteStreamLine}
\configure[pdfgraphic][width=2in, % width
linecolor=blue, % just a test
linewidth=1pt, % width of rule
background=red,% just a test
rulesep=1pt] % fboxsep
\begin{document}
\begin{slide}
\parbox{.4\linewidth}{
\begin{itemize}
\item text1
\item text2
\item text3
\item text4
\end{itemize}
}
\hfill
\vrule
\begin{pdfpic}
\newcommand{\elang}{ 123 }
\ifthenelse{ \elang > 90 }
{ \newcommand{ \flipptg}{-1} }
{ \newcommand{ \flipptg}{ 1} }
\fbox{
\begin{pspicture}(-.2,-.5)(5,8.5)
\rput(1,0){\rnode{EAR}{\small Earth}}
\rput(1,4){ \rnode{SC}{\small S/C} }
\rput{ \elang }(1,4){
\fbox{
\begin{pspicture}(-1,-1)(1,1)
\rput(0,-3){ \fbox{
\begin{pspicture}(-1,-1)(1,1)
\rput{-90}(0,0) {\rnode{DV}{}}
\rput{-90}(0,-1){\rnode{MAG}{}}
\rput( \flipptg ,0){\rnode{PTG}{}}
\end{pspicture}
} }
\end{pspicture}
}
}
\ncline{->}{SC}{DV}
\ncLine{->}{DV}{MAG}
\ncline{->}{DV}{PTG}
\ncangle[angleA=90,angleB=180,linestyle=dashed]{EAR}{MAG}
\ncangle[angleA=90,angleB=180,linestyle=dashed]{EAR}{DV}
\ncangle[angleA=90,angleB=180,linestyle=dashed]{EAR}{PTG}
\ncline{SC}{EAR}
\end{pspicture}
}
\end{pdfpic}
\end{slide}
\end{document}
More information about the pdftex
mailing list