%
% Based on the package documentation:
% http://mirrors.ctan.org/macros/latex/contrib/texmate/texmate2manual.pdf
%
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{texmate}
\title{Example: Chess with TeXmate}
\date{}
\begin{document}
\maketitle
\section{Game with Diagram of Final Board State}
\whitename{Dubois}
\blackname{Steinitz}
\chessevent{London 1862}
\ECO{C50}
\chessopening{Giucco Pianissimo}
\makegametitle
|1 e4 e5 Nf3 Nc6 Bc4 Bc5 0-0 d6 d3 Nf6 Bg5
h6 Bh4 g5 Bg3 h5 Nxg5 h4 Nxf7 hxg3
Nxd8 Bg4 Qe1 Nd4 Nc3 Nf3+ gxf3 Bxf3 \resigns|
\begin{figure}[h]
\centering
\showboard
\end{figure}
\newpage
\section{Diagrams of Chosen Board States}
Use the \textbackslash toD command to request a diagram.
\whitename{Dubois}
\blackname{Steinitz}
\chessevent{London 1862}
\ECO{C50}
\chessopening{Giucco Pianissimo}
\makegametitle
|1 e4 e5 Nf3 Nc6 Bc4 Bc5 d3 Nf6 Bg5?! [Nc3]
d6 O-O?! h6 Bh4 g5 Bg3 h5! Nxg5 h4! Nxf7 hxg3!!
\toD{hxg3!!} Nxd8 [Nxh8 Qe7! \threat<Qh7> Nf7 Bxf2+
Rxf2 gxf2+ Kxf2 Ng4+ Kg3 Qf6 Qf3 Qg7\BBetter] Bg4
Qe1 Nd4 Nc3
\onlymove
[h3 Ne2+ Kh1 Rxh3+ gxh3 Bf3\#]
Nf3+! gxf3 Bxf3 \toD{Bxf3} \resigns|
\begin{figure}[h]
\makediagrams
\end{figure}
\end{document}