summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/skak/tuggame.tex
blob: 76f4e5005af5eb7481d3ac644d6e2bb4e4edee76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
% This is a skak version of the tugame.ltx which Piet Tutelaers made
% to show how the original chess package could be used.
% I have changed it to use the skak package commands as a
% demonstration of how to use the skak package.
% Author: Torben Hoffmann
%
% Change history
% --------------
% Version          Comments 
%  1.0             Initial version adapted to the skak package.

% The original comments follows below
%===================================================================
%
% TUGgame.ltx
% -----------
% LaTeX source of example in TUGboat article (part of the game Fisher
% lost against Tal), input'ted by TUGboat.ltx.
% Author : Piet Tutelaers (internet: rcpt@urc.tue.nl)
% Version: 1.2 ( 8 Jun 1991)
%    Reflects changes in chess.sty version 1.2
% Version: 1.1 (30 Nov 1990)
%    Improvements over version 1.0:
%     - two typos corrected, thanks Hugo
%===================================================================


\documentclass[10pt]{article}

\usepackage[ps,mover,styleC]{skak}
\usepackage[final]{showexpl}
\usepackage{a4wide}


\makeatletter
%% to get showexpl to respekt empty lines
%% this corrects a bug in showexpl as long
%% as the new version isn't there
\renewcommand*\SX@resultInput{%
  %%\MakePercentComment\catcode`\^^M=10\relax
  \SX@@preset\SX@preset
  \if@SX@rangeaccept
    \let\@tempa=\SX@input% Nur sinnvoll bei \LTXinputExample
  \else
    \let\@tempa=\input
  \fi
  \@tempa{\SX@codefile}%
  \MakePercentIgnore}
\makeatother


\lstset{width=0.5} % wider examples
\lstset{preset=\raggedright}




\title{Example of the LaTeX-input and output of an annotated 
chess game using \texttt{skak.sty}}
\author{Torben Hoffmann}

\begin{document}

\parindent=0pt

\maketitle


\begin{LTXexample}
\fenboard{1q3kr1/3rb2p/p3Q3/8/1p6/8/%
PPP3PP/4R2K w - - 0 26}


$$\showboard$$

Fischer--Tal after \movecomment{25... Kf8!}

\mainline{26. Qxd7}

Not \variation{26. Rf1+ Kg7 27. Rf7+ Kh8} and if
\continuevariationcurrent{28. Qxd7 Rd8 29. Qg4 Qe5} wins. 

\mainline{26...Qd6 27. Qb7 Rg6}
Within a handful of moves the game has changed its complexion. 
Now it is White who must fight for a draw! 

\mainline{28. c3}
Black's extra piece means less with each pawn that's exchanged.

\mainline{28...a5}
On \variation{28...bxc3 29. Qc8+ Bd8 30. Qxc3}=.

\end{LTXexample}

\begin{LTXexample}

\storegame{mainline}
\mainline{29. Qc8+} 
On the wrong track. Right is \variation{29. cxb4 Qxb4}  (if 
\continuevariation{29... axb4 30. a3! bxa3 31. bxa3 Qxa3} 
draws) 
\restoregame{mainline} \hidemoves{29. cxb4 Qxb4}
\variationcurrent{30. Qf3+ Kg7 31. Qe2} draws, 
since Black can't possibly build up a winning K-side 
attack and his own king is to exposed.

\restoregame{mainline} \hidemoves{29. Qc8+}

\mainline{29...Kg7 30. Qc4 Bd8 31. cxb4 axb4}
On \variation{31... Qxb4 32. Qe2} 
White should draw with best play.
$$\showboard$$

\end{LTXexample}

\end{document}