[pstricks] Making a border from characters.

John Culleton john at wexfordpress.com
Fri Dec 31 01:21:56 CET 2004


The Webomints package has a good example of how to create a border in LaTeX 
using the fancyhdrs package.  I want to achieve the same effect with the same 
glyphs but using some form of pstricks, in a plain tex environment. 

The critical command sees to be the multiput one.  Is there an equivalent 
pstricks command?

Here is the LaTeX example:
-----------------------------------------------------
% $Id: sample2.tex,v 1.3 2002/09/13 06:34:25 loreti Exp $

\documentclass[a4paper]{article}
\usepackage{fancyhdr}

\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}

% What follows has been elaborated starting from an original
% post of Piet van Oostrum <piet at cs.uu.nl> on comp.text.tex .
%
% A4 pages are 210 mm wide and 297 mm high, i.e. about 595
% bp wide and 842 bp high.  Allowing a 1 in (72 bp) white
% margin on all sides (predefined inside TeX), that accounts
% for a decoration border 451 bp wide and 698 bp high.  If
% we want to use WeboMints characters in square cells with
% 12 bp side, we need 37 cells (2 angles and 35 border) in
% the X direction, for a total of 37*12 = 444 bp; and 58
% cells in the Y direction, for a total of 58*12 = 696 bp.
% The two white sides have a real dimension of (595-444)/2 =
% 75 and (842-696)/2 = 73 bp's.

\fancyhf{} \pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\setlength{\unitlength}{1bp}

\fancyhead[HL]{\wb{12bp}{12bp}%         Offset (48,-16), found
  \begin{picture}(0,0)(48,-16)%           by trial and error.
    \put(0,0){r}%                       Upper left corner
    \multiput(12,0)(12,0){35}{s}%       Upper border
    \put(432,0){t}%                     Upper right corner
    \multiput(0,-12)(0,-12){56}{x}%     Left border
    \put(0,-684){u}%                    Lower left corner
    \multiput(12,-684)(12,0){35}{v}%    Lower border
    \multiput(432,-12)(0,-12){56}{y}%   Right border
    \put(432,-684){w}%                  Lower right corner
\end{picture}}

\begin{document}
(text omitted)

\end{document}
-----------------------------------------------------------------. 
-- 
John Culleton

Short list of publishing/marketing books:
http://wexfordpress.com/tex/shortlist.pdf




More information about the PSTricks mailing list