Thursday, March 12, 2015

Making Diagrams With OoChess

One of the most tedious tasks in creating a chess document is the creation of a chess diagram. The OoChess templates offer a number of methods for creating chess diagrams; in many ways it couldn't be much easier. Lets have a look at some of the methods you can use to create a chess diagram with OoChess. Then we'll examine diagram creation on a more general note.

The Integrated Chess Board

The OoChess template has an integrated, internal chess board, that allows you to play out a series of moves that you have typed into your document. A pseudo-chess engine, that understands chess moves, allows you to play them out on the internal board. Having this special programming built into a word processor provides an invaluable tool for writing chess documents.

A quick example:

1 d4 Nf6 2 c4 e6 3 Nf3 b6
This is the starting position of the Queen's Indian Defense.


At this point, you would like to insert a diagram of the position directly under the moves. Just select the moves themselves:

1 d4 Nf6 2 c4 e6 3 Nf3 b6

Now click on the Play Moves button on the Chess Toolbar:


You should then see the following message:




Click the OK button. All you have to do now is place the cursor at the sentence, "This is the starting position of the Queen's Indian Defense," press the Enter key a couple of times to add a couple of blank lines, then  click on the Make Diagram button:



This will insert the current board position into your document at the cursor. What you'll get is this:


1 d4 Nf6 2 c4 e6 3 Nf3 b6



This is the starting position of the Queen's Indian Defense.
 
Of course, the diagrammed position is also the position currently on the integrated chess board, so you can easily continue with something like:

The usual continuation from here is 4 g3 Bb7 5 Bg2 Be7 6 O-O O-O

You can then select these moves, play them, and then insert the new position as a new diagram:


 
The template provides a number of options for creating a position. Most of these are well known. For example, you can use a FEN string or a Piece List to set up a position. The template also has a feature that allows you to directly place pieces on a chess board to create a position from scratch. The good point about all of these methods, is that any position you create is transferred onto the integrated chess board so that you can quickly and easily play subsequent moves that you write in your document and then have the resulting new board position inserted as a chess diagram.

Creating a Diagram From a FEN String

A chess diagram can be made easily using a FEN string. This can be copied to the clipboard from most chess software. A FEN is simply a line of text that describes the placement of the pieces on the board, along with some indicators of the state of the game (who is to move, the move number, etc.) Here is the FEN for the starting position:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

The next step to turning your FEN string into a diagram is to first paste the FEN into your document, then select all the FEN with your cursor.

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Next, click on the Make Diagram Icon on the Chess Toolbar. The actual position will be copied to the integrated chess board and then the selected text will be replaced by a diagram of the position.

Creating a Diagram From a Piece List

You can also create a diagram from a Piece List. This can be typed directly into Writer. A Piece List is simply a listing of all the pieces including the squares they are on. You start with the White pieces, then follow them up with the Black pieces. The White and Black pieces are separated by the / character. Here is an example of a Piece List:

Pe2 Ke4 / Ke6

This Piece List corresponds with the following position:



 Just as with a FEN string, you must first select the text of the Piece List before you press the Make Diagram button. Piece Lists are ideal for diagrams of chess endings where there are often only a few pieces left on the board.

You do not have to repeat the piece letter for multiple pieces. For instance, if White had three Pawns in the above position, on d2, e2 and f2, you would only have to write these Pawns in the list as:

Pd2,e2,f2

You can use any of the supported language's piece letters in the Piece List. In French, for example, the same position above would be entered as:

Pe2 Re4 / Re6

But you must first select the language you wish to use before writing your Piece List. (This is done in the Select Language Dialog.)

The only drawback with a Piece List, is that there is no mechanism to convey who is to move next and whether an En Passant capture is possible in the position. This is of no importance if all you want to do is create a diagram of the position, but if you want to be able to play out moves from the position, then this information becomes vital. For this reason, every time you enter a Piece List and convert it to a diagram, the template will ask for this information using the following Dialog:


Here you can set which player is to move next from the diagram, and indicate whether there is an En Passant capture possible. By default the Dialog assumes there is no e.p. capture possible, hence the 'none.' However, if an e.p. capture is possible, all you have to do is indicate the file of the Pawn that can be captured. The template's code will then check to make sure that there is a valid Pawn on the indicated file that can be captured e.p. If the information you have entered is invalid, then you will be asked again to enter it.

Creating a Diagram With Setup Position

You can also create a diagram using Setup Position. To begin this process, simply click on the Setup Position Icon:


Pressing on this button brings up the Setup Position Dialog that allows you to setup any position that you wish on an empty chess board. This position is then copied onto the integrated chess board itself from which you can immediately create a diagram of the position or play further moves from it.


Simply click on the piece you wish to place on the board, then click on the square where you want the piece. Once you've clicked on a piece, the system will continue to insert that piece into each square that you click. This is particularly helpful for the pawns. If you mistakenly place a piece on the wrong square, simply click on that square again to clear it. If you wish to clear a number of squares, then click on the 'Clear' button and then click on each of the squares you wish to clear. The 'Clear All' button will clear the entire board.

The Dialog initially appears on the screen with an empty board. However, it is possible to load the current position from the integrated chess board. Once the Dialog is up, simply click on the 'Load Board' button.

You can use 'To Move' to set who is to move in the position, something that is necessary if you wish to subsequently play moves from the position using the Play Moves function. If there is an En Passant capture possible in the position, you can set this as well.

Where Can You Insert a Diagram?


A diagram can be placed in a table, a text frame or a text column that is part of a section, pretty much any normal place where you might want to place a diagram. But you can't place a diagram in a floating frame.

Diagram Properties – Don't Split, Don't Spell

When a diagram is created from the template code, it is written in such a way that it will not break up across page or column boundaries. When a diagram approaches such a boundary, Writer will automatically move the entire diagram to the next page or column rather than allow it to be broken up. This is especially convenient as you might otherwise find yourself continually fixing broken diagrams throughout your document. Diagrams created by the OoChess helper program are also written this way.

Another facet of the diagrams created by the template and the OoChess helper program is that they are written with 'No Language' – this means that they are not spell checked by Writer. You don't end up with the notorious squiggly red lines running through your diagrams which are very unsightly and distracting.

 That's it! There are some important properties about the move parser, but that can wait until later. (Unless you want to look at the manual and learn all about it now. In that case, feel free to download a copy of the manual for yourself now:




http://1drv.ms/1GgiIXt

When you click on the above link, the manual will be displayed in Word Online. Just below the top left corner, just below Word Online, you'll see the  DOWNLOAD button. Click on this to download a copy of the manual for yourself. Take some time to have a look at what the templates can do.
 


6 comments:

  1. Tried every method, in a recent new document (single column) and I allways get the error message when I click the MakeDiagram icon

    ReplyDelete
  2. То же самое. Диаграмма так и не появилась.
    Windows 8.1 64

    Жаль...

    ReplyDelete
  3. Diagram inserted, but once you first create a diagram using it - Creating a Diagram With Setup Position

    ReplyDelete
  4. I'm a fan of chess diagrams specially when writing posts. I use creately chart software to design these times of diagrams. Its a full graphic suite dedicated for diagramming.

    ReplyDelete
  5. Same as Pedro...
    the Make Diagram Ico is not working for me.
    (with the Marroquin Template)

    Maybe the problem comes from the FirgurineSymbol T1 font, that seems not to be seen (but is installed, from http://www.enpassant.dk/ches/fonteng.htm) ?
    A pity, because that's just the macro I need...
    Zim

    ReplyDelete
  6. Option - Creating a Diagram - work only in english version OpenOffice
    For other language need edit Macros, but I don't know - how! :)

    ReplyDelete