Help me, how to draw the king on chess board.
Asked
Active
Viewed 322 times
0
-
1Welcome to TeX.SX! Please show what you have already tried so far. You'll find several examples on how to typeset chessboards and positions on this site, e.g as a starter https://tex.stackexchange.com/questions/29603/where-to-start-typesetting-chess-with-tex – siracusa Sep 17 '19 at 00:54
1 Answers
2
Here's a possibility. I've modified Sango's code from here.
\documentclass[preview]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage[LSB,LSBC4,T1]{fontenc}
\usepackage{tikz}
\usepackage[skaknew]{skak,chessboard}
\begin{document}
\setboardfontcolors{
blackfieldmask=OliveGreen!80}
\setchessboard{boardfontencoding=LSBC4,setfontcolors,showmover=false}
\chessboard[setpieces={Ke4},label=false]
\end{document}
The output is shown running in Gummi:

The line \usepackage[dvipsnames]{xcolor} gives access to more color names. The code label=false removes the labelling of the ranks and files. The capital letter gives white king while ke4 would put a black king on e4.
DJP
- 12,451
