Since the contents of a \chapter
(or any/most sectional headings) are moving/fragile (they end up in the ToC, for example), care should be taken. However, you can box the content and then insert the box as part of your chapter heading. This is also not fool-proof, but at least provides a means to obtain the desired output in the chapter heading:
\documentclass{book}
\usepackage{skak}% http://ctan.org/pkg/skak
\newsavebox{\mybox}
\begin{document}
\begin{lrbox}{\mybox}\huge\newgame\longmoves\longmoves\mainline{1.e4 c5 2.Nf3 Nc6}\end{lrbox}
\chapter{\usebox{\mybox}}
\end{document}
Since the contents of \mybox
is fixed in terms of its typesetting, I've used \huge
which is similar to that of the regular \chapter
title (in book.cls
).
Another (better) alternative would be to use the Chess Font Selection Scheme chessfss
to construct your chapter/symbol headings:
\documentclass{book}
\usepackage{chessfss}% http://ctan.org/pkg/chessfss
\begin{document}
\chapter{Chess: \textsymking, \textsymqueen, \textsymrook, \textsymbishop, \textsymknight, \textsympawn}
\end{document}
This works well with inserting the content in the ToC without problem. See the chessfss
documentation for more details on how to modify the symbol masks and colours.