我需要你帮助我编辑 LaTeX:
我想准备一本包含战术的国际象棋书。但是,我无法调整页面以在图表下方添加文字。我该怎么做?以下是我的想法的图片(已编辑的 .jpeg)和我的代码。
现在:
\documentclass[12pt,a4paper]{book}
\usepackage{xskak}
\usepackage{texmate}
\newcounter{diagrams}
\newcommand\printdiagrams{\refstepcounter{diagrams}\thediagrams}
\begin{document}
\part{Positions}
\chapter{a Deflection and overloading}
\printdiagrams
\chessboard[setfen=6k1/4p3/3p2p1/4brp1/7q/1P2B2P/PP1Q2P1/5RK1 b, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=-1.5ex]\hfill\printdiagrams
\chessboard[setfen=Bn3rk1/p4p1p/b2P2p1/2p1b1B1/3q4/8/P4RPP/2RQ2K1 b, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=-1.5ex]\hfill\printdiagrams
\chessboard[setfen=8/1P6/2n1k3/8/3B1p1p/5P1p/8/5K2 w, showmover=true, moverstyle=triangle, movershift=-1.5ex, moverlift=16.5ex]\hfill\printdiagrams
\chessboard[setfen=6k1/1p1b4/3p4/3Pp3/2Q1P1P1/8/3rBq1R/7K b, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=-1.5ex]\hfill\printdiagrams
\chessboard[setfen=4r3/PB6/1n6/8/5k2/1P3pp1/2R5/5K2 w, showmover=true, moverstyle=triangle, movershift=-1.5ex, moverlift=16.5ex]\hfill
...
\end{document}
问候,Ulvi Bajarani
答案1
\documentclass[12pt,a4paper]{book}
\usepackage{xskak}
\usepackage{texmate}
\newcounter{diagrams}
\newcommand\printdiagrams{\refstepcounter{diagrams}\thediagrams}
\setchessboard{showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=-1.5ex}
\newcommand\tacticboard[2][]{%
\noindent\begin{minipage}[t]{0.49\textwidth}
\centering\printdiagrams\chessboard[#2]\par
\Large\bfseries #1\strut
\end{minipage}\hfill\ignorespaces }
\begin{document}
\part{Positions}
\chapter{a Deflection and overloading}
\tacticboard[Find a tactic]{setfen=6k1/4p3/3p2p1/4brp1/7q/1P2B2P/PP1Q2P1/5RK1 b}
\tacticboard[is a move relevant?]{setfen=Bn3rk1/p4p1p/b2P2p1/2p1b1B1/3q4/8/P4RPP/2RQ2K1 b}
\tacticboard{setfen=8/1P6/2n1k3/8/3B1p1p/5P1p/8/5K2 w,moverlift=16.5ex}
\tacticboard[find a draw]{setfen=6k1/1p1b4/3p4/3Pp3/2Q1P1P1/8/3rBq1R/7K b}
\tacticboard{setfen=4r3/PB6/1n6/8/5k2/1P3pp1/2R5/5K2 w,moverlift=16.5ex}
...
\end{document}