1

Consider the following example:

\documentclass{article}
\usepackage{xskak}
%\usetextfig
\usesymfig
\begin{document}
\textsymfigsymbol{Q}
\end{document}

This printes the white queen.

How do I print the black queen instead of the white?

I can't find anything relating to this in the manual.

Update

I didn't explain myself well very well the first time: I would like a single command where I'm able to switch between white and black, and not just type a command for the white pieces and another command for the black pieces ... Something like the solution here where I change notation style depending on \usetextfig or \usesymfig but where I'm also able to change the color of each typeset piece form a single command. It it possible to create such a command? (I hope it makes sense.)

Nevermind the exact vertical positioning of the black pieces (see Ulrike's answer to my original question for an explanation); I can fiddle with that myself.

1 Answers1

2

The relevant manual for chess fonts is chessfss not xskak.

Beside this: it depends on the font. The only one with black figurines I'm aware of is berlin (part of https://ctan.org/tex-archive/fonts/chess/enpassant):

\documentclass{article}

\usepackage{xskak}

%\usetextfig
\usesymfig
\setchessfontfamily{berlin}

\begin{document}

\textsymfigsymbol{Q} {\fontshape{bl}\selectfont \textsymfigsymbol{Q}}

\end{document}

enter image description here

With other fonts you can only fake it with a black queen from the board font. But as she doesn't sit on the baseline you normally need to lower it:

\documentclass{article}

\usepackage{xskak}

%\usetextfig
\usesymfig

\setboardfontsize{10pt}
\begin{document}

\textsymfigsymbol{Q} \BlackQueenOnWhite \raisebox{-2pt}{\BlackQueenOnWhite}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • I unaccepted your solution yesterday in case someone came up with a solution to my real problem. Your solution is now accepted again. – Svend Tveskæg Nov 30 '17 at 18:01
  • It is not a good idea to edit questions and give them a new meaning, even more if is makes existing correct answers invalid. Better write a new question. – Ulrike Fischer Nov 30 '17 at 18:04
  • Sorry. I'll remember that for next time (and delete the added question above). Btw. do you think that you can answer my new question? (I guess you are the only one to probably answer it so I won't bother to ask the question if you can't.) – Svend Tveskæg Nov 30 '17 at 19:20
  • A lot of people here can tell you how to write a wrapper command which reacts e.g. to a boolean. That's not difficult (and not chess specific). – Ulrike Fischer Nov 30 '17 at 19:25