[comp.text.tex] Chess fonts, anyone?

sohan+@andrew.cmu.edu (Sohan C. Ramakrishna-Pillai) (07/18/90)

Does anyone know of a Metafont or Postscript description for chess
pieces, preferably in the public domain?
Or in the worst case, a good set of encapsulated postscriptable bitmaps
for use with dvips? I already have a lousy set of these.
Please e-mail back.
I will have a good PD set, if I receive any, reposted on this bboard, if
there are requests for it
Thanks
___
Sohan C. Ramakrishna-Pillai
Office: UCC 181	Phone: x6406
Home: Phone: (412)661-9375
Recent USENET exchange, attributions deleted
>"We can not make anything unlawful when God has made that
> thing lawful"
"We cannot make our own laws and call them God's laws"

dhosek@sif.claremont.edu (Hosek, Donald A.) (07/18/90)

In article <YacsOCS00WAo8EWlEs@andrew.cmu.edu>, sohan+@andrew.cmu.edu (Sohan C. Ramakrishna-Pillai) writes...
>Does anyone know of a Metafont or Postscript description for chess
>pieces, preferably in the public domain?

Look on ymir.claremont.edu in [anonymous.tex.mf.chess].

Mailserv users should send the following to mailserv@ymir.claremont.edu

SEND [TEX.MF.CHESS]CFIG10.MF
SEND [TEX.MF.CHESS]CHESS10.MF
SEND [TEX.MF.CHESS]CHESS20.MF
SEND [TEX.MF.CHESS]CHESS30.MF
SEND [TEX.MF.CHESS]CHESSBASE.MF
SEND [TEX.MF.CHESS]CHESSPIECES.MF

-dh

---
Don Hosek                         TeX, LaTeX, and Metafont Consulting and
dhosek@ymir.claremont.edu         production work. Free Estimates.
dhosek@ymir.bitnet                
uunet!jarthur!ymir                Phone: 714-625-0147

nolan@tssi.UUCP (Michael Nolan) (07/18/90)

In article <YacsOCS00WAo8EWlEs@andrew.cmu.edu>, sohan+@andrew.cmu.edu (Sohan C. Ramakrishna-Pillai) writes:
> Does anyone know of a Metafont or Postscript description for chess
> pieces, preferably in the public domain?

This *may* not be what you're looking for, but John Renner at Adobe produced
a font called 'cheq' which is a Type 1 font.  There is both a Macintosh and
a PC version of the font.  I think the first version of the Mac font was
posted to the net around last November.  Since then, John has made some minor
corrections to the font.  The PC version was still in testing at last report.
Adobe might be distributing these for a small fee, they're *not* in the catalog.I know its available both on GEnie and America Online, because I put it there.

John also indicated he might work on a font that has informant-type notation
symbols.  (some but not all of them are in Symbols and Dingbats)  I don't
know the status of this project.

I've been using the Mac version for several months and it's great!
I've produced pieces as small as 7 point, and as large as 48 point, the latter
being the largest size I can get and still produce a full chessboard 8" wide.

Please don't ask me to send it.  I'll check with John and see if it can be
posted to comp.binaries.{mac,ibm.pc}.
------------------------------------------------------------------------------
Mike Nolan                                       "I don't know what apathy is,
Tailored Software Services, Inc.                  and I don't want to find out!"
Lincoln, Nebraska (402) 423-1490                
UUCP: tssi!nolan should work, 
      if not try something like uunet!frith!upba!tssi!nolan 

pope@vatican (John Pope) (07/23/90)

In article <YacsOCS00WAo8EWlEs@andrew.cmu.edu>, sohan+@andrew (Sohan C. Ramakrishna-Pillai) writes:
>Does anyone know of a Metafont or Postscript description for chess
>pieces, preferably in the public domain?

Here's something that was posted on the net a couple of years ago. You
need pic, ditroff and a laserprinter that understands postscript to
use it, although it could probably be hacked up to work in a
postscript only environment. It was done by:

	Andy Walker, Maths Dept., Nottm Univ.
	anw@maths.nott.ac.uk

The manifesto indicates that it's public domain, with the usual
caveats.

John Pope
Sun Microsystems, Inc.
pope@Eng.Sun.COM

------------------------------[ cut here ]-------------------------------------
#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  MANIFEST README C.font C.start C.end Example
# Wrapped by anw@maths.nott.ac.uk on Thu Apr 28 16:23:13 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f MANIFEST -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"MANIFEST\"
else
echo shar: Extracting \"MANIFEST\" \(313 characters\)
sed "s/^X//" >MANIFEST <<'END_OF_MANIFEST'
X   File Name		Archive #	Description
X-----------------------------------------------------------
X MANIFEST		   1		list of files
X README			   1		discussion
X C.font			   1		PS font/board file
X C.start		   1		   draw board & set chess font
X C.end			   1		   tidy up
X Example		   1		Run thro pic | *roff | laserwriter
END_OF_MANIFEST
if test 313 -ne `wc -c <MANIFEST`; then
    echo shar: \"MANIFEST\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f README -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"README\"
else
echo shar: Extracting \"README\" \(6392 characters\)
sed "s/^X//" >README <<'END_OF_README'
X	Herewith a 90% solution to the chess-font problem.  It consists of
Xthree PostScript files, "C.font", "C.start", "C.end" that can be integrated
Xwith a "troff" file to produce chess diagrams and pieces.  The intention
Xis that a chess paper should consist of something like:
X
X	usual troff headers
X	.cf C.font	\" interpolate the font and board macros into the o/p
X	text text text
X	.cf C.start	\" draw the board and set the chess font
X	diagram
X	.cf C.end	\" tidy up
X	text text text
X	.cf C.start
X	diagram
X	.cf C.end
X	text text text, etc.
X
XTo be slightly more accurate, the intention is that an as-yet-unwritten
Xchess pre-processor should filter the chess paper, inserting the "C.font"
Xstuff, and replacing each diagram found by the "start ... end" stuff around
XTroff commands to position and display the pieces.  In the usual Unix way,
Xthe input would look like
X
X	text text text
X	.CS [ optional parameters for diagram size, etc ]
X	   Forsythe notation for diagram.
X	   Annotations
X	.CE
X	text text text
X
Xwith some sensible notation for inline figurines.
X
XIn the current state of the art, this is done instead by using "pic" to do
Xthe drawing and positioning.  In principle, the "pic" stuff would look like
X
X	.PS
X	<commands to draw the board, and scale to right size>
X	"K" at 2,3	\" two along, three up, ie b3
X	"p" at 7,5	\" 7 along, 5 up, ie g5
X	<etc>
X	"\fIWhite to move\fR" at 10,5	\" caption in Italic font
X	<etc>
X	.PE
X
XIn practice, there are silly complications caused, eg, by the necessity of
Xallowing output to non-LaserWriter devices, and by the fact that Troff
Xmis-optimises some motions, so the real text is much more complicated
X(see the example of the famous Reti ending in the "Example" file given),
Xbut all of this is obviously perfectly easy for the hypothetical chess
Xpre-processor.
X
XThe chess font is not installed as a proper font known to Troff, so all
Xthe chess pieces are kludged up behind the scenes in PostScript shovelled
Xthrough the DITroff->PS editor.  We have a much-hacked Troff (and need to
Xhave to get reasonably professional output using 40-odd fonts more-or-less
Xsimultaneously into a PDP 11/44), so the official routes aren't available
Xto me.  Your mileage may be better;  but, to be honest, I've managed "as
Xis".  We have a proper Hershey font interpreter, which we use for hacking
XGothic, Script, Chinese, etc., characters which aren't in the Laser's
Xnormal repertoire;  so it might be worth preparing a Hershey description
Xof the chess pieces for use in ordinary text (as figurines), but I haven't
Xyet felt the need.
X
X	If you know much about PostScript, note that the chess font can't
Xbe cached;  this is because the pieces use both white and black pixels.
XEg, a black bishop includes a white halo, then a black flood-fill of the
Xoutline, then white fills of the inside of the mitre and of the diamond
Xdecoration.  The alternative of defining WK-on-Bsquare, WK-on-Wsquare,
XBK-on-Bsquare, etc pieces, using only write-black codes, would be very
Xmuch more complicated both to define and to use, would make figurines in
Xthe text harder, but would be much faster to run in text that used lots and
Xlots of diagrams.
X
X	If your system is similar to ours (some hacked Adobe package,
Xconverting DITroff for the Apple LW+), you can try [takes *ages*, 'cos
Xof the large pieces at the end -- take them away if you like!]
X
X	pic Example | your-troff -ms [flags] | your-usual-filters
X
X(I just have to say "runoff -Plwriter Example" and it all happens);  if
Xthat doesn't work, you'll have to piggle with the "C.*" files.  In
Xparticular, some of the positioning may be wrong:  it seems to be system-
Xdependent.  Things may go badly awry if your system doesn't have the same
X"copy-through" convention as ours:  the ".cf" and "\!" troff requests are
Xused to pass information straight through to the DITroff->PS converter;
Xwhat "straight through" means in relation to partial lines, positioning,
Xetc., depends on how many bugs in this mechanism your site has cured;  and
Xthe converter passes straight through as PS lines between "%" and ".".
XThe only other likely catastrophe that I can see is if your PS prologue
Xdoesn't use "pagesave" to save and restore the LW state.  If you use TEX
Xrather than Troff, you're on your own.  Well, perhaps in a crowd, but
Xwithout me.
X
X	Please note the minimal copyright restrictions on "C.font":  if
Xyou intend to make money from my work, I would like an Hon Mention and a
Xmodest slice of the action;  otherwise do what you like with it.  Feel
Xfree to use the other files even if you make money from them (How?).  The
X"C.start" file is utterly stupid:
X	"initmatrix" should `never' be used, 'cos it resets PS to the
X		default co-ordinate system, thereby defeating any attempt
X		to do clever scaling;
X	the current position has to be moved in an obscure way to put the
X		board in the correct relation to the "pic" co-ordinates;
X	comes out wrong in double spacing ("pic" bug, really);
X	only allows 1.6" board and 12-pt pieces;
Xbut I haven't done anything about it yet.
X
X	There are surprisingly many chess fonts used in the literature.
XThe one implemented here is an approximation to my favourite.  The two
Xprincipal rivals are the one much used in older books and in E. European
Xbooks with an incredibly ornate K and much more elaborate pieces generally,
Xand one with a "square-on" bishop-with-a-cross, instead of the rotated
Xbishop here, where you can see the inside of the mitre.  I've changed the
XN somewhat;  attempts to copy the "real" font all came out looking like a
Xpantomime horse with a nosebag, and the present more stylised version both
Xlooks better and scales better.  Let me know if you do better!
X
X	The knights should face *left*.  We had a curious episode whereby
Xa diagram came out perfectly OK last year, but this year came out with the
Xpieces reflected (this only matters for B & N).  I therefore changed signs
Xon all the motions for B & N.  If your diagrams come out with the Ns facing
X*right*, you'll have to do the same.  I can't explain this other than that
Xour text processing systems are much hacked;  but whether the change was a
Xnew bug or a fix, I don't know.  For similar reasons, you may find something
Xcurious happening with the big pieces in "Example".
X
X	All comments, suggestions, improvements welcomed.
X
X	Andrew N. Walker,
X	Mathematics Department, The University, Nottingham NG7 2RD, UK.
X	e-mail:  anw@maths.nott.ac.uk
END_OF_README
if test 6392 -ne `wc -c <README`; then
    echo shar: \"README\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f C.font -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"C.font\"
else
echo shar: Extracting \"C.font\" \(7891 characters\)
sed "s/^X//" >C.font <<'END_OF_C.font'
X%
X
X%	This file is
X
X%		Copyright 1988 A. N. Walker
X
X%	Explicit permission is hereby given to use this file freely for
X%	educational or research or non-profitmaking purposes, provided
X%	that this notice is retained.  Permission for other uses should
X%	be sought from Dr A. N. Walker, Department of Mathematics, The
X%	University, Nottingham NG7 2RD, UK;  anw@maths.nott.ac.uk.
X
X	pagesave restore
X	/Cfont 50 dict def
X	Cfont begin
X	/FontType 3 def
X	/FontMatrix [ 0.001 0 0 0.001 0 0 ] def
X	/FontBBox [ 0 0 0 0 ] def
X	/Encoding 256 array def
X	0 1 255 { Encoding exch /.notdef put } for
X	Encoding 8#113 /WK put		% ASCII 'K'
X	Encoding 8#121 /WQ put		% ASCII 'Q'
X	Encoding 8#122 /WR put		% ASCII 'R'
X	Encoding 8#102 /WB put		% ASCII 'B'
X	Encoding 8#116 /WN put		% ASCII 'N'
X	Encoding 8#120 /WP put		% ASCII 'P'
X	Encoding 8#153 /BK put		% ASCII 'k'
X	Encoding 8#161 /BQ put		% ASCII 'q'
X	Encoding 8#162 /BR put		% ASCII 'r'
X	Encoding 8#142 /BB put		% ASCII 'b'
X	Encoding 8#156 /BN put		% ASCII 'n'
X	Encoding 8#160 /BP put		% ASCII 'p'
X% Next two lines added to show how to do grasshoppers
X	Encoding 8#107 /WG put		% ASCII 'G'
X	Encoding 8#147 /BG put		% ASCII 'g'
X	/CharProcs 30 dict def
X	CharProcs begin
X% Should perhaps do something more exotic in .notdef, so that unassigned
X% pieces actually show up.  Left as an exercise
X		/.notdef { } def
X		/diamond {		% size & centre on stack
X			moveto dup neg 0 rmoveto
X			dup dup neg rlineto dup dup rlineto
X			dup neg exch rlineto closepath } def
X		/WK {	2 setmiterlimit 325 -100 moveto
X			600 100 350 400 125 250 curveto
X			0 250 rlineto -250 0 rlineto 0 -250 rlineto
X			-350 400 -600 100 -325 -100 curveto
X			0 -250 rlineto
X			-100 -500 100 -500 325 -350 curveto
X			closepath currentgray dup dup 30 setlinewidth
X			gsave 100 setlinewidth 1 setgray stroke grestore
X			gsave 1 exch sub setgray fill grestore
X			0 setgray stroke setgray
X			0 eq { 325 } { 275 } ifelse
X			dup dup neg 3 copy
X			-350 moveto 0 -300 3 -1 roll -350 800 arcto
X			4 { pop } repeat -350 lineto
X			-100 moveto 0 -50 3 -1 roll -100 800 arcto
X			4 { pop } repeat -100 lineto
X			15 0 -185 Cfont /CharProcs get /diamond get exec
X			15 -250 -210 Cfont /CharProcs get /diamond get exec
X			15 250 -210 Cfont /CharProcs get /diamond get exec
X			currentgray 0 eq { 125 } { 75 } ifelse
X			dup dup neg 3 copy dup dup
X			4 { 0 375 moveto rlineto } repeat
X			currentgray 0 eq {
X				0 -45 moveto 125 250 lineto
X				-250 0 rlineto closepath
X			} if
X			stroke } def
X		/WQ {	2 setmiterlimit 0 75 moveto
X			-150 440 50 -80 280 arc
X			-250 25 lineto -440 200 50 -60 300 arc
X			-325 -100 lineto 0 -250 rlineto
X			-100 -500 100 -500 325 -350 curveto
X			0 250 rlineto 440 200 50 -120 240 arc
X			250 25 lineto 150 440 50 -100 260 arc
X			closepath currentgray dup dup 30 setlinewidth
X			gsave 100 setlinewidth 1 setgray stroke grestore
X			gsave 1 exch sub setgray fill grestore
X			0 setgray stroke setgray
X			0 eq { 325 } { 275 } ifelse
X			dup dup neg 3 copy
X			-350 moveto 0 -300 3 -1 roll -350 800 arcto
X			4 { pop } repeat -350 lineto
X			-100 moveto 0 -50 3 -1 roll -100 800 arcto
X			4 { pop } repeat -100 lineto
X			15 0 -185 Cfont /CharProcs get /diamond get exec
X			15 -250 -210 Cfont /CharProcs get /diamond get exec
X			15 250 -210 Cfont /CharProcs get /diamond get exec
X			stroke } def
X		/WR {	-325 -450 moveto 650 0 rlineto
X			0 50 rlineto -100 175 rlineto 0 400 rlineto
X			50 75 rlineto 0 150 rlineto
X			-86 0 rlineto -30 -100 rlineto
X			-86 0 rlineto -30 100 rlineto
X			-86 0 rlineto -30 -100 rlineto
X			-86 0 rlineto -30 100 rlineto -86 0 rlineto
X			0 -150 rlineto 50 -75 rlineto
X			0 -400 rlineto -100 -175 rlineto closepath
X			gsave 100 setlinewidth 1 setgray stroke grestore
X			gsave 1 currentgray sub setgray fill grestore
X			30 setlinewidth
X			gsave 0 setgray stroke grestore newpath
X			currentgray 0 eq { -225 } { -195 } ifelse
X			dup -225 moveto dup -2 mul 0 rlineto
X			dup 175 moveto -2 mul 0 rlineto stroke } def
X		/WB {	2 setmiterlimit 400 -500 moveto
X			-100 100 -300 0 -400 100 rcurveto
X			-100 -100 -300 0 -400 -100 rcurveto
X			0 100 rlineto
X			100 100 300 0 400 100 rcurveto
X			100 -100 300 0 400 -100 rcurveto
X			closepath
X			-200 -350 moveto 0 200 rlineto
X			-200 0 -150 215 0 325 curveto
X			75 420 40 -90 270 arc
X			340 100 340 100 200 -150 curveto
X			0 -200 rlineto -200 50 rlineto closepath
X			30 setlinewidth currentgray
X			gsave	0 325 moveto
X				-150 215 -200 0 -200 -150 curveto
X				-340 100 -340 100 -75 380 curveto
X				-75 420 40 -90 270 arc
X				closepath 1 setgray
X				gsave 100 setlinewidth stroke grestore
X				gsave fill grestore
X				0 setgray stroke
X			grestore
X			gsave dup 1 exch sub setgray fill grestore
X			0 setgray stroke setgray
X			15 0 -225 Cfont /CharProcs get /diamond get exec
X			currentgray 0 eq { 200 } { 150 } ifelse
X			dup dup neg 3 copy
X			-350 moveto 20 rlineto -20 rlineto
X			-150 moveto 30 rlineto -30 rlineto stroke } def
X		/WN {	2 setmiterlimit -450 -450 moveto
X			-450 200 -150 350 50 400 curveto
X			25 100 rlineto 75 -200 rlineto
X			75 150 rlineto 0 -150 rlineto
X			125 -125 325 -400 275 -450 rcurveto
X			-75 -75 rlineto -100 130 rlineto 0 -200 rlineto
X			-50 -25 -150 100 -100 150 rcurveto
X			-50 -50 -150 75 -125 150 rcurveto
X			-125 -300 250 -250 250 -450 curveto
X			closepath currentgray dup 30 setlinewidth
X			gsave 100 setlinewidth 1 setgray stroke grestore
X			gsave 1 exch sub setgray fill grestore
X			0 setgray stroke setgray
X			15 200 150 Cfont /CharProcs get /diamond get exec
X			stroke currentgray 0 eq { [ 100 100 ] 0 setdash
X			-410 -450 moveto -410 200 -130 330 60 380 curveto
X			50 setlinewidth stroke } if } def
X		/WP {	1 currentgray sub setgray
X			Cfont /CharProcs get /BP get exec
X			-75 150 moveto 150 0 rlineto stroke } def
X		/BK {	1 currentgray sub setgray
X			Cfont /CharProcs get /WK get exec
X			15 0 180 Cfont /CharProcs get /diamond get exec
X			265 -95 moveto 480 150 280 380 50 -50 curveto
X			-265 -95 moveto -480 150 -280 380 -50 -50 curveto
X			stroke } def
X		/BQ {	1 currentgray sub setgray
X			Cfont /CharProcs get /WQ get exec } def
X		/BR {	1 currentgray sub setgray
X			Cfont /CharProcs get /WR get exec } def
X		/BB {	1 currentgray sub setgray
X			Cfont /CharProcs get /WB get exec } def
X		/BN {	1 currentgray sub setgray
X			Cfont /CharProcs get /WN get exec
X			-430 -430 moveto
X			-430 200 -150 350 30 370 curveto
X			-150 250 -390 200 -390 -430 curveto fill } def
X		/BP {	300 -450 moveto
X			200 -300  200 -300 75 -250 curveto
X			125 -50 125 -50 75 150 curveto
X			125 150 100 0 90 arc
X			0 300 100 -30 210 arc
X			-125 150 100 90 180 arc
X			150 0 rlineto
X			-125 -50 -125 -50 -75 -250 curveto
X			-200 -300 -200 -300 -300 -450 curveto
X			closepath
X			gsave 100 setlinewidth 1 setgray stroke grestore
X			gsave fill grestore
X			50 setlinewidth 0 setgray stroke } def
X% Next two lines added to show how to do upside-down queens (grasshoppers)
X		/WG {	180 rotate Cfont /CharProcs get /WQ get exec } def
X		/BG {	180 rotate Cfont /CharProcs get /BQ get exec } def
X	end
X	/BuildChar {			% font, char on stack
X		1000 0 setcharwidth
X		exch begin Encoding exch get CharProcs exch get end exec
X	} def
X	end
X	/ChessFont Cfont definefont pop
X	/board {			% startx, starty on stack
X		translate
X		currentlinewidth 72 5 div dup dup scale div 3 div
X		setlinewidth newpath -0.2 dup dup moveto 8.2 lineto
X		8.2 dup dup lineto -0.2 lineto closepath
X		gsave 1 setgray fill grestore stroke
X		currentlinewidth 3 div setlinewidth
X		-0.075 dup dup moveto 8.075 lineto
X		8.075 dup dup lineto -0.075 lineto closepath stroke
X		gsave	currentlinewidth 12 div setlinewidth
X			1 16 div 1 8 div 7 {
X				dup 0 moveto dup 8 exch sub dup dup rlineto
X				exch 0 exch moveto dup rlineto stroke
X			} for
X			1 setgray
X			0 1 7 { dup 2 mod 1 exch sub
X				4 {	2 copy newpath moveto
X					1 0 rlineto 0 1 rlineto -1 0 rlineto
X					closepath gsave fill grestore stroke
X					2 add
X				} repeat pop pop
X			} for
X		grestore
X		-0.5 dup translate
X	} def
X	/pagesave save def
X.
END_OF_C.font
if test 7891 -ne `wc -c <C.font`; then
    echo shar: \"C.font\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f C.start -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"C.start\"
else
echo shar: Extracting \"C.start\" \(247 characters\)
sed "s/^X//" >C.start <<'END_OF_C.start'
X%
X	gsave matrix currentmatrix initmatrix
X	-1 12 mul 72 div -53 30 div 72 mul rmoveto	% botch!
X	%	0 -12 rmoveto		% include this for double spaced o/p
X	currentpoint board setmatrix
X	/ChessFont findfont [ 12 point neg 0 0 3 copy ] makefont setfont
X.
END_OF_C.start
if test 247 -ne `wc -c <C.start`; then
    echo shar: \"C.start\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f C.end -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"C.end\"
else
echo shar: Extracting \"C.end\" \(14 characters\)
sed "s/^X//" >C.end <<'END_OF_C.end'
X%
X	grestore
X.
END_OF_C.end
if test 14 -ne `wc -c <C.end`; then
    echo shar: \"C.end\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Example -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Example\"
else
echo shar: Extracting \"Example\" \(2141 characters\)
sed "s/^X//" >Example <<'END_OF_Example'
X.\"pic
X.\"roff -ms
X.\"
X.\" pipe this through the mythical chess pre-processor | pic | *roff -ms etc
X.if t .cf C.font
X.SH
XExample
X.PP
XThe following all looks fine on our LW;
XI can't answer for yours!
XAnyway, consider the following well-known study:
X.PS
Xscale = 5
Xline right 8 then up 8 then left 8 then down 8
X.if t .cf C.start
XA :  -1/2-1/60,-1/2+1/10
X"." at 0,0
X"K" at A + 8,8 ljust
X"." at 0,0
X"k" at A + 1,6 ljust
X"." at 0,0
X"P" at A + 3,6 ljust
X"." at 0,0
X"p" at A + 8,5 ljust
X.if t .cf C.end
Xtextwid = 16
X"\fBR. R\*'eti\fP" at 10,6 ljust
X"\fIKagan's Neueste Schachnachrichten, 1921\fP" at 10,5 ljust
X"\fIWhite to play and draw\fP" at 10,2 ljust
Xreset textwid
X.PE
XThe
X.I pic
Xfor the above can be generated easily by a pre-processor which understands
XForsythe notation and where to put annotations,
X.I e.g.:
X.DS
X.ft CW
X\&.CS
X7K; 8; k1P5; 7p; 32.
XRU B "R. R\e*'eti"  \e" Right-Upper annotation in Bold
X\&... etc ...
X\&.CE
X.ft P
X.DE
X(As a matter of fact, it would be quite easy to generate the
X.I pic
X.I output
Xand save a pipe.)
XIf you know what you're doing, you can do cleverer things with the
X.I pic
X(this comment is only meaningful if you study the source of this output).
XFor example, here is the start position;
XI've replaced some pawns with grasshoppers (upside-down queens)
Xto show the possibilities.
X.PS
Xscale = 5
Xline right 8 then up 8 then left 8 then down 8
X.if t .cf C.start
XA :  1/2-1/60,-1/2+1/10
Xdefine rank % A + 0,$1 ljust %
Xdefine file % $1 at rank(8); $2 at rank(7); $3 at rank(2); $4 at rank(1) %
Xdefine goright % A : A + 1,0 %
X	file("r", "p", "P", "R"); goright
X	file("n", "g", "G", "N"); goright
X	file("b", "p", "P", "B"); goright
X	file("q", "p", "P", "Q"); goright
X	file("k", "p", "P", "K"); goright
X	file("b", "p", "P", "B"); goright
X	file("n", "g", "G", "N"); goright
X	file("r", "p", "P", "R")
X.if t .cf C.end
X.PE
X.if !t .ig
XSimilarly, here are some big pieces:
X.sp 1i
X\s1\fI\&.\fP\s0
X.br
X.\" The above stupidity is 'cos some troffs re-order things!  Grrrr!
X\!%
X\! save /ChessFont findfont [ 48 point neg 0 0 3 copy ] makefont setfont
X\! (KqRbNp) dup stringwidth exch neg exch neg rmoveto show restore
X\!.
X.ft R
X..
END_OF_Example
if test 2141 -ne `wc -c <Example`; then
    echo shar: \"Example\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 1 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0