Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Aquarium / i-Book Tutorial 4: Everything Else
- - By Zruty (*****) [ru] Date 2009-04-10 13:35
1. Preface.

Our previous articles were lostly focused on writing the i-Book pages text. We have touched free and database-bound methods of writing i-Book pages, that cover a wide variety of existing chess publishing tasks.

This article will describe all the remaining possibilities of i-Book presentation. I'll talk about the following things:
* adding images to i-Book pages.
* configuring a classifier for an i-Book.
* setting up a tree configuration to view during i-Book browse.
* linking pages to specific positions.
* setting up modification / exporting rights for an i-Book.
* an overview of the new i-Book editing features available in forthcoming Aquarium update.

2. Images.

It's rather simple: whenever you need to insert an image into the i-Book page, write the following text:

The image file must be situated in the Images subfolder of the i-Book root. i-Book root is the directory where the database is situated. For example, if you installed the i-Book on Jeroen's opening book into <Aquarium>\ABases folder, then it's root will be <Aquarium>\ABases\iBookJeroen\ .

Allowed image file extensions are PNG, JPG, GIF and BMP.

3. Setting up i-Book classifier.

When you have just created an i-Book, it already has an empty classifier, which is hidden :)

To view the classifier, do the following:
1) Open Book Options.
2) Check the 'Show classifier' box.
3) Reopen the i-Book.

For more details on i-Book options dialog see section 6 of this article.

Editing the classifier is performed via the popup menu items in the Classifier window:

Each classifier node points to one (and only one) i-Book page. When you click 'Add Child' (or 'Add Root Node') you are asked, what page the new classifier node should point to. You can change the referenced page of the node by right-clicking it and selecting 'Change Page Reference'.

By default, the node text is the same as the referenced page's title. But you can change the node name, by right-clicking the node and selecting 'Set Custom Name'. Note the following:
* Custom name overrides the default name. If you want to revert to default name, set custom name to ''.
* You can use HTML tags in the custom name field to a limited extent. For example, <b>, <i> and <font color="..."> tags do work.

Other popup menu items concern changing the structure of the classifier. The names are pretty self explanatory: 'Delete Subtree', 'Move Up', 'Move Down'.
'Promote' means 'promote the selected node one level higher in the tree.

None of the functions require confirmation, so be careful while deleting subtrees.

4. Setting up trees.

An i-Book can also display a single tree configuration if the respective option is set in the book options. As with classifier, switching a tree on requires re-opening the i-Book.

The easiest way to create a tree configuration for a given i-Book is to create the configuration in the Sandbox (or Game View) mode and then exporting it to the i-Book. Unfortunately, the export can only be done manually.

You must create a specific file: <i-Book root>\Tree\config.xml

Here is the config.xml file shipped with Jeroen's opening book:
<?xml version="1.0"?>
  <config name="iBookTreeJeroen" opening_book="0" book_width="1" book_alpha="2" main_tree="{Aquarium}atrees\JeroenTrees\aquarium_book" discarded_tree="{Aquarium}atrees\JeroenTrees\discarded" only_main_tree="1">
    <column name="mf" display_name="flg" column_type="16" tree_path="{Aquarium}atrees\JeroenTrees\aquarium_book" weight="0" visible="1" lookup_column="" function="" Width="27"/>
    <column name="md" display_name="disc" column_type="19" tree_path="{Aquarium}atrees\JeroenTrees\aquarium_book" weight="0" visible="1" lookup_column="" function="" Width="78"/>
    <column name="mc" display_name="col" column_type="18" tree_path="{Aquarium}atrees\JeroenTrees\aquarium_book" weight="0" visible="1" lookup_column="" function="" Width="78"/>
    <column name="mo" display_name="ord" column_type="17" tree_path="{Aquarium}atrees\JeroenTrees\aquarium_book" weight="0" visible="1" lookup_column="" function="" Width="78"/>
    <column name="dapos" display_name="Games" column_type="0" tree_path="{Aquarium}atrees\JeroenTrees\aquarium_book" weight="0" visible="1" lookup_column="" function="" Width="80"/>
    <column name="dapos" display_name="Success" column_type="1" tree_path="{Aquarium}atrees\JeroenTrees\aquarium_book" weight="0" visible="1" lookup_column="" function="" Width="80"/>
    <column name="col28" display_name="d2m" column_type="0" tree_path="{Aquarium}atrees\statistics\d2m" weight="0" visible="1" lookup_column="" function="" Width="53"/>
    <display separate_ants="0" SortColumn="0"/>
    <insert_line col1="dasc" col2="dasc"/>
    <color_policy pri0="0" pri1="1" pri2="0" pri3="-1" pri4="-1" pri5="-1"/>

As you see, the config file contains the information about one tree configuration, named 'iBookTreeJeroen', in the same format as Aquarium's Config\tree_configurations.xml file.

Remember the following:
* The tree paths are relative to the <i-Book root>\Tree! In my example I had to use {Aquarium} to link to Aquarium folder, but normally you'll have to put the tree files into the Tree folder of the i-Book root alongside the config.xml.
* You can't specify any custom bonus columns in the configuration since the column functions are not exported to config.xml. (If you don't know what a bonus column is, don't bother: you don't need to worry about anything).

5. Linking pages to specific positions.

We are going to talk about the little book icon highlighted in the screenshot. When you click this button, you are instantly transferred to the page related to the position currently on board.

You can set this up for your book easily:
1) click Edit Page
2) go to Page Options
3) check 'EPD binding' and paste the position's EPD into the edit field.
4) click OK.

Note that if you bind two or more pages to a single position, Aquarium will pick only one of the pages to display when you click the book button.

6. Other i-Book options.

Now it's time to cover the Book Options dialog in detail:

Most options here are self-explanatory. Additional notes are:

* 'Edit Styles' is absent in your version: it's a new feature.
* Initial page ID: by clicking 'Change' you can specify what page will be opened first when you open the i-Book. By default it's the 'Root page' with ID=1.
* Export to HTML: exports the whole book + classifier to a single folder.

The 'Access rights' options are protected by a password. By default, the password is empty and anyone can alter these settings. But when you set up a non-empty password, it will be required to change the access rights settings.

7. New editing options.

We are currently working on a set of i-Book editing improvements, and I'll give an overview of what is already done.

* Syntax highlighting allows you to see the commands instantly:

* You can easily synchronise your Edit and View windows with a new 'Find text' feature.

* Certain command templates are automatically inserted into the page text. One example is [push_line;line(<cursor is here>);pop_line].

* You can change display styles for your i-Book, and Aquarium's default styles as well:

8. Conclusion.

I've finished this series of articles. I hope i-Books will eventually become popular and the time you invested in learning the i-Book principles won't be a time lost.

If you have any questions, ... well, you are already on Rybka forum, aren't you? :)

I'd like also to create a complete reference of i-Book generation commands syntax in a single document, but I'm not sure whether I'll have time for this soon.

Thanks for your attention :)
Parent - By GoVegan (**) [pr] Date 2009-04-10 15:49
This is excellent!!! Thanks so much for your time.
I'm sure i-books will become very popular....they are very useful.
Best wishes to you and all the Aquarium team, you guys are creating a "super GM application"!!!
Parent - By Gordon (**) [gb] Date 2009-04-10 20:28
Well done - and thank you very much.
I was much puzzled as to how to create the classifier and now all is clear!
Best wishes
Parent - - By Zruty (*****) [ru] Date 2009-04-13 09:26
By the way, GoVegan compiled all the i-Book articles in a single PDF:
Parent - - By The Wizard (***) Date 2009-04-17 08:23
    Is it possable to make the ibook instructions available via right click so instead of having to enter code you can right click (or have an insert menu) and choose maybe enter diagram and paste EPD ... I guess very much like a WYSIWYG program

Parent - - By Zruty (*****) [ru] Date 2009-04-17 08:44
Next version. I hope all the commands will have their own buttons.

It won't be WYSIWYG though: you'll have to click 'Apply Changes' to compile the page text into a displayed page.
Parent - By The Wizard (***) Date 2009-04-17 12:04

>Next version. I hope all the commands will have their own buttons.

Sounds like an excelent idea :)

Up Topic Rybka Support & Discussion / Aquarium / i-Book Tutorial 4: Everything Else

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill