From: tvz@zandtwerk.Princeton.EDU (Timothy Van Zandt)
Newsgroups: comp.text.tex
Subject: Bug in poster.tex.
Date: 20 Dec 92 18:38:45 GMT
Organization: Princeton University
Originator: news@nimaster

There is a bug in poster.tex/poster.sty. Until the next
release of PSTricks, the following line is needed:

\def\pst@@getlength#1#2{%
  \pssetlength\pst@dimg{#1}\edef#2{\number\pst@dimg sp}}

A complete distribution is appended for those who didn't get it
the first time around.

Tim


%% BEGIN poster.tex.
%%
%% For printing posters and banners with PSTricks.
%%
\def\fileversion{0.93-beta}
\def\filedate{92/12/13}
%%
%% COPYRIGHT 1992, by Timothy Van Zandt, tvz@Princeton.EDU
%% See pstricks.tex or pstricks.doc for copying restrictions.
%%
%%
\ifx\BannerAt\relax\expandafter\endinput\fi

\ifx\pstricksloaded\relax\else\input pstricks.tex \fi

\edef\BannerAt{\the\catcode`\@}
\catcode`\@=11

% This will be part of PSTricks v0.93:
\def\pst@@getlength#1#2{%
  \pssetlength\pst@dimg{#1}\edef#2{\number\pst@dimg sp}}

\newbox\poster@box

\def\psset@hoffset#1{\pst@@getlength{#1}\psk@hoffset}
\psset@hoffset{.25in}
\def\psset@voffset#1{\pst@@getlength{#1}\psk@voffset}
\psset@voffset{.25in}
\def\psset@imagewidth#1{\pst@@getlength{#1}\psk@imagewidth}
\psset@imagewidth{8in}
\def\psset@imageheight#1{\pst@@getlength{#1}\psk@imageheight}
\psset@imageheight{10.5in}

{\catcode`\p=12\catcode`\t=12\gdef\@@inv@@mag#1pt#2{\def#2{#1}}}

\def\psposter{\def\pst@par{}\pst@object{psposter}}

\long\def\psposter@i#1{%
  \begingroup
    \global\setbox\poster@box\box\voidb@x
    \output{\global\setbox\poster@box\box\@cclv}%
    \par\hbox{}\penalty-10000
  \endgroup
  \begingroup
    \ifvoid\poster@box\else
      \dp\poster@box\z@ \ht\poster@box\z@ \wd\poster@box\z@
    \fi
    \pst@makebox{#1}%
    \use@par
    \ifnum\mag=1000
      \def\pst@tempa{}%
    \else
      \pst@dima=1000pt
      \divide\pst@dima\mag
      \expandafter\@@inv@@mag\the\pst@dima\pst@tempa
    \fi
    \pst@dimc=\psk@hoffset\relax
    \hoffset=-1in
    \advance\hoffset\pst@dimc
    \pst@dimd=\psk@voffset\relax
    \voffset=-1in
    \advance\voffset\pst@dimc
    \hoffset=\pst@tempa\hoffset
    \voffset=\pst@tempa\voffset
    \edef\psk@hoffset{\pst@number\pst@dimc}%
    \edef\psk@voffset{\pst@number\pst@dimd}%
    \if@star
      \pst@dimc=8pt
      \pst@dimc=\pst@tempa\pst@dimc
      \edef\pst@tempc{\pst@number\pst@dimc}%
    \fi
    \pst@dima=\psk@imagewidth\relax
    \pst@dimb=\psk@imageheight\relax
    \pst@dima=\pst@tempa\pst@dima
    \pst@dimb=\pst@tempa\pst@dimb
    \pst@dimd=\ht\pst@boxa
    \count\z@=\z@
    \psposter@ii
  \endgroup}

\def\psposter@ii{%
  \ifdim\pst@dimd>.1pt
    \ht\pst@boxa=\pst@dimd
    \pst@dimc=\z@
    \advance\count\z@ 1
    \count1=\z@
    \psposter@iii
    \advance\pst@dimd-\pst@dimb
    \expandafter\psposter@ii
  \fi}

\def\psposter@iii{%
  \begingroup
    \advance\pst@dimc .1pt
    \ifnum\pst@dimc<\wd\pst@boxa
      \endgroup
      \advance\count1 by 1
      \shipout\hbox{%
        \ifvoid\poster@box\else\box\poster@box\fi
        \raise\ht\pst@boxa\hbox{\pst@Verb{%
          /x \psk@hoffset def
          /y \psk@voffset def
          /w \pst@number\pst@dima def
          /h \pst@number\pst@dimb def
          /mtrxc CM def
          \tx@STV CP translate
          \if@star\psposter@iv\fi
          0 0 moveto w 0 rlineto 0 h neg rlineto w neg 0 rlineto
          closepath clip newpath
          0 0 moveto mtrxc setmatrix}}%
        \kern-\pst@dimc
        \copy\pst@boxa
        \pstVerb{currentpoint initclip moveto}}%
      \advance\pst@dimc\pst@dima
      \expandafter\psposter@iii
    \else
      \endgroup
    \fi}

\def\psposter@iv{%
  /m \the\count\z@\space def
  /n \the\count1 \space def
  /s ( ) def
  gsave
  0 setgray
  /a { x 0 rlineto 0 y rlineto x neg 0 rlineto closepath fill } def
  newpath
  x neg 0 moveto a
  w 0 moveto a
  x neg h y add neg moveto a
  w h y add neg moveto a
  1 setgray
  /Helvetica findfont \pst@tempc dup 4 div /z ED scalefont setfont
  gsave
    0 0 moveto 90 rotate z z rmoveto m 1 sub s cvs show (-) show
    n 1 sub s cvs show
  grestore
  gsave
    w 0 moveto z z rmoveto m 1 sub s cvs show (-) show n s cvs show
  grestore
  gsave
    0 h neg moveto 180 rotate z z rmoveto m s cvs show (-) show
    n 1 sub s cvs show
  grestore
  gsave
    w h neg moveto -90 rotate z z rmoveto m s cvs show (-) show n s cvs show
  grestore
  grestore }

\catcode`\@=\BannerAt\relax
\let\BannerAt\relax
\endinput
%%
%% END poster.tex


%% BEGIN: poster.sty
\input poster.tex
\endinput
%% END: poster.sty

%% BEGIN poster1.doc
%%
%% Documentation and sample for poster.tex/poster.sty.
%% Run with LaTeX, with or without the NFSS.
%%
%% See also the capitalized instructions below.

\documentstyle[pstricks]{article}

\input poster.tex  % Input this here to get right fileversion and date.

\newdimen\truein

%% UNCOMMENT ONE AND ONLY ONE OF THE NEXT TWO LINES.
%%   THE FIRST IS FOR PRINTING ON A SINGLE PAGE.
%%   THE SECOND IS FOR MAKING A FOUR-PAGE POSTER.

%\mag \magstep 1 \truein=.5truein
\mag \magstep5 \truein=1truein

% Short meta (works in verbatim. Can't use < for other purposes.
\catcode`\<=13 \def<#1>{{\rm\it #1\/}}    % <meta> (works in verbatim)

% Short verbatim.
\catcode`\"=13
\def"{\verb"}

\catcode`\@=12  % In case I'm using AmS-LaTeX

\begin{document}

\newbox\mybox
\setbox\mybox=\hbox{%
\begin{minipage}{15\truein}
  \parskip 3pt
  \begin{center}
  \begingroup \bf
   Documentation for poster.tex/poster.sty\\[2pt]
   Making posters and banners with PSTricks
   \endgroup\\[4pt]
   Version \fileversion, \filedate\\[4pt]
   Timothy Van Zandt\\
   tvz@Princeton.EDU
  \end{center}
  
 "poster.tex/poster.sty" is a supplement to the PSTricks package that contains
a single macro for making posters or banners:
\begin{verbatim}
    \psposter*[<par>]{<stuff>}
\end{verbatim}
 <stuff> is put in an "\hbox" and then printed on as many sheets of paper as
are needed. You can then construct the poster or banner by piecing together
the sheets of paper.

 "\psposter" has four special parameters: "hoffset", "voffset", "imagewidth"
and "imageheight". These should all be PSTricks dimensions.\footnote{If your
document is magnified, use the actual values and do not use ``true'' units;
poster.tex takes into account any magnification.}
 
 Most printers cannot print right up to the edge of the paper. "\psposter"
starts each page "hoffset" from the left and "voffset" from the top of the
paper. The size of the image on each page is "imagewidth" by "imageheight".

The defaults are
\begin{verbatim}
    hoffset=.25in, voffset=.25in, imagewidth=8in, imageheight=10.5in
\end{verbatim}
 which are good for printing on 8.5in by 11in paper in portrait mode with
quarter-inch margins.

 The starred version puts black squares in the corners of the margins to help
you see where to join the papers.

This documentation was done with
\begin{verbatim}
    \mag \magstep5   % Makes everything big
    \begin{document}
    \psposter*{\begin{minipage}{15truein}
    \end{minipage}}
    \end{document}
\end{verbatim}
(See "poster.doc" if you want to know the truth.)

 The following would make a long banner in landscape mode on 8.5in by 11in
paper:
\begin{verbatim}
    \special{landscape}  % This works with Rokicki's dvips
    \begin{document}
    \psposter*[imagewidth=10.5in,imageheight=8in]%
      {\vbox to 8in{\vss\scaleboxto(0pt,7.5in){Animals}\vss}}
    \end{document}
\end{verbatim}
 Since I used "\scaleboxto" to make everything big, this works best with
outline (PostScript) fonts. I made ``Animals'' 7.5 inches high and then
vertically centered it in an 8-inch high box so that characters that extend
beyond their supposed sizes wouldn't get clipped.
\end{minipage}}

\psposter*{\vbox to 21\truein{\vss\hbox to 16\truein{\hss
  \psframebox[framesep=7pt]{\box\mybox}\hss}\vss}}

\end{document}
%%
%% END poster1.doc

%% BEGIN poster2.doc
%%
%% A sample file for poster.tex/poster.sty. Makes a banner.

\documentstyle[poster]{article}

% ptmr should be the name of your PostScript times-roman .vf or .tfm file.

\font\bigroman=ptmr at 10pt   % A simple way to use a single PostScript font.

\special{landscape}  % This works with Rokicki's dvips

\begin{document}

\bigroman

\psposter*[imagewidth=10.5in,imageheight=8in]%
  {\vbox to 8in{\vss\hbox{\scaleboxto(0pt,7.5in){Animals}}\vss}}

\end{document}
%%
%% END poster2.doc


-- 
Timothy Van Zandt   (609)258-4050  tvz@Princeton.EDU (NeXTMail)
Newsgroups: comp.text.tex