1

If a game contains NAGs, \mainline prints them. But if the game is exported and then printed with \printchessgame, the NAG disappear. How to print NAGs of an exported-then-imported game?

\documentclass{book}
\usepackage{xskak}

\begin{document}
\newchessgame[white=none,black=none,id=export]
  \mainline{1. d4 Nf6 $1}
  \\
  \xskakexportgames[file=test, games={export}]
  \input{test.xsk}
  \printchessgame
\end{document}

Output:

Output:

1
  • Good question, note that it also happens with the shorthand/comment form 1. d4 Nf6!.
    – Marijn
    Jan 23, 2022 at 13:08

1 Answer 1

2

It is too long ago to remember what I did there and if I did it on purpose, but I think I implemented the NAG support later and so basically it now has two problems: the export file misses a \makeatletter/\makeatother and \printchessgames doesn't use it.

You can work around with the following but please open also an issue at https://github.com/u-fischer/xskak/issues.

\documentclass{book}
\usepackage{xskak}

\begin{document}
\newchessgame[white=none,black=none,id=export]
  \mainline{1. d4 Nf6 $1 2. Nf3 c5?}
  \xskakexportgames[file=test, games={export,export}]
    
\makeatletter
\input{test.xsk}
\gdef\xskak@do@printmove{\xskakget{san}\xskakget{comments}\xskakget{nag}}
\makeatother    
\printchessgame
\end{document}

enter image description here

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .