我正在尝试从 LaTeX Graphics Companion 编译 example10-1-12,但出现错误:
命令行:bibtex.exe “chess2” 启动文件夹:C:\Users\hynek0\Desktop\TH0dipl
这是 BibTeX,版本 0.99d(MiKTeX 2.9.7050 64 位)顶级辅助文件:chess2.aux 我在读取文件 chess2.aux 时未找到 \citation 命令
(D:\ProgramFiles\MikTexNEW\tex/latex/base\ts1cmr.fd)(D:\ProgramFiles\MikTexNEW\tex/latex/psnfss\t1ptm.fd)(D:\ProgramFiles\MikTexNEW\tex/latex/enpassant\lsfmagnetic.fd)
LaTeX 字体警告:LSF/magnetic/bx/n' undefined (Font) using
输入行 26 上的字体形状为 LSF/magnetic/m/n'。
! 主线:白线,非黑线,走 (b5)。...线:白线,非黑线,走 (b5)}
l.31 7. e4} . ?
!紧急停止。...线:白色,不是黑色,移动(b5)}
l.31 7. e4}。
PDFTeXify 编译报告(页数:0)
错误:2 警告:1 坏盒:0
(注:ttctexa
类文件可以在这里,它在 TeXlive 和 MikTeX 中默认不安装)
%%
%% The LaTeX Graphics Companion, 2ed (first printing May 2007)
%%
%% Example 10-1-12 on page 678.
%%
%% Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%%
%% See http://www.latex-project.org/lppl.txt for details.
%%
\documentclass{ttctexa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{231.83385pt}
\StartShownPreambleCommands
\usepackage{skak}
\smallboard
\setchessfontfamily{magnetic}
\StopShownPreambleCommands
\begin{document}
\newgame
\mainline{1. d4 Nf6 2. c4 c5 3. d5}
A possible continuation is the Benko
Gambit.
\variation{3... b5 4. cxb5 a6
5. bxa6 Bxa6 6. Nc3 d6
7. e4}.
Here the game follows the Classical
Benoni opening
\mainline{3... e6 4. Nc3 exd5
5.cxd5 d6 6. e4 g6}
leading after some additional moves
\ldots\hidemoves{7. Nf3 Bg7 8. Be2 O-O}
to \mainline{9. O-O a6 10.a4 Bg4}.
\begin{center} \showboard \end{center}
\end{document}
答案1
最新skak
版本改变了 的行为variation
。它不再只输入动作,它还会尝试解析游戏,这使得它在动作方面更加挑剔:变体必须是变体。因此,您应该移动模式e6
:
\documentclass{article}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{231.83385pt}
%\StartShownPreambleCommands
\usepackage{skak}
\smallboard
\setchessfontfamily{magnetic}
%\StopShownPreambleCommands
\begin{document}
\newgame
\mainline{1. d4 Nf6 2. c4 c5 3. d5 e6}
A possible continuation is the Benko
Gambit.
\variation{3... b5 4. cxb5 a6
5. bxa6 Bxa6 6. Nc3 d6
7. e4}.
Here the game follows the Classical
Benoni opening
\mainline{4. Nc3 exd5
5.cxd5 d6 6. e4 g6}
leading after some additional moves
\ldots\hidemoves{7. Nf3 Bg7 8. Be2 O-O}
to \mainline{9. O-O a6 10.a4 Bg4}.
\begin{center} \showboard \end{center}
\end{document}
在变体无法解析的地方,您可以使用 xskak 来代替 skak:
\documentclass{article}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{231.83385pt}
%\StartShownPreambleCommands
\usepackage{xskak}
\xskakset{style=styleB}
\setchessboard{smallboard}
%\setchessfontfamily{magnetic}
%\StopShownPreambleCommands
\begin{document}
\newgame
\mainline{1. d4 Nf6 2. c4 c5 3. d5}
A possible continuation is the Benko
Gambit.
\variation[invar]{3... b5 4. cxb5 a6
5. bxa6 Bxa6 6. Nc3 d6
7. e4}.
Here the game follows the Classical
Benoni opening
\mainline[outvar]{3... e6 4. Nc3 exd5
5.cxd5 d6 6. e4 g6}
leading after some additional moves
\ldots\hidemoves{7. Nf3 Bg7 8. Be2 O-O}
to \mainline{9. O-O a6 10.a4 Bg4}.
\begin{center} \chessboard \end{center}
\end{document}