r/chess • u/mashedvote • Dec 06 '13
Inline PGN Viewer FAQ
Quick primer
- Portable Game Notation (PGN) is a plain text computer-processible format for recording chess games, and is supported by many chess programs. Wikipedia
- The PGN viewer is an addon for Firefox or Chrome that allows you to embed the PGN viewer from chesstempo in a comment. Credit to /u/betazoidberg for creating the browser addons.
- When you post the PGN of a game, wrap the game with the tags [ pgn] and [ /pgn] (without the spaces) and users with the inline PGN viewer installed will see a game board on which they can play through the moves.
- It is a good idea to indent every line with four spaces so that markdown will render it as it is. Otherwise, markdown might format it in such a way that the pgn viewer can no longer parse it.
- Consider readability for those who are not using the PGN viewer and break the move list up into reasonably short lines.
- You will probably want to annotate your game and add variations. Probably the easiest way to edit a PGN is to use an editor:
- http://www.chess.com/analysis-board-editor (online editor)
- http://scid.sourceforge.net/ (free database software)
Example
If you have the addon installed, the following text:
[ pgn]
[Site "Paris"]
[Date "1858"]
[Result "1-0"]
[White "Paul Morphy"]
[Black "A Bottin"]
[WhiteElo "2690 estimated"]
[BlackElo "?"]
1.e4 e5
2.c3 Nf6
3.d4 Nxe4
4.dxe5 Bc5
5.Qg4 Nxf2
6.Qxg7 Rf8
7.Bg5 f6
8.exf6 Rxf6
9.Bxf6 Be7
10.Qg8+
1-0[ /pgn]
Will be displayed like this:
[pgn]
[Site "Paris"]
[Date "1858"]
[Result "1-0"]
[White "Paul Morphy"]
[Black "A Bottin"]
[WhiteElo "2690 estimated"]
[BlackElo "?"]
1.e4 e5
2.c3 Nf6
3.d4 Nxe4
4.dxe5 Bc5
5.Qg4 Nxf2
6.Qxg7 Rf8
7.Bg5 f6
8.exf6 Rxf6
9.Bxf6 Be7
10.Qg8+
1-0[/pgn]
Note that here and in all other examples the PGN tags are written with spaces [ pgn] and [ /pgn] to prevent the PGN reader from reading them. Don't include the spaces in your own posts.
FAQ
- How do I include variations?
- How do I include annotations?
- How do I show multiple games in one comment?
- How do I display a single position, or show a game from a certain position?
- [How do I show the board with black at the bottom?] (http://www.reddit.com/r/chess/comments/1s8j14/inline_pgn_viewer_faq/cdva03e)
- [Why isn't the board showing up when I include positional evaluation symbols?] (http://www.reddit.com/r/chess/comments/1s8j14/inline_pgn_viewer_faq/ce32898)
- Why isn't the board showing up? (Random reasons and what to do next)
17
Upvotes