Posting chess games, positions and variations

Technical information will be posted here, use it to ask questions too.
John McKenna

Re: Posting chess games, positions and variations

Post by John McKenna » Mon Mar 07, 2016 12:16 am

Put a header in the following format at the front of your PGN file -

[Event "FIDE WWC"]
[Site "Lviv"]
[Date "2016.03.06"]
[Round "1.4"]
[White "Hou, Y."]
[Black "Muzychuk, M."]
[Result "1/2-1/2"]
[ECO "C83"]
[WhiteElo "2667"]
[BlackElo "2563"]
[PlyCount "0"]

When the file with the header is enclosed in the tags and posted it appears thus -



NB: PlyCount should be equal to the number of half-moves in the file.

Paul Habershon
Posts: 550
Joined: Sat Aug 07, 2010 5:51 pm

Re: Posting chess games, positions and variations

Post by Paul Habershon » Mon Mar 07, 2016 7:53 am

Thanks, John. I have previewed what's below and think it will be OK. I am pleased to see the play-through arrows below the board. My next practice will be to post a position (not the whole game) but with continuation moves from that point.


Paul Habershon
Posts: 550
Joined: Sat Aug 07, 2010 5:51 pm

Re: Posting chess games, positions and variations

Post by Paul Habershon » Mon Mar 07, 2016 7:58 am

Getting there, but my copied game from my ChessBase included details like our respective teams but these have not appeared. I suppose the question mark below the date is for the venue?

John McKenna

Re: Posting chess games, positions and variations

Post by John McKenna » Mon Mar 07, 2016 1:50 pm

Yes, Paul, the ? is generated from Site, Lviv - the venue - in the example below, in the header. If you compare the header and the output generated from it by the PGN viewer you can see that ECO and White/BlackElo do not generate anything at all in the viewer. So, if you want to display them just add the figure after the players' names as I have done, below. The ECO code could similarly be added in Site before/after the name of the venue.

[Event "FIDE WWC"]
[Site "(C83) Lviv"]
[Date "2016.03.06"]
[Round "1.4"]
[White "Hou, Y. (2667)"]
[Black "Muzychuk, M. (2563)"]
[Result "1/2-1/2"]
[ECO "C83"]
[WhiteElo "2667"]
[BlackElo "2563"]
[Annotator "JM"]
[PlyCount "42"]



If you want to include annotation by hand the limited example below points the way. Usually people use a programme such as Chessbase to do all that and then they generate their PGN file with the annotated game(s) in it. The header(s) of the game(s) in that Chessbase output PGN file can then be edited as I showed, above, then the file can be posted here inside the PGN tags.

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Nxe4 6. d4 b5 7. Bb3 d5 8. dxe5 Be6 9. c3 (9. Be3 Be7 {Game 2}) 9... Be7 10. Bc2 Bg4 $5 (10... Nc5) 11. h3 (11. Bf4 $5) 11... Bh5 12. g4 Bg6 13. Nd4 (13. Bb3 d4 14. cxd4 h5 15. d5 $2 hxg4 16. hxg4 Na5 17. Bc2 Bc5 18. Kg2 Qd7 19. e6 Qd6 20. Qe1 $4 Bxf2 {0-1 Kozakov-Dumpor 2003}) 13... Nxd4 14. cxd4 h5 15. f3 Ng3 16. Rf2 hxg4 (16... Bxc2 17. Qxc2 Qd7 18. Bf4 h4 $11) 17. Bxg6 Rxh3 18. Qc2 Bc5 19. Qxc5 Rh1+ (19... Qh4 20. Qc6+ Kf8 21. Qxa8+ Ke7 22. Bg5+ $1 Qxg5 23. Qc6 Rh1+ 24. Kg2 Rh2+ 25. Kxg3 Qh4+ 26. Kf4 gxf3+ 27. Kf5 $8 Qe4+ 28. Kg5 Qh4+ 29. Kf5 Qe4+ $11) 20.Kg2 Rh2+ 21. Kg1 Rh1+ 1/2-1/2



John

Paul Habershon
Posts: 550
Joined: Sat Aug 07, 2010 5:51 pm

Re: Posting chess games, positions and variations

Post by Paul Habershon » Mon Mar 07, 2016 4:08 pm

[Event "4NCL Div 2"]
[Site "Birmingham Airport"]
[Date "2016.02.13"]
[Round "5"]
[White "Habershon, Paul F ["MK Phoenix 1"]
[Black "Klingher, D. [Barbican Youth"]
[Result "1-0"]
[ECO "C13"]
[Annotator "Paul Habershon"]
[PlyCount "49"]
[EventDate "2016.02.13"]
[WhiteTeam "MK Phoenix 1"]
[BlackTeam "Barbican Youth"]

1. e4 e6 2. d4 d5 3. Nc3 Nf6 4. Bg5 dxe4 5. Nxe4 Nbd7 6. Nf3 Be7 7. Bxf6 gxf6
8. Bd3 b6 9. Qe2 f5 10. Ned2 Bb7 11. O-O-O Nf6 12. c3 Nd5 13. g3 c6 14. Rhe1 a5
15. Ne5 O-O 16. g4 a4 17. gxf5 a3 18. Qg4+ Kh8 19. Rg1 axb2+ 20. Kc2 Bf6 21.
fxe6 {Missing 21 Qg8+!} Qe7 22. Qh5 b1=Q+ 23. Rxb1 Rxa2+ 24. Rb2 Nb4+ 25. cxb4
1-0

Paul Habershon
Posts: 550
Joined: Sat Aug 07, 2010 5:51 pm

Re: Posting chess games, positions and variations

Post by Paul Habershon » Mon Mar 07, 2016 4:13 pm

Forgot the pgn edit in the last post!

[Event "4NCL Div 2"]
[Site "Birmingham Airport"]
[Date "2016.02.13"]
[Round "?"]
[White "Habershon, Paul F (MK Phoenix 1) "]
[Black "Klingher, D. (Barbican Youth)"]
[Result "1-0"]
[ECO "C13"]
[Annotator "Paul Habershon"]
[PlyCount "49"]
[EventDate "2016.02.13"]
[WhiteTeam "MK Phoenix 1"]
[BlackTeam "Barbican Youth"]

1. e4 e6 2. d4 d5 3. Nc3 Nf6 4. Bg5 dxe4 5. Nxe4 Nbd7 6. Nf3 Be7 7. Bxf6 gxf6
8. Bd3 b6 9. Qe2 f5 10. Ned2 Bb7 11. O-O-O Nf6 12. c3 Nd5 13. g3 c6 14. Rhe1 a5
15. Ne5 O-O 16. g4 a4 17. gxf5 a3 18. Qg4+ Kh8 19. Rg1 axb2+ 20. Kc2 Bf6 21.
fxe6 {Missing 21 Qg8+!} Qe7 22. Qh5 b1=Q+ 23. Rxb1 Rxa2+ 24. Rb2 Nb4+ 25. cxb4
1-0

Edit: what actions have I now missed above? It hasn't come out right.

Ian Kingston
Posts: 1071
Joined: Sat Apr 14, 2007 3:16 pm
Location: Sutton Coldfield
Contact:

Re: Posting chess games, positions and variations

Post by Ian Kingston » Mon Mar 07, 2016 4:49 pm

Looks like these two lines are wrong:

[White "Habershon, Paul F ["MK Phoenix 1"]
[Black "Klingher, D. [Barbican Youth"]

Try:

[White "Habershon, Paul F (MK Phoenix 1)"]
[Black "Klingher, D. (Barbican Youth)"]

Paul Habershon
Posts: 550
Joined: Sat Aug 07, 2010 5:51 pm

Re: Posting chess games, positions and variations

Post by Paul Habershon » Mon Mar 07, 2016 5:09 pm

Ian Kingston wrote:Looks like these two lines are wrong:

[White "Habershon, Paul F ["MK Phoenix 1"]
[Black "Klingher, D. [Barbican Youth"]

Try:

[White "Habershon, Paul F (MK Phoenix 1)"]
[Black "Klingher, D. (Barbican Youth)"]
So did that error invalidate the rest of the header details, so that the players' names etc. did not appear by the diagram?
At least I got the textual annotation to appear.

Roger de Coverly
Posts: 21291
Joined: Tue Apr 15, 2008 2:51 pm

Re: Posting chess games, positions and variations

Post by Roger de Coverly » Mon Mar 07, 2016 5:15 pm

Paul Habershon wrote:Forgot the pgn edit in the last post!

Paul Habershon wrote: Edit: what actions have I now missed above? It hasn't come out right.
You have to enclose both the header and the game with the pgn tags. I don't think italics will work inside the pgn tags.

Paul Habershon
Posts: 550
Joined: Sat Aug 07, 2010 5:51 pm

Re: Posting chess games, positions and variations

Post by Paul Habershon » Tue Mar 08, 2016 2:04 pm

Thanks for all the help so far with posting games and positions. I am a slow learner but I think I am getting better. How about this? For practice I took an extract from that 1966 book 'Chess Treasury of the Air' in which Harry Golombek reveals his 'gravest error'.


User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: Posting chess games, positions and variations

Post by Carl Hibbard » Wed Nov 01, 2017 6:57 am

Paolo Casaschi wrote:
Fri Mar 21, 2014 4:27 pm
You can either post full games or a position.

For full games (with or without annotations) get from your software the PGN export of the games and enclose those in this tag:

Code: Select all

[pgn] ... [/pgn]
For a position, get from your software the FEN string and enclose that in this tag:

Code: Select all

[pos] ... [/pos]
Notes:
- all chess software should be able to export games in PGN format and position as FEN strings; if you don't know how then refer to the manual/help of your chess software
- if you post games or a position following these instructions and the square A8 on the resulting chessboard is flashing, this means your PGN text or your FEN string is incorrect and needs fixing (you might click square A8 for more info)

For more info about the PGN format: http://en.wikipedia.org/wiki/Portable_Game_Notation
For more info about FEN strings: http://en.wikipedia.org/wiki/Forsyth%E2 ... s_Notation
Looks like we have always done POS wrong - oh dear :cry:
Cheers
Carl Hibbard

User avatar
Carl Hibbard
Posts: 6028
Joined: Fri Dec 08, 2006 8:05 pm
Location: Evesham

Re: Posting chess games, positions and variations

Post by Carl Hibbard » Wed Nov 01, 2017 7:02 am

Paolo Casaschi wrote:
Fri Mar 21, 2014 4:27 pm
This code instead gives you the final position of Aronian's game:

Code: Select all

[pos]8/5Rp1/1p3Pkp/2p5/7K/2p2P2/5n2/8 w - - 1 54[/pos]
We have been wrong since 2014?
Cheers
Carl Hibbard

Post Reply