Typesetting Chessboard with the chessboard package

I recently started Chess again, so I wanted to typeset some chessboards. With the chessboard package by Ulrike Fischer this is pretty much straight forward. Here’s a 2-page example what the package can do. It can do much more, I’ll post additional examples if I find some time.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[left=1cm,right=1cm,top=2cm,bottom=2cm]{geometry}
\usepackage{chessboard,xskak}
\usepackage{graphicx,booktabs}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\begin{document}\centering
 
\scalebox{2}{\chessboard[setpieces={Ne4,Ka1,ka2}]}
 
\scalebox{2}{%
\setchessboard{showmover=false}
\newchessgame
\chessboard}
 
\scalebox{2}{%
\setchessboard{showmover=true}
\chessboard[setpieces={Ka1,ka2,Rb1,rb2,Nc1,nc2,Qd1,qd2,Be1,be2,Pf1,pf2,Qd3},
    pgfstyle=straightmove,
    arrow=stealth,
    linewidth=.25ex,
    padding=1ex,
    color=red!75!white,
    pgfstyle=straightmove,
    shortenstart=1ex,
    showmover=true,
    markmoves={d3-h7,d3-a6,d3-b1,d3-f1,d3-d8,d3-d1,d3-a3,d3-h3}]
}
 
Capital letters for white, small letters for black.
 
\begin{tabular}{cll} \toprule
Letter & English & German \\ \midrule
K & King & König \\
Q & Queen & Dame \\
R & Rook & Turm \\
N & Knight & Pferd \\
B & Bishop & Läufer \\
P & Pawn & Bauer \\ \bottomrule
\end{tabular}
 
\end{document}

chess

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website