[Scidvspc-users] Bug with Export Game to LaTeX
Chess Database and Toolkit program
Brought to you by:
stevenaaus
From: Mauro C. <cas...@gm...> - 2016-03-09 17:18:06
|
I found (by pure chance) that exporting to LaTeX fails when there is a diagram just before a O-O or O-O-O. Consulting the xskak manual, I discovered that the issue is on the commands \xskakget{movefrom} and \xskakget{moveto}. When the move is a castling, these comands do not return only one square, but two, separated by a comma. Therefore, if white castles short, movefrom=e1,h1 and moveto=g1,f1. That breaks the code that draws an arrow showing the last move. I modified the LaTeX file and created a new command \boardgamewithmarks to address these issues. Please keep in mind that it is the first time I program in LaTeX, so I found a crude solution after struggling for hours trying to find a more elegant one. I had to include the packages ifthen and xstring. Beside that, I simplified a bit the typeseting, increasing the vertical space between paragraphs so it will not be necessary to use line breaks often. I also replaced some line breaks with \vspace to avoid LaTeX warnings. Also put a \vspace before the closing horizontal line. Use them at your criteria. I am including the relevant files. I added a file showing long castle for both sides, too. Thanks, Mauro |