40

How do I add the replayer to the post initially, and what additional features can I take advantage of?

NOTE: if you have a question about why the replayer isn't working for the PGN in your post, it's better to ask a new Meta question instead of posting an answer here.

0

4 Answers 4

35

This post is a work in progress, please feel free to add or embellish...

Most of the details here come from balpha's post.

Position

In order to simply show a position, just post the FEN string in a code block (put ``` on the line before and after). It will automatically be converted into a diagram.

Example:

```
r1br2k1/pp3ppp/2n2n2/1Bb3B1/8/2p2N2/PPP2PPP/R4RK1 w - - 1 13
```

This becomes:

r1br2k1/pp3ppp/2n2n2/1Bb3B1/8/2p2N2/PPP2PPP/R4RK1 w - - 1 13

Entire game

To display an entire game, paste the entire PGN in a code block after a FEN header. Most chess software allows you to copy/paste the PGN from a game. See Wikipedia if you want to type the PGN yourself.

The PGN you paste must include a FEN header. If you are starting from the start position, you can just include a blank FEN header:

```
[FEN ""]
1. f4 e5 2. g4 Qh4#
```

This becomes:

[FEN ""]
1. f4 e5 2. g4 Qh4#

Additional features

It is possible to enter entire variations and annotations for your games as well. If you simply copy/paste a pgn file from your external program, it will usually work correctly (after you add a FEN string). In order to enter variations, you can use parentheses for the variation moves. You can enter comments in curly braces too:

1. e4 e5 2. Nf3 Nc6 (2... Nf6 {Nf6 instead of Nc6 is called the Petroff Defense})

1. e4 e5 2. Nf3 Nc6 (2... Nf6 {Nf6 instead of Nc6 is called the Petroff Defense})

Variations can be nested as well.

5
  • 4
    The embedded image should be replaced by a complete working example of an embedded replayer.
    – Stevoisiak
    Commented Jul 26, 2017 at 14:12
  • 1
    I am seeing blank spaces for png chess.stackexchange.com/questions/22141/… what I am doing wrong please?
    – user16971
    Commented Jul 29, 2018 at 0:13
  • Sometimes FEN doesn't work
    – user24344
    Commented Sep 14, 2020 at 4:56
  • How do you find the FEN string? Commented Apr 19, 2021 at 20:25
  • The replayer has a couple of features not mentioned in this post: chess.meta.stackexchange.com/a/283/19880
    – hb20007
    Commented Feb 1, 2022 at 20:50
3

I noticed one more feature that has been missed out from your list but I have no idea how to annotate it, so will appreciate it if someone can fill the blanks in.

How can you specify which position is the current relevant one that you want the starting from. e.g. If I have imported a PGN (to include the entire game as reference) but I'm only interested in replaying the last 5 full moves, how can you jump to e.g. move 55/60 upon loading?

1
  • 2
    You can add a "StartPly" header to do this: [StartPly "110"] for example to start on move 55.
    – Andrew Mod
    Commented Oct 22, 2015 at 16:38
2

Anyone got a clue why the (3rd) replayer there is not working ?

I tried fiddling a lot with it, the position looks fine (if I remove the moves, it displays fine, looks legal to me, etc.), and I retyped the moves many times, tryed to mess with the move number, to no avail. The first move in itself (11. Rc3) is not accepted, and actually ruins the display of the position.

(Or is it just me ?)

2
  • There was a similar bug report on meta about variations needing to start with 1... or 1. instead of 11... It could be related to that - it works fine when I test with the github code, so I'm not entirely sure.
    – Andrew Mod
    Commented Dec 8, 2012 at 17:07
  • Ok, thanks, it's fixed now (starting at move 1). It seems any move below and including 9 will work, but from 10 and up, it fails. Is there a proper place to document that ? Commented Dec 8, 2012 at 17:15
1

What am I doing wrong?
Why is this: Why is pawn to d3 the best move here? pair of replayers ignoring the FEN header? (Mine is the comment comparing ... Kg7 to ... f5).

1
  • 1
    Missing the empty newline between tag section and movetext sections. Fixed that for you.
    – Remellion
    Commented Feb 15, 2020 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .