[pmwiki-users] Defining and displaying chess diagrams in WikiPages

Patrick R. Michaud pmichaud at pobox.com
Tue Nov 22 17:48:59 CST 2005

On Mon, Nov 21, 2005 at 05:11:44PM -0500, Martin Fick wrote:
> Very neat.
> I had a similar idea but decided to use a URL to describe
> the board's layout instead.  You can see and try it here:
> http://www.theficks.name/Hacks/ChessBoard
> I do not use any wiki markup for this so it does not quite
> look as nice in the page text, but it is usable from any
> webpage, not just a wiki page.

Just for fun I hacked together a chessboard using InterMap and FEN
notation.  See http://www.pmwiki.org/wiki/Test/Chess for an example
of how it currently looks (I'm still improving it), and 
http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation for details
of FEN board notation.

Essentially the markup


displays the classic Ruy Lopez opening after 1.e4 e5 2.Nf3 Nc6 3.Bb5 .

Note that since this is a standard image markup one can style it
with wikistyles and captions, as in

    %rframe% Chessboard:r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R&t=.gif

I'm still playing with it a bit further, and may see about
adding PGN markup.  I'm thinking one may eventually be able to do
things like:

    !! Ruy Lopez

    1. e4 e5
    2. Nf3 Nc6
    3. Bb5

    %rfloat% Chessboard:{$FEN}&t=.gif | Position after 3. Bb5

    !!! Norweigan Defence

    3. ... a6
    4. Ba4 b5
    5. Bb3 Na5

    %rfloat% Chessboard:{$FEN}&t=.gif | Norweigan Defence


More information about the pmwiki-users mailing list