Sunday, 10 December 2017

CHESS: HOW TO EMBED A FULL CHESS GAME IN A BLOG

In this blog post I challenged myself to learn how to embed an entire game into a blog post, specifically this current blog post. I succeeded without too much difficulty. I've embedded a rather wild game from the Spassky versus Fischer World Championship Match in Reykjavik in 1972.

To get it to work (using the information on chessbase link), the PGN file is pasted into the HTML between DIV tags as follows:

Then some Javascript needs to be pasted in so that the ChessBase server can be accessed.


This is similar to how LaTeX gets rendered when I'm creating a mathematical post. While viewing in a browser in Android however, the LaTeX doesn't get rendered whereas with the embedded chess game, it does. However, in the Blogger app for Android, it is not displayed.

I guess what I need to investigate now is what control I have over how the game appears and what other chess websites provide this sort of service.
[Event "World Championship 28th"] [White "Spassky, Boris V"] [Black "Fischer, Robert James"] [Site "Reykjavik"] [Result "1–0"] [Date "1972.08.06"] [WhiteElo "2660"] [BlackElo "2785"] 1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6 6. Bg5 e6 7. f4 Qb6 8. Qd2 Qxb2 9. Nb3 Qa3 10. Bxf6 gxf6 11. Be2 h5 12. 0-0 Nc6 13. Kh1 Bd7 14. Nb1 Qb4 15. Qe3 d5 16. exd5 Ne7 17. c4 Nf5 18. Qd3 h4 19. Bg4 Nd6 20. N1d2 f5 21. a3 Qb6 22. c5 Qb5 23. Qc3 fxg4 24. a4 h3 25. axb5 hxg2+ 26. Kxg2 Rh3 27. Qf6 Nf5 28. c6 Bc8 29. dxe6 fxe6 30. Rfe1 Be7 31. Rxe6

No comments:

Post a Comment