\documentclass[10pt,DIV=15]{scrreprt}
% This is a LaTeX file generated by Scid.
% You must have the skak, KOMAScript and pstricks packages installed to typeset this file.

\usepackage{scrpage2}
\usepackage{charter}
\usepackage[svgnames]{xcolor}
\usepackage{xskak}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{latexsym}
\usepackage{pstricks-add}
\usepackage{tabularx}
\usepackage{ifthen}
\usepackage{xstring}

% \definecolor{VariationColor}{gray}{0.40}
\definecolor{VariationColor}{RGB}{0,0,128}
% \definecolor{ScoreColor}{gray}{0.40}
\definecolor{ScoreColor}{RGB}{255,215,0}
\definecolor{GridColor}{RGB}{72,61,139}
\definecolor{EvenGameColor}{RGB}{240,240,240}
\definecolor{BlackPiecesGraphColor}{RGB}{101,37,37}
\definecolor{WhitePiecesGraphColor}{RGB}{189,183,107}

\setlength{\extrarowheight}{0.3ex}  
\setlength{\parskip}{1ex} % changes vertical space between paragraphs
  
\newcommand{\win}{1-0}
\newcommand{\loss}{0-1}  
\newcommand{\draw}{=-=}  
\newcommand{\p}{\figsymbol{p}}
\newcommand{\N}{\figsymbol{N}}
\newcommand{\B}{\figsymbol{B}}
\newcommand{\R}{\figsymbol{R}}
\newcommand{\Q}{\figsymbol{Q}}  
\newcommand{\K}{\figsymbol{K}}    

\newcommand{\chessboardwithmarks} {%
\xskakset{lastmoveid}
\xskakget{castling}
\ifthenelse{\boolean{xskakboolcastling}}
{\IfStrEq{\xskakget{movefrom}}{e8,h8}{\setchessboard{pgfstyle=curvemove, color=gray, markmoves={e8-g8, h8-f8}}}{}%
\IfStrEq{\xskakget{movefrom}}{e1,h1}{\setchessboard{pgfstyle=curvemove, color=gray, markmoves={e1-g1, h1-f1}}}{}%
\IfStrEq{\xskakget{movefrom}}{e8,a8}{\setchessboard{pgfstyle=curvemove, color=gray, markmoves={e8-c8, a8-d8}}}{}%
\IfStrEq{\xskakget{movefrom}}{e1,a1}{\setchessboard{pgfstyle=curvemove, color=gray, markmoves={e1-c1, a1-d1}}}{}%
\chessboard[lastmoveid,pgfstyle=border,color=gray,markfields={\xskakget{moveto},\xskakget{movefrom}}]}
{\chessboard[lastmoveid,pgfstyle=border,color=gray,markfields={\xskakget{moveto},\xskakget{movefrom}},pgfstyle=straightmove,markmove=\xskakget{movefrom}-\xskakget{moveto}]}
}

  
\renewcommand*\thesection{\arabic{section}}
\addtokomafont{section}{\color{blue}}
\addtokomafont{subsection}{\color{red}}

\begin{document}
\twocolumn[
\begin{@twocolumnfalse}
{
\center
\begin{tabularx}{0.9\textwidth}{rllXr}
White: & Leitao, Rafael & (2633) & & Jogos Abertos SP\\
Black: & Mecking, Henrique & (2606) & & \\
Opening ECO: & E70p & & & 2015.12.05\\
Result: & 1-0\\
\end{tabularx}
\vspace{1ex} %
}

\newchessgame
\hrulefill
\vspace{1ex}
\end{@twocolumnfalse}
]

\mainline[style=UF]{1. d4 Nf6  2.c4 g6 3.Nc3 Bg7  4.e4 d6  5.Bd3 O-O} 
\begin{center}
\chessboardwithmarks
\end{center}

\mainline {6.Nge2 c5  7.d5 e6  8.Bg5 h6  9.Bh4 exd5  10.Nxd5 }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{10. exd5 }}

\textcolor{VariationColor}{\variation{10. cxd5 }}

\mainline{10... Be6  }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{10... Nc6  11. O-O g5  12. Bg3{\unclear} }}

\textcolor{VariationColor}{\variation{10... g5  11. Bg3 Nxd5  12. cxd5 Bxb2  13. Rb1 Bg7  14. h4{\unclear} }}

\mainline{11. O-O }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{11. Nec3 Bxd5 12. Nxd5 Nc6  13. O-O g5  14. Bg3 Nxd5  15. exd5 Nd4  16. f4 f5  }}

\mainline{11... Bxd5  12.exd5 Nbd7  13.Nc3 Qb6  14.Qc2 Rae8  15.h3 Nh5  16.f4!{\wbetter} Bf6  17.Bxf6 Nhxf6  18.Rf3 Re7  19.Raf1 Rfe8  20.Qf2 Qd8  21.g4 a6  22.a4 Nh7  23.Kh1 Nhf6  24.Rg1 Nf8  25.h4 Ne4?  }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{25... Qd7!  }}

\mainline{26. Nxe4 Rxe4  27.Bxe4 Rxe4  28.b3 Qe7  29.Qg3 Nd7  30.h5 g5  31.Rgf1 gxf4  32.Rxf4 Re3  33.R4f3 Qe4  34.Kg1? }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{34. Kh2!{\wdecisive} }}

\mainline{34... Rxf3  35.Qxf3 Qd4+  36.Qf2 Qxg4+  37.Qg2 Qxg2+  38.Kxg2 Kg7?!  }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{38... a5!  }}
\mainline{39. Kf3?! }

\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{39. a5! }}

\mainline{39... a5!  40.Kf4 Nf6  41.Rh1 Kf8  42.Kf5 Ng8?  }
\begin{center}
\chessboardwithmarks
\end{center}

\textcolor{VariationColor}{\variation{42... Nd7!  }}

\mainline{43. Rg1! Ne7+  44.Kf6 Ng8+  45.Rxg8+! Kxg8  46.Ke7{\wdecisive} f5  47.Kxd6 f4  48.Kc7 f3  49.d6 f2  50.d7 f1=Q  51.d8=Q+ Kf7  52.Qd5+ Kf6  53.Kxb7 Qb1  54.Qxc5 Kg7  55.Qc7+ Kf6  56.Qb6+ Ke5  57.c5 Qe4+  58.c6 Kf4  59.Ka7 Kg4  60.c7 Qe7  61.Qb7 Qe3+  62.Ka8 }

{\textbf 1-0}
\vspace{1ex}
\hrule 
\end{document}
