summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/skak/tuggame.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-16 23:42:13 +0000
committerKarl Berry <karl@freefriends.org>2008-10-16 23:42:13 +0000
commitccfb7362e633d55206b5f6cdb66668f835625b32 (patch)
tree001d278e31ccd01c95474e7d05bab68f4bb4ba14 /Master/texmf-dist/doc/latex/skak/tuggame.tex
parent8ecd07ed332dbd3cd8cdfc02f03137b19b9b8f4a (diff)
skak 1.5 (16oct08)
git-svn-id: svn://tug.org/texlive/trunk@10991 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/skak/tuggame.tex')
-rw-r--r--Master/texmf-dist/doc/latex/skak/tuggame.tex152
1 files changed, 52 insertions, 100 deletions
diff --git a/Master/texmf-dist/doc/latex/skak/tuggame.tex b/Master/texmf-dist/doc/latex/skak/tuggame.tex
index 3cb59ab544c..76f4e5005af 100644
--- a/Master/texmf-dist/doc/latex/skak/tuggame.tex
+++ b/Master/texmf-dist/doc/latex/skak/tuggame.tex
@@ -25,9 +25,35 @@
%===================================================================
-\documentclass[11pt,twocolumn]{article}
+\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}}
@@ -39,127 +65,53 @@ chess game using \texttt{skak.sty}}
\maketitle
-\section{The Input}
-
-\begin{verbatim}
-\fenboard{1q3kr1/3rb2p/p3Q3/8/%
-1p6/8/PPP3PP/4R2K w - - 0 26}
+\begin{LTXexample}
+\fenboard{1q3kr1/3rb2p/p3Q3/8/1p6/8/%
+PPP3PP/4R2K w - - 0 26}
+$$\showboard$$
-\begin{figure}[htbp]
- \begin{center}
- $$\showboard$$
- \caption{Fischer--Tal after \protect\variation{25... Kf8!}
- \label{fig:after-25...Kf8}
- \end{center}
-\end{figure}
-
-
-(See figure~\ref{fig:after-25...Kf8}.)
+Fischer--Tal after \movecomment{25... Kf8!}
\mainline{26. Qxd7}
-Not \variation{26. Rf1+ Kg7 27. Rf7+
-Kh8}
-and if \variation{28. Qxd7 Rd8 29. Qg4
-Qe5}
-wins.
-
+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!
+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.
+Black's extra piece means less with each pawn that's exchanged.
\mainline{28...a5}
-On \variation{28...bxc3 29. Qc8+ Bd8
-30. Qxc3}=.
-
-
-\mainline{29. Qc8+}
-On the wrong track. Right is
-\variation{29. cxb4 Qxb4} (if
-\variation{29... axb4 30. a3! bxa3
-31. bxa3 Qxa3} draws)
-\variation{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.
-
-\mainline{29...Kg7 30. Qc4 Bd8
-31. cxb4 axb4}
-On \variation{31... Qxb4 32. Qe2}
-White should draw with best play.
-$$\showboard$$
-\end{verbatim}
+On \variation{28...bxc3 29. Qc8+ Bd8 30. Qxc3}=.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{The Output}
+\end{LTXexample}
-\fenboard{1q3kr1/3rb2p/p3Q3/8/%
-1p6/8/PPP3PP/4R2K w - - 0 26}
+\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.
-\begin{figure}[htbp]
- \begin{center}
- $$\showboard$$
- \caption{Fischer--Tal after
- \tracingmacros=1\variation{25... Kf8!}\tracingmacros=0}
- \label{fig:after-25...Kf8}
- \end{center}
-\end{figure}
+\restoregame{mainline} \hidemoves{29. Qc8+}
-
-(See figure~\ref{fig:after-25...Kf8}.)
-
-
-\mainline{26. Qxd7}
-
-
-Not \variation{26. Rf1+ Kg7 27. Rf7+
-Kh8}
-and if \variation{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}=.
-
-
-\mainline{29. Qc8+}
-On the wrong track. Right is
-\variation{29. cxb4 Qxb4} (if
-\variation{29... axb4 30. a3! bxa3
-31. bxa3 Qxa3} draws)
-\variation{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.
-
-\mainline{29...Kg7 30. Qc4 Bd8
-31. cxb4 axb4}
+\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}