Chess-PGN-EPD
view release on metacpan or search on metacpan
lib/Chess/PGN/EPD.pm view on Meta::CPAN
specified B<epd> string or board postion to the specified B<type>. Parameters are passed as
a anonymous hash, i.e. epdstr(epd => $position,type => 'diagram') or similar.
=head3 Types Supported
The following types are understood by B<epdstr>:
=over
=item 'diagram'
A plain ASCII diagram with simple border showing rank and file. Typical output:
8 rnbqkb r
7 ppp pppp
6 - - n -
5 - -P- -
4 - - - -
3 - - - -
2 PPPP PPP
1 RNBQKBNR
abcdefgh
=item 'text'
A plain ASCII diagram. Typical output:
rnbqkb r
ppp pppp
- - n -
- -P- -
- - - -
- - - -
PPPP PPP
RNBQKBNR
=item 'palview'
An array of HTML information that represents the tabular diagram information for PalView.
Typical output:
<IMG SRC="jpc/br.gif"><IMG SRC="jpc/bn.gif"><IMG SRC="jpc/bb.gif"><IMG SRC="jpc/bq.gif"><IMG
SRC="jpc/bk.gif"><IMG SRC="jpc/bb.gif"><IMG SRC="jpc/bn.gif"><IMG SRC="jpc/br.gif"><BR>
<IMG SRC="jpc/bp.gif"><IMG SRC="jpc/bp.gif"><IMG SRC="jpc/bp.gif"><IMG SRC="jpc/bp.gif"><IMG
SRC="jpc/bp.gif"><IMG SRC="jpc/bp.gif"><IMG SRC="jpc/bp.gif"><IMG SRC="jpc/bp.gif"><BR>
<IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG
SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><BR>
<IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG
SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><BR>
<IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG
SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><BR>
<IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG
SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/wn.gif"><BR>
<IMG SRC="jpc/wp.gif"><IMG SRC="jpc/wp.gif"><IMG SRC="jpc/wp.gif"><IMG SRC="jpc/wp.gif"><IMG
SRC="jpc/wp.gif"><IMG SRC="jpc/wp.gif"><IMG SRC="jpc/wp.gif"><IMG SRC="jpc/wp.gif"><BR>
<IMG SRC="jpc/wr.gif"><IMG SRC="jpc/wn.gif"><IMG SRC="jpc/wb.gif"><IMG SRC="jpc/wq.gif"><IMG
SRC="jpc/wk.gif"><IMG SRC="jpc/wb.gif"><IMG SRC="jpc/i.gif"><IMG SRC="jpc/wr.gif"><BR>
=item 'latex'
The necessary text fragment to 'set' the diagram in LaTeX using
any variation of Piet Tutelars original chess12.tar.Z package. As given, the LaTeX
command 'diagram' is used. As an example here is the source to test.tex:
%%
%% test.tex -- example LaTeX file to demonstrate output from Chess::PGN::EPD
%%
\documentclass{article}
\usepackage{chess}
\usepackage{bdfchess}
\begin{document}
\newenvironment{diagram}{\begin{nochess}}{$$\showboardwithnotation$$\end{nochess}}
%%
%% fragment as produced by epdstr(epd => $position,type => 'latex');
%%
\begin{diagram}
\board
{rnbqkb r}
{ppp pppp}
{ * * n *}
{* *P* * }
{ * * * *}
{* * * * }
{PPPP PPP}
{RNBQKBNR}
\end{diagram}
%%
%% end of fragment
%%
\end{document}
=item 'linares'
Alpine Electronics' LinaresDiagram font. Mapping also works with both HastingsDiagram
and ZurichDiagram fonts. Single or double border, With or without algebraic legend.
=item 'linares1'
Standard mapping, single border, squares offset.
=item 'linares2'
Standard mapping, thick single border.
=item 'tilburg'
A borderless font designed by Eric Schiller and Bill Cone.
=item 'marroquin'
This type refers to any font designed by Armando H. Marroquin,
excepting his FigurineSymbol fonts. They having a different purpose,
have a different mapping.
=item 'leschemelle'
The map for Chess Cases designed by Matthieu Leschemelle.
=item 'bentzen1'
The map for Chess Alpha designed by Eric Bentzen.
=item 'bentzen2'
The map for Chess Berlin designed by Eric Bentzen.
=item 'hickey'
The map for Chess Plain designed by Alan Hickey.
=item 'scott1'
The map for Chess Regular a port of Adobe Cheq ported to
True Type by Alistair Scott.
=item 'scott2'
The map for Chess Usual a modification of Chess Regular
by Armando H. Marroquin.
=item 'bodlaender'
The map for Chess Utrecht designed by Hans Bodlaender.
=item 'cowderoy'
The map for Traveller Standard v3 designed by Alan Cowderoy.
( run in 1.099 second using v1.01-cache-2.11-cpan-364913b4093 )