Sunday, March 15, 2015

Reorder Games

The ability to insert a PGN game into your document, and have all the formatting done for you, is a nice, helpful feature. But it is quite possible that you may end up with your inserted games being out of order in your document. As an example, you may have inserted the first five games, and then later decide that you would like to insert another game between the 2nd and 3rd game. But now all the game numbers will be out of order, something like this:

Game 1
Game 2
Game 6
Game 3
Game 4
Game 5


You can't just simply rename the game numbers, as that will not change the underlying game information that is attached to it in a bookmark. (And in any case, renumbering all these games by hand is a pain!) What to do?

Well, you can use the Reorder Games tool to renumber all your inserted PGN games both by number and by their bookmark name. Here is the Reorder Games icon:


When you click on the icon, it will bring up the Reorder Games dialog:


In almost every situation you'll want to set Starting Game Number to 1, so that is provided as the default. But there may be unusual situations where you might want to set this to some other number. An example may be where you have an on going chess magazine where each subsequent issue begins with the last issue's last game number plus one. The idea here is to be able to refer to any year's game by number directly without reference to the month. (I know it is an odd idea, but there you go.)

Every inserted game in your document will ultimately be renumbered, from the very first game to the very last. You cannot ask it to only renumber so many games starting with some game in the middle.

The Game Number Intro Text allows you to tell the template what text you used before the actual game number. (This text is part of the configuration Output format Game number, or og = “String”.) An example of this option would appear in your configuration file as:

og = "~Game~ %g"

Your game would then be written something like this:

Game 3
Nenarokov - Perlis
[D35]

In the dialog above, you can see that the Game Number Intro Text has been set to Game. The Space between just informs the template that you have a space between Game and the actual game number.

When you click on OK, the template code will rename all of the game's bookmarks and will also attempt to rewrite the game number as well. The end result should be a complete reordering of all the games and their numbers.

Note that it is possible to reorder the games even if you have not chosen to number them explicitly. For example, If you wished to suppress game numbering , you would set the Output format Game string in your configuration file as:

og = ""

This suppresses explicit game numbering. If have chose to do this, then you must leave the Game Number Intro Text empty and make sure that the Space between is not checked.


No comments:

Post a Comment