我想创建一本国际象棋练习册,所以我正在学习 LaTeX。我想用以下四个东西注释国际象棋图:
- 努恩会议
- 难度级别
- 移动器
- 练习编号
我的问题是:
- 如何在棋盘图上添加页眉和页脚?
- 是否可以将标题部分左对齐、居中对齐和右对齐?
这是我的代码:
\documentclass{article}
\usepackage[a4paper,bindingoffset=0.5in,%
left=0.5in,right=0.5in,top=0.5in,bottom=0.5in,%
footskip=0in]{geometry}
\usepackage{chessboard}
\begin{document}
\begin{center}
\chessboard[smallboard, setfen=3r1rk1/pp3ppp/3pn3/1qpN4/5PP1/P5PQ/1PP5/1K1R4 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=6R1/2p1qr1k/1p1p1r1p/p3p3/2P1P3/2P3Q1/PP3P2/2K3R1 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=2kr2nr/pp1n1ppp/2p1p3/8/1P1P1B2/2N2Q1P/1PPKBPP1/8 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=5r2/p3Qnkp/1p3Np1/2p3P1/3q4/5P2/PP3R1r/4R1K1 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=r1b2r1k/ppb2ppB/3q4/8/2PN1n1Q/PP6/1B3PPP/R4RK1 b - - 0 1, inverse=true, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=5r1k/6p1/p2p1rRp/2pPpq1Q/8/PPp1P3/5P1R/K7 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=r1n3k1/pp2q2p/2ppr1pQ/4p3/8/2N4R/PPP3PP/5RK1 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=4rr1k/p4pb1/5R1p/1p2q3/3p4/3P2R1/PP1Q2BP/7K w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=r4r1k/ppn4p/2p2N2/4P3/2pP1N2/5K2/PPP5/6R1 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=k1r5/1p4pq/p7/5n2/3nQ3/P7/RPP2PPP/2B2RK1 b - - 0 1, inverse=true, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=5r1k/1p1br2p/pqnbpp2/3p4/3P4/P1NQ1N2/1PB2PPP/R3R1K1 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\chessboard[smallboard, setfen=2kr1r2/pp1n3p/2p1bp2/8/5B2/8/PP2BP1P/2R1K1R1 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
\end{center}
\end{document}
答案1
这个怎么样:
\usepackage{chessboard}
\begin{document}
\begin{center}
\begin{tikzpicture}
\node at (-1.8,2.35){+/+};
\node at (0,2.35){stars};
\node at (0,-2.8){Turn 1};
\node at (0,0){
\chessboard[smallboard, setfen=3r1rk1/pp3ppp/3pn3/1qpN4/5PP1/P5PQ/1PP5/1K1R4 w - - 0 0, showmover=true, moverstyle=triangle, movershift=-1.3ex, moverlift=16.5ex]
};
\end{tikzpicture}
\end{center}
\end{document}