国际象棋开局文件

国际象棋开局文件

我正在尝试制作一份包含国际象棋开局的 PDF。之前我使用 skak,但现在我正在将其转换为 texmate。我想将主线以粗体显示为居中文本。我还希望将图表居中。目前,当我将文本放在符号的两个部分之间时,我有时会得到错误的移动编号。另一件事是枚举不是逐项列表。

我尝试按照包装中附带的手册操作,但一定做错了。有人能给我指点迷津吗?

我包括我的“主要”文本和第一“章”。

\documentclass[dutch,twocolumn,a4paper,10pt]{report}

\usepackage[skaknew]{chessfss}
\usepackage{texmate}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage{enumitem}
\usepackage{titlepic}
\usepackage{epsfig}
\usepackage[dvips,colorlinks]{hyperref}

\topmargin =-15.mm
\oddsidemargin =0.mm
\evensidemargin =0.mm
\headheight =0.mm
\headsep =0.mm
\textheight =250.mm
\textwidth =165.mm
\parindent =0.mm

\setlist{noitemsep}

\newcommand{\nieuwelijn}[3]{
  \begin{center}\hrule\end{center}
  \newgame
  \section{#1}
  \position[{#2}]{#3}
}
\newcommand{\opening}[1]{
  \chapter{#1}
  \newgame
}
\newcommand{\printbord}{
  \begin{center}\showboard\end{center}
}
\newcommand{\sublijn}[3]{
  \begin{center}\hrule width 3cm\end{center}
  \newgame
  \subsection{#1}
  \newgame
  \position[{#2}]{#3}
}
\newcommand{\tekst}[1]{
  \parskip=2.mm
  #1
  \parskip=0.mm
}

\newcommand{\subsublijn}[3]{
  \begin{center}\hrule width 2cm\end{center}
  \newgame
  \subsubsection{#1}
  \newgame
  \position[{#2}]{#3}
}
\newcommand{\extra}[2]{
  \begin{center}\hrule width 3cm\end{center}
  \newgame
  \position[{#1}]{#2}
}
\newcommand{\variant}[1]{
  \begin{center}\hrule\end{center}
  \newgame
}

%\rightdiagramturn
\setboardfontsize{14pt}

\renewcommand\afterb{ }
\renewcommand\iopen{\par}
\renewcommand\iclose{\par}

\hypersetup{
citecolor=black,
linkcolor=black,
pdfauthor={Marco de Booij},
pdftitle={Opening Theorie},
pdfsubject={Opening Theorie},
pdfkeywords={schaken, theorie, openingen},
pdfcreator={LaTeX with hyperref package},
pdfproducer={latex + bibtex + dvips + ps2pdf}}

\title{Opening Theorie}
\author{Marco de Booij}
\date{\today{}}

\begin{document}
\maketitle

\tableofcontents

\input{Engels.tex}

\end{document}

Engels.tex的内容为:

\opening{Engels - A10-A39}
\tekst{Het Engels dankt zijn naam de Engelse (officieuze) wereldkampioen Howard Staunton. Hij speelde het in 1843 tijdens zijn match tegen Saint-Amant en in Londen tijdens het eerste internationale toernooi in 1851.}
\begin{center}|c4|\end{center}
\printbord
\begin{center}|c5|\end{center}
\tekst{Het Symetrisch Engels heeft als voordeel dat hoewel er veel mogelijke zetten zijn dat je meestal op dezelfde stellingen en mogelijkheden uitkomt. Ook is de strategie zowel voor wit als voor zwart te gebruiken. Verder kan het ook gebruikt worden tegen het Réti.}
\begin{center}|Nc3 Nc6|\end{center}
\printbord
\tekst{Het hoofddoel is om als wit \wmove{d4} te spelen of als zwart \bmove{d5}.

Wit moet nu een keuze maken. Hij kan proberen om d5 te controleren of om \wmove{d4} te spelen. Voor de 1\textsuperscript{e} keuze speelt hij \wmove{Nc3} gevolgd door \wmove{g3} en \wmove{Bg2}. Voor de 2\textsuperscript{e} speelt hij \wmove{Nf3} waarna \wmove{d4} gespeeld kan worden of nog wat wachten en eerst nog wat verder ontwikkelen}
\printbord
\tekst{Nu is het zwart zijn beurt om een(zelfde) keuze te maken.}
\[|\ahead\begin{variations}
\var d4
\var Nf3
\var g3
\end{variations}|\]

\nieuwelijn{Tweepaardensysteem (Axx)}{w 3}{r1bqkbnr/pp2pppp/2n5/2p5/2P5/2N5/PP2PPPP/R1BQKBNR}
\begin{center}|d4|\end{center}
\printbord
\tekst{Wit speelt meteen \wmove{d4}.}

\nieuwelijn{Driepaardensysteem (A35)}{w 3}{r1bqkbnr/pp2pppp/2n5/2p5/2P5/2N5/PP2PPPP/R1BQKBNR}
\begin{center}|Nf3 g6|\end{center}
\printbord

\nieuwelijn{Fianchettovariant (A36)}{w 3}{r1bqkbnr/pp2pppp/2n5/2p5/2P5/2N5/PP2PPPP/R1BQKBNR}
\begin{center}|g3|\end{center}
\printbord
\begin{center}|g6 4.Bg2 Bg7 5.Nf3 Nf6 6.O-O O-O|\end{center}
\printbord

答案1

texmate 不会全局存储移动计数器。因此,如果您用中心环境包围游戏的各个部分,skak 就会失去对游戏状态的跟踪。

\documentclass[twocolumn]{report}
\usepackage[skaknew]{chessfss}
\usepackage{texmate}
\usepackage[T1]{fontenc}
\usepackage{ragged2e}
\makeatletter
\newcommand\storechessstate{%
 \if@white\global\whitetrue\else\global\@whitefalse\fi \global\move=\move}
\makeatother 

\begin{document}
%Works
\newgame
|c4 c5 e4| 

|e5|

%Errors due to grouping
%\newgame
%\begin{center}|c4 c5 e4| \end{center}
%
%\begin{center}|e5|\end{center}

% Workarounds
% ==========

%\mainline works

\newgame
\begin{center}\mainline{1.c4 c5 2.e4}\end{center}

\begin{center}\mainline{2... e5}\end{center}



%Storing state works, but untested if it affects variations and comments
\newgame
\begin{center}|c4 c5 e4| \storechessstate \end{center}

\begin{center}|e5|\end{center}


%centering/justifying instead of centering environment works to:
\newgame

blbalbalbablabablabal

\par\centering
|c4 c5 e4|
\par\justifying %from ragged2e

blbalbalbabla

\par\centering
|e5|
\par\justifying 
\end{document}

答案2

在这里我想发布“正确的” Engels.tex:

\opening{Engels - A10-A39}
\tekst{Het Engels dankt zijn naam de Engelse (officieuze) wereldkampioen Howard Staunton. Hij speelde het in 1843 tijdens zijn match tegen Saint-Amant en in Londen tijdens het eerste internationale toernooi in 1851.}
\par\centering|c4|\par\justifying
\printbord
\par\centering|c5|\par\justifying
\tekst{Het Symetrisch Engels heeft als voordeel dat hoewel er veel mogelijke zetten zijn dat je meestal op dezelfde stellingen en mogelijkheden uitkomt. Ook is de strategie zowel voor wit als voor zwart te gebruiken. Verder kan het ook gebruikt worden tegen het Réti.}
\par\centering|Nc3 Nc6|\par\justifying
\printbord
\tekst{Het hoofddoel is om als wit \wmove{d4} te spelen of als zwart \bmove{d5}.

Wit moet nu een keuze maken. Hij kan proberen om d5 te controleren of om \wmove{d4} te spelen. Voor de 1\textsuperscript{e} keuze speelt hij \wmove{Nc3} gevolgd door \wmove{g3} en \wmove{Bg2}. Voor de 2\textsuperscript{e} speelt hij \wmove{Nf3} waarna \wmove{d4} gespeeld kan worden of nog wat wachten en eerst nog wat verder ontwikkelen}
\printbord
\tekst{Nu is het zwart zijn beurt om een(zelfde) keuze te maken.}
|\[\ahead\begin{variations}
\var d4
\var Nf3
\var g3
\end{variations}\]|

\nieuwelijn{Tweepaardensysteem (Axx)}{w 3}{r1bqkbnr/pp2pppp/2n5/2p5/2P5/2N5/PP2PPPP/R1BQKBNR}
\par\centering|d4|\par\justifying
\printbord
\tekst{Wit speelt meteen \wmove{d4}.}

\nieuwelijn{Driepaardensysteem (A35)}{w 3}{r1bqkbnr/pp2pppp/2n5/2p5/2P5/2N5/PP2PPPP/R1BQKBNR}
\par\centering|Nf3 g6|\par\justifying
\printbord

\nieuwelijn{Fianchettovariant (A36)}{w 3}{r1bqkbnr/pp2pppp/2n5/2p5/2P5/2N5/PP2PPPP/R1BQKBNR}
\par\centering|g3|\par\justifying
\printbord
\par\centering|g6 Bg2 Bg7 Nf3 Nf6 O-O O-O|\par\justifying
\printbord

主线以粗体显示并居中。动作编号也正确,变化则以分项列表显示。

不要忘记在“主”文本中添加 \usepackage{ragged2e}。否则,\justifying 将产生错误。

答案3

我不确定您要完成什么,但您可能可以使用以下命令:

\documentclass{article}
\usepackage{xspace,xcolor}
\usepackage[screen,nopanel]{pdfscreen}
\hypersetup{pdftoolbar=true}
%\usepackage[display]{texpower}
\usepackage{chessfss}

\margins{0.25in}{0.25in}{0.25in}{0.25in}
\screensize{4.5in}{6in}
\backgroundcolor{lightgray}

\setlength{\parindent}{0in}

\newlength{\symsize}\setlength{\symsize}{24pt}
\newlength{\boardwidth}\setlength{\boardwidth}{8\symsize}
\setboardfontsize{\symsize}

\newcommand{\board}[1]{\framebox{\parbox{\boardwidth}{\setlength{\baselineskip}{\symsize}#1}}}
\newcommand{\row}[1]{\parbox[c][\symsize]{\symsize}{\hfill{#1}}}
\newcommand{\col}[1]{\parbox[b]{\symsize}{\hfil{#1}}}
\newcommand{\chessboard}[1]{\begin{tabular}{cc}
\parbox{\symsize}{\setlength{\baselineskip}{\symsize}
\row{8} \row{7} \row{6} \row{5} \row{4} \row{3} \row{2} \row{1}}&\board{#1}\\
\row{ } &\mbox{\col{a}\col{b}\col{c}\col{d}\col{e}\col{f}\col{g}\col{h}}
\end{tabular}}
\newcommand{\blue}[1]{{\color{blue}#1}}

\begin{document}\large

\BlackRookOnWhite\BlackKnightOnBlack\BlackBishopOnWhite\BlackQueenOnBlack\BlackKingOnWhite\BlackBishopOnBlack\BlackKnightOnWhite\BlackRookOnBlack\\
\BlackPawnOnBlack\BlackPawnOnWhite\BlackPawnOnBlack\BlackPawnOnWhite\BlackPawnOnBlack\BlackPawnOnWhite\BlackPawnOnBlack\BlackPawnOnWhite\\
\WhitePawnOnWhite\WhitePawnOnBlack\WhitePawnOnWhite\WhitePawnOnBlack\WhitePawnOnWhite\WhitePawnOnBlack\WhitePawnOnWhite\WhitePawnOnBlack\\
\WhiteRookOnBlack\WhiteKnightOnWhite\WhiteBishopOnBlack\WhiteQueenOnWhite\WhiteKingOnBlack\WhiteBishopOnWhite\WhiteKnightOnBlack\WhiteRookOnWhite\
\blue{\BlackQueenOnWhite\BlackKingOnBlack\WhiteKingOnWhite\WhiteQueenOnBlack}\
\newpage
\begin{center}\chessboard{
\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\\
\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\\
\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\\
\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\\
\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\\
\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\\
\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\\
\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare\BlackEmptySquare\WhiteEmptySquare
}\end{center}

\end{document}

相关内容