CPT Editor

1. Introduction
    1.1 Features 1.2 Version
2. Setting the Folder
3. Folder Browser
    3.1 Browser Window 3.2 Folder Operations
4. Grid Editor
    4.1 Editing Modes 4.2 Set and Run Menu Items
    4.3 New Crossword/Sudoku 4.4 Saving Crossword/Sudoku
    4.5 View Menu Items 4.6 User Encoding 4.7 Spell Check Dictionary
5. Text Editor
6. Print-Preview
    6.1 New Locale File 6.2 Postscript File 6.3 HTML File 6.4 RTF File
7. Header
8. Details and Word Lengths

1. Introduction

CPT Editor or simply Editor is a name for collection of modules maintaining Data Folders. It is not a separate application and can be started only in the programs CPT Diagrams and CPT Crosswords.

It is supposed that you have looked at "CPT - The Primer" for the basic notions and here the details of using the Editor are described.

1.1. Features

Several modules having own windows implement the features described above. These modules are Folder Browser, Folder Operations, Grid Editor, Text Editor, Print-Preview, Header, and Details.

1.2. Version

The current version of CPT Editor is 1.5.


2. Setting the Folder

The Editor will not start if there is no valid folder defined. In the top window of the running program there is Browse tab where you can set the folders. First, in the Folder Type you have to select the type, then use the buttons 'Add New' and 'Remove Selected' to add new or remove a directory location for the folder type. The name of the folder will appear in the Folder combo box and the selected folder is the current one. You can set folder filters using the button on the right of Folder Type field. For example, if you set in Folder Filters dialog the dimensions "15x15", only crossword sets of that size will be shown in Folder Browser.

You can have several directories of the same folder type, for example, Libraries type directories 'diagrams', 'grids', and 'crosswords'. To switch between the folders, use the steps described above. All operations will be only on the selected folder - for example, when you save the Source or the Target, they will be written into the current library directory or the automated queries will be on the current folder settings. The operations available from the top window are described in the manual of the CPT program you are running.

The names of Source and Target files are built into CPT and can not be set by the user. To open the Source in the Editor go to the Source tab, set the Show check box and press the Start button. Do the same for the Target but from the Target tab.


3. Folder Browser

3.1 Browser Window

When you define some how the folder in the top window of the running program and press the button Start, the Folder Browser will show in a form depending of the folder type. Here are the pictures for Files and Libraries types:

CPT Editor: Folder Browser - Files   CPT Editor: Folder Browser - Libraries

In the folder's list box, the files recognized by the program will appear. With the 'View Options' button (first from the button bar) you can control which windows of the Editor to be shown. The 'Folder Operations' button will start the dialog described below in 3.2. With the 'Select' button you can mark items from the folder's list for selection. If the item is library file, all crosswords/sudokus from this library will be selected. Using the 'Delete' button, the items could be marked/unmarked to delete. These operations will be executed when you press the 'OK' button.
If the folder is Base Words/Clues you can select only one file, and after pressing the OK button, the file will be copied as your new Base Words/Clues. Instead of Grid Editor, a window displaying the CTree header will be shown for these two folder types.

The second form of the browser (Libraries type) has navigation panel for the selected folder item. On the top is the size of the item (columns by rows). The Total field shows the number of crosswords/sudokus in the set. In the Current field you can select manually the current crossword/sudoku from the set. What follows is the navigation buttons bar. The first four buttons are obvious, we hope. With the 'Animation' button you can start an automatic browsing of this set and with the most right button you can stop this process. When the focus is on some of these buttons, the keyboard navigation keys (arrows, Page Down, Page Up) and Insert, Delete keys can be used as well. The check box Buttons wrap from Options dialog controls the behavior of these buttons (e.g. the wrapping for 'Next' button means that after the last item the first item follows). The Select and Delete check boxes play the same role as the buttons with the same names, but the operations are for individual crosswords/sudokus from the set. Total Selected/Deleted fields show what you have marked to select/delete from the set till now. Since the Editor opens the whole crossword/sudoku set (library file), to save your changes, two steps are required: a) save the changes in the window where you are working (e.g. Grid Editor) for the current crossword; b) click OK button in Folder Browser to save the whole library file as well.
There are additional operations over a library file which you can do: renaming, sorting, changing header flags, and recoding as described in section 7. Header.

The 'OK' button will execute all selections and or deletions, and if the current item is library file, it will be saved including the contents of library buffers and the pool, and excluding deleted/repeated crosswords/sudokus.

The 'Dismiss' button will hide all windows of the Editor.

3.2 Folder Operations

The text searching/extracting operations described here are supported for crossword and dictionary files but not for sudoku files. When you press the 'Folder Operations' button the following dialog will appear:

Folder Operations

Operation Tab
The Folder Items group define the scope of the operation: Selected or All. Set Operation Encoding button will start the Operation Encoding dialog used to define the global encoding and the locale of the input/output files. The input files which have incompatible encoding/locale will be ignored.
The radio buttons below define the the type of the operation. Search Tab
Use these options if you have selected Search Text in the Operation tab. Ignore Case means case-less searching. Regular Expressions is for more sophisticated search.
Use the Search Text in Words group when you want searching in the words of the crossword grid. You should enter a comma separated list of words in the text field.
Use the Search Text in Clues group when you want searching in the clues/definitions. You should enter a comma separated list of strings in the text field.

Finally, to start the selected operation press the Start button.

You could receive a message "Unsupported CTree" if you try to extract a locked dictionary.


4. Grid Editor

The check box Show Diagrams from Folder Browser's Options dialog controls the appearance of this window. It is the main module of the CPT Editor and most of the operations can be done here. The window shows the current crossword/sudoku selected in the Folder Browser:

Grid Editor

The program checks the input and automatically switches to crossword or sudoku mode, and to file or library mode. The difference is in the details of the menu items. We have to note that the Editor's internal modes are independent from the CPT Mode selected in the top window.

All messages are shown in the status bar. On start up the status bar contains some of the properties of the crossword/sudoku. The rest of the crossword properties can be viewed in Details and Word Lengths windows. They will be shown when the check boxes Show Details and/or Show Word Lengths from the Folder Browser's Options dialog are checked.

Via the File menu you can create new crossword/sudoku, save/export the current one, set the default directory, set the default user encoding, set the spell check dictionary, set the control background color, and define the options for Print-Preview module and run it.
Set Control Background Color is used to change the look and feel of the program. System, Custom A, Custom B are predefined colors. Custom... will start the Java color chooser dialog. Gradient when checked, will force the background of most controls to be painted via gradient.
Use Files as Memory is a global flag for the dictionary tools. Set it only if a dictionary can not be created or opened because of memory limits.
Splash on Startup when checked, will show a picture before the main window appears. You could use it to replace the initial About dialog of the demo version of the program.

Via the Check menu in crossword mode you can:

Via the Check menu in sudoku mode you can check the details - the program runs a sudoku solver to find all supported properties.

4.1 Editing Modes

The editing modes can be set via the Edit menu. In sudoku mode many of the menu items will not be shown. The Grid Editor always starts in view mode. To stop any of the editing modes you have to select the view mode again.

In View Mode you can highlight the direction of across words with left mouse button and for down words use the right one. If the Edit Text window is showing, the words will be highlighted there as well. This item is shown in sudoku mode as well but it used just to stop the other editing modes.

In White/Black mode via mouse click the cells are toggled to white or black.

In White/Unused mode the cells are toggled to unused or white.

In Black/Unused mode the cells are toggled to unused or black.

In Letters ... modes you can edit the words via the keyboard. The keyboard navigation keys are working in these modes.

In Words Right/Down mode via the mouse you can set a sequence of cells forming a word. Just press the left button and drag the mouse in the desired direction and when the button is released, the selected cells will be cleared to white, and black cells (or black bars for barred type) before and after the word will be inserted.

In Words Left/Up mode via the mouse you can set a sequence of cells forming a word having reverse direction. Only in this mode you can define reversed words and you have to take care about the data format (it should be 'grids+' or 'crosswords').

Toggle Tip Words mode is only for the print/preview module (the tip words will be shown in the grid.) Use the left mouse button to toggle the across words and the right mouse button - for the down words.

Toggle Tip Cells mode for a crossword is only for the print/preview module (the tip letters will be shown in the grid.) For a sudoku use this mode to define the positions of the givens.

Search Base Words mode will be enabled only if there are uncompleted words in the grid (if the grid is finished, you can search via the Check menu). When you click with left/right mouse button in the grid, the across/down word pattern will be searched in Base Words and you can select a word from the following dialog:

Search Base Words: Select Word dialog

In this case the word pattern is "d..t...". If you select a word and click on OK button, the word will be inserted in the position in the grid where you have clicked for the searching. When you change the mode the window will be closed.
If the current Base Words file has rebus definitions, the words will be shown in encoded form.

Search Preferable Words mode is similar but using the current Preferable Words (if any).

In Select Grid + Copy mode the selected part of the grid will be copied to the clipboard.

In Select Grid + Clear mode the selected part of the grid will be converted to all white cells.

In Paste Grid mode the clipboard contents will be pasted into the selected position. You can drag the paste rectangle or just click on the desired start position.

In Paste Horizontal Word mode the clipboard contents will be pasted into the selected position. You can drag the paste rectangle or just click on the desired start position.

Paste Horizontal Word+Blacks is the same but a black will be added before and after the word.

In Paste Vertical Word mode the clipboard contents will be pasted into the selected position. You can drag the paste rectangle or just click on the desired start position.

Paste Vertical Word+Blacks is the same but a black will be added before and after the word.

The Undo should do what is supposed to do. Note that all global operations (changing case, encoding, and type) will not create undo record.

When you edit a crossword containing clues, all modes that can change the structure of the diagram will be disabled.

4.2 Set and Run Menu Items

Set Menu Items

Important note: all items marked 'used only for the print/preview module' just create temporary data which is not saved in a file.

Set All Lower Case will convert all letters in the grid to lower case.

Set All Upper Case will convert all letters in the grid to upper case.

Clear All Letters will clear all cells in the grid.

Set Roman Numerals as Clues will be enabled only if the crossword contains digits instead of letters. For example, if the 'word' is 383, the clue CCCLXXXIII will be added. The Roman numerals used are: I for 1, V for 5, X for 10, L for 50, C for 100, D for 500, and M for 1000. The vertical bar '|' after the numeral multiplies the numeral by 1000.

Code Letters with Numbers - Coded Grid is used only for the print/preview module Coded Grid style. The program will code all letters in the grid as numbers.

Fill Letters in Blacks - Find Words is used only for the print/preview module Find Words style. The program will fill in all blacks with random letters taken from the current Base Words.

Insert Image is used only for the print/preview module. The menu item will be enabled if the grid contains unused cells. Crop if not checked will lead to distorted image when the target rectangle is not proportional to the image size. For From File and From Clipboard a dialog showing the available locations (if there are more than one) will be shown. After selecting the location, you will be asked for a picture file. If the image is OK, it will be shown in the grid. Generally, the following image formats are supported: JP2, JPC, PGM, PGX, PNM, PPM, JPG, GIF, BMP. The program will check if Sun "JAI Image I/O Tools" or "Java Advanced Imaging API" are installed and will use them. So, depending on the JVM, you could work also with: ICO, CUR, WMF, EMF, TIF, PNG, WBMP, PCX, FPX. In case of MS JVM, before any other processing the ICO, CUR, WMF, EMF will be converted to BMP.

Clear Non-Crossword Data will delete the temporary data used only for the print/preview module.

Set Marker Definitions from Base Words can be used after working with Edit | Search Base Words to extract marker definitions from the current Base Words (if they have rebus definitions.)

Set Properties... will start the Additional Properties dialog.

Additional Properties dialog

General Tab

In Encoding select the encoding of the crossword. If it is just a diagram, leave the encoding to 'Default'.

Encode Data will force recoding of all data in the crossword. If it is not checked, you can change the encoding without recoding.

Barred will force conversion of the diagram to barred type. It will be disabled if there are any blacks or letters in the current diagram. Note that this is the way to create a new barred diagram, and after the conversion you should define the words using Edit | Words Right/Down or Words Left/Up.

Sudoku will force conversion of an empty crossword diagram to sudoku if the size is supported.

RTL Numbers will force conversion of the diagram to RTL type (all across words will get direction RTL and their numbering will be RTL). It will be disabled if there are any letters in the current diagram.

Support Standard Symmetry will affect the modes View, White/Black, Used/Unused, Words Right/Down, Words Left/Up, and Select Grid + Clear. For example, in White/Black mode when you set a cell to black, its symmetrical cell will be set to black as well.

Markers Tab

The markers are used for rebus type crossword. In the text field you could enter new marker definition. To add it to the list, use the 'Add New' button. If the definition is accepted, it will appear in the combo box. The combo box contains the list of current definitions. Use 'Remove Selected' button to delete a definition. The syntax of a definition is:
As 'marker-character' it is preferable to define a character which is not a letter used in the current alphabet. If you need to export the crossword to Across Lite format, you can use only these characters:
The 'marker-string' is one or more letters of the alphabet, which will be represented internally by the marker-character and they will be shown in the grid cell. Under Windows, temporarily for the printing, symbols from Webdings and Wingdings fonts could be included as follows:
   1:[0x4a]:1 - Webdings 'palm' as hexadecimal code (the '[' and ']' characters mean Webdings code.)
   2:[0x4e]:2 - Webdings 'eye' as hexadecimal code.
   2:[78]:2 - Webdings 'eye' as decimal code (Across Lite accepts only this variant.)
   3:\uf04a:3 - Wingdings 'smile' in Unicode notation (\uf0 is added in front of the code 4a shown by the Character Map program.) In order to see properly these characters in the text field and in the combo box, the current font should be 'Dialog' or Dialog Input'.

Markers in a crossword grid

Under Linux, the '[' and ']' characters mean Dingbats font and you can enter codes in the range 0x2701-0x27BE or codes from other Unicode block supported by this font.
The 'show-character' is a letter of the alphabet to be used when the software is not able to show the complete marker-string.
If the crossword has been generated using Base Words having rebus definitions, the current definitions will contain the 'markers' used in this crossword.

Locale Tab

Here you can set the locale of the crossword. If it is just a diagram, leave the locale to 'Default'.

When you click on OK button, the selected conversions will be done without undo record.

Run Menu Items

Crossword Mode

CPT Words Generator - the current diagram or partially filled grid will be used as a Source and the generator will be started. All settings in the top window Target tab should be set in advance.

CPT Words Generator and Show Target - the same as the previous, but additionally, after the generation the CPT Editor will open the Target temporary file.

CPT Clues Generator - the current filled grid will be used as a Source and the generator will be started. All settings in the top window Target tab should be set in advance.

CPT Clues Generator and Show Target - the same as the previous, but additionally, after the generation the CPT Editor will open the Target temporary file.

Sudoku Mode

CPT Sudoku Generator - the current mask will be used as a Source and the generator will be started. All settings in the top window Target tab should be set in advance.

CPT Sudoku Generator and Show Target - the same as the previous, but additionally, after the generation the CPT Editor will open the Target temporary file.

Solve will start the sudoku solver on the current puzzle and the solution will be reflected in the Editor.

4.3 New Crossword/Sudoku

You have to open a crossword or sudoku and this way the crossword/sudoku mode will be set. Then, to create new crossword/sudoku, select File | New | Same Size or New Size. When the current folder type is not 'Files', the New Size will not be available (the sets have a fixed size).

The Grid Editor will show new empty crossword/sudoku with all cells white/empty. You can paste any diagram/grid or just start editing using the Edit menu.

If you want to create new special type diagrams like barred or RTL, this is the moment to start the Additional Properties dialog via Edit | Set Properties, and to set the desired features. If the diagram already contains something, the special properties will be disabled.

4.4 Saving Crossword/Sudoku

To save the current crossword/sudoku select File and some of the available 'Save ...' menu items.

'Save' menu item is the main one used to save a changed crossword/sudoku. If the folder type is 'Files', a backup file will be created and the current file will be updated. If the folder type is 'Libraries', the crossword/sudoku will be saved in the library buffer or as new one in the pool and the current one will be marked as deleted. To save the whole library, you have to press the OK button in the Folder Browser as well. If you switch to other crossword/sudoku in the library, the last changes will be lost if not saved at least in the library buffer.

'Save As New' item will be accessible only if the current folder is not of type 'Files'. CPT Editor maintains pool of new crosswords/sudokus and this one will be saved there. The creation of the pool will be reflected in Folder Browser's field Total. It will be shown in blue color and the contents will look like "102+3", where the digit 3 is the number of new items in the pool. In order to save all new items, you have to press the OK button in the Folder Browser as well.

'Save As File' menu item is used to export the current crossword/sudoku in text file in several formats.
If the current crossword has words and clues, they could be exported to file in CPT Text Dictionary format as well. Actually, if there are no clues, the format will be text word list. You can add these files directly to your Base Words/Clues.
If you select some of 'Diagram ...' data formats as output, the diagram data only will be extracted from the current crossword and saved. If you select 'Grid GIF/PNG/BMP/EMF Image', a picture file of the grid will be created.

4.5 View Menu Items

View Preferable Words will show a window with the Preferable Words (if any) which is similar to Search Preferable Words mode but without the automated searching/inserting. When the window is not needed any more you have to close it.

View Preferable Words DWL Sorted. DWL stands for Descending Word Length and the words will be sorted by word lengths in descending order.

Options will start the following dialog:

View Options dialog

In the Layout tab you can define how the grid will be drawn. When Draw 3d is not checked the cells will be shown only in black and white color. If Show Letters is checked and the grid contains words, the letters will be shown. Upper Case controls the letter case of the words when they are drawn inside the grid. When No Black Fill is checked the black cells will be marked via single rectangle inside the cell. Word Numbers controls the showing of across/down numbers of the words. When Grid Numbers is checked the column and row numbers will appear on top and left side of the grid. The best way to understand these settings is just to play with the check boxes. Note that these options are in effect for the Print-Preview module as well.

The Numbers tab contains options for showing the numbers. When Locale Word Numbers is checked, symbols for the digits from the locale alphabet will be used (they are not the symbols like 0,1,2...) For the European languages Roman numerals will be used. If Grid Numbers from the previous tab is checked you could use the groups Grid Columns and Grid Rows to set the desired symbols for the grid numbers. Standard means the normal digits. Locale means locale symbols for the digits. Alphabetical means letters instead of digits.

The Clues tab contains options for the clues and for the Edit Text window.

Show Clues Inside and Inside Marks check boxes will have effect only if the diagram is of Clues Inside or Scandy style. Using the program menu Check | Check Clues Inside (Light) you can invoke one of the algorithms for analyzing these properties. Generally, the clue positions are not saved by default and if you don't see the clues inside, you have to run the check (and save the crossword to save the clue positions).
Via Max Lines you can choose the number of lines used to draw clues inside black cells. This number is used to calculate the font size as well. Upper Case controls the letter case of the clues when they are drawn inside the cells.
To be able to see the clues, you have to zoom to 3 or 4:

Bulgarian crossword with clues inside

When you check Edit Text Window the edit text window (Edit Text module) for the clues/answers and other text data will be shown. Via the Clues and Answers radio buttons you can select the mode of the window. Clues check box is equivalent to the Show Clues check box from Folder Browser's Options dialog. Position Below means that the edit text window will be shown in minimal form below the Grid Editor's window. Colors controls switching to white or color background in the window. RTL means right-to-left text. It is default for RTL scripts.

Via Font tab you can select the global font properties for the program. The Family combo box shows the Java supported font names. In the text field you can see a sample of the selected font. Note again, that the selected font is used by all modules in the program (except the Print-Preview).

The Encoding tab is only for Linux.

If Keyboard Converter is checked, the selected encoding will be used to convert the typed 8-bit characters to Unicode. For example, under KDE and Xkb On, if you want to use cp1251 for Cyrillic, you have to select the converter koi8-r (don't be confused that KDE3 is showing properly in all qt3 based applications the Cyrillic letters - it knows that the broken standard Xkb files by 'Cyrillic' mean only koi8-r, KDE 2 and 1 are not that smart and will show nothing..., of course, if you use a proper Xmodmap file or Xkb On with the right files, the converter encoding should be cp1251 in KDE, GNOME, etc.).

Clipboard Converter will be shown/available only if the Java VM is 1.3.1 and above. If you exchange data with applications supporting properly UTF8_STRING or COMPOUND_TEXT (all Java, KDE3 applications, Mozilla, etc.) you should switch off this flag. If switched on, the behavior is the same as for the keyboard converter.

4.6 User Encoding

There are two positions in the CPT built in list of converter names reserved for user defined converter. The first is for 8-bit converter and the second is for 16-bit converter. You can set these converters and check/find all available in this dialog. To start it, select from the menu File | Set User Encoding.

User Encoding dialog

In the text fields User 8-bit Converter and Converter Display Name you have to enter the program name and the display name of the converter. The display name is free text but the program name should be known (see below). Via clicking the button on the right you can check if that converter is available. The software is testing the pair of ctb and btc converters and you can receive two error messages when the converter is not found. The same applies for the user-defined 16-bit converter.

The combo box below the label Encodings and Display Names shows the built in list of converter names and below are the display names. When the user converters are not defined, they will be shown as "User8" and "User16" as converter program names and "Reserved for User Defined ..." as display names. Again, you can check any converter from the list if it is supported by your Java RTE via clicking the button on the right.

The last combo box and the supporting 'Run Scan' button can be used to scan the Java CLASSPATH and to find all available ctb converters. The list will be sorted by the names and will include the built in converters (like VN1) in the current CPT program as well. Via the clipboard you can copy any converter name from the combo box and paste it into User ... Converter text field. This will ensure the correct name without "blind" checking. To test if the paired btc converter is available as well, you have to click on 'Check Available' button. The answers are "Yes", "btc only", "ctb only", and "No".

After checking the user-defined converter program name and entering the display name, you can click on the OK button and the setting is done.

If you want to remove the setting, delete the converter program name from the text field and click on OK button. Note that if the removed converter has been used as default converter for a crossword or Base Words/Clues file encoding, you will receive error message that User8 converter is not found.

CPT Converters

In addition to the numerous converters created by Sun, here are the converters built into this program:


CyrBG converts the Cyrillic letters 'I' and 'i' (0xAA and 0xBA, both with grave) to \u040D and \u045D (Unicode 3.0 Cyrillic letters with grave). CyrMK converts the lower case Cyrillic letters 'i' and 'ie' (0x26 and 0x23, both with acute) to \u045D and \u0450 (Unicode 3.0 Cyrillic letters with grave). The characters mentioned are not part of any other Cyrillic 8-bit encoding and if the text includes any of them, you can not convert it to Cp1251 or ISO8859_5, the only targets are Unicode and UTF8. These letters are available in Unicode fonts e.g., in MS ttf "Palatino Linotype".

The converters defined/reported as 'btc only', can be used only for decoding of input text.

The crossword modules support just a single character (one-byte or two-byte Unicode) in a letter cell. This means that an encoding using two or more characters per letter should not be used or you have to use marker characters or custom composition.

4.7 Spell Check Dictionary

This dictionary is used when you select the menu item Check|Spell Check Clues. The default dictionary is the current Base Words.
To change the dictionary file use File|Set Spell Check Dictionary and select a file having extension wlb or wlz.

You can create own dictionary file using the procedure 'Make New Base Words' from "CPT Crosswords" documentation; save the file in 'words' directory and restore the original Base Words.
You could also use CPT Word Lists program to create a wlz file in 'crossword form' or check the program's web site for a file in your language.


5. Text Editor

When the proper option is set in Folder Browser's Options dialog or in Grid Editor's View Options dialog, the following window will appear:

Text Editor: Edit clues

In the fields in the upper part of the window you can set the title and the other optional data identifying the crossword. A table with the words and clues/answers is shown below. The first column 'AD#' shows the number of the word prefixed with 'A' for across and with 'D' for down. The next column shows the words. You can copy a word to the clipboard via Ctrl-C. In the third column you can edit the clues/answers (when the mode is Clues the clues are shown, and when the mode is Answers the answers are shown).

To browse the table cells, use the keyboard navigation keys. To start editing a clue/answer without deleting the old contents, press the Insert key, or click with the mouse. Ctrl-C is copy, Ctrl-V is paste, and Ctrl-X is cut. To finish editing a clue/answer, press Enter or click on other cell. If you press Esc key or Ctrl-Z, you will exit the cell with undo.

A click with left mouse button over a table cell will transfer the focus to the cell and if the cell is row heading or in first column, will highlight the word in Grid Editor. Via right mouse button you can show the pop-up menu for copy, cut, and paste.

To save the new entered text, press the OK button, File | Save in Grid Editor, and when you finished with the set, press the OK button in the Folder Browser as well.

The editing of clues/answers is always allowed, even when the current data format is 'diagrams' or 'grids'. In these cases the saving of the library will not save the clues/answers. Instead, you can export the current crossword as text file and the clues/answers will be saved there.


6. Print-Preview

This module is used to preview, to print, and to create Postscript, HTML or RTF file for the current crossword or sudoku. To start it, select File | Document View-Print from the Editor.

The options for the print layout should be set by the View Options and Document Options dialogs, started in the Editor. The first dialog is already described and here is the second:

Document Options dialog

In the Style tab there are several options for the printing style. Default - according to the crossword/sudoku the program will choose the default print options. By Settings - all print options are according to the user's settings (the other tabs.) Kriss Kross, Coded Grid, and Find Words are explained in "CPT - The Primer". Coded Grid + Letters will show the letters as well. Diagramless American will print just the diagram (without blacks and word numbers) and the clues. You could select tip words to be shown as well. Diagramless European will print just the diagram (without blacks and word numbers but with grid numbers) and the clues will be sorted according to the grid numbers.

In the Include tab you have to define all desired items from the crossword to include in the printout. Title Data will include title, author, and copyright data if available. Title Headers means that the headers of these items will be printed on the left. The Grid check box will include the diagram image and if Show Letters from View Options is set, the words will be included in the grid as well. Via the Properties you can include the crossword/sudoku properties as separate section. The Clues or Words+Clues will include the clues as a separate section. Answers will include the words or printed answers (if available) as an additional section. Answers as Grid will force additional grid image with the words (valid if Answers is checked). The Page Banner when set will show on the bottom of the page the name of the crossword file and the current page number. Section Headers controls the showing of centered section headers. Tip Words In Grid or Tip Words In Text will include the selected tip words in the layout.

The Format tab is used for additional formatting options. Compact Format means that the program will put the grid in the upper right corner and will select the number of columns of the text to minimize the used area. Some of the centered headers will be ignored or aligned on left. This flag will be ignored when the crossword has Clues In style or columns greater than 25. If Use Colors is not set, the printout will be in black and white only. The '... Columns' combo boxes define the number of columns for the corresponding sections. The number 0 is special case and it says that the section will be formatted in 'stream' layout (the items from the section are positioned on the same line, not on new line as in the case when the number is > 0). The data from the combo boxes will be ignored if Compact Format is selected. Draw White supersedes all other drawing styles - only the whites will be drawn as rounded rectangles. Again, the best way to understand the purpose of these settings is to make experiments.

In the Page tab you have to select the paper size and the margins. If you are not creating Postscript file and an analogous dialog appears from the OS print dialog, you have to select the same data.

The Font tab is similar to that of Grid Editor's View Option dialog but the parameters are for the printing. More precisely, the font encoding for Postscript file is very important when the crossword is not in English (see Postscript Files below). You should select scalable font for the proper layout.

The Locale tab is the same as that of Grid Editor's Additional Properties dialog but the parameters define the printout locale. According to this setting, the program will look for a file 'doc_<locale>.properties' and all words used in the printout like 'across', 'down', 'answers', etc. are taken from this file. This way you can print e.g. Chinese crossword using English locale:

Print-Preview: Chinese crossword with English clues

When in Grid Editor's View Option dialog Word Numbers is set off and Grid Numbers is set on, and all 'Locale ...' are set on in Numbers tab, the formatting and ordering of Words/Clues sections will be by word coordinates by rows and columns (while the default ordering is by standard word numbers). This feature is used to print some European and Arabic crosswords:

Print-Preview: Arabic crossword

In this sample, Grid and Answers sections are included, the Compact Format and Draw White are on, and the bottom page margin is increased in order to pack the layout on top of the page. As you can see, the layout is RTL and the numbers are drawn according to the locale as well ('fa' for Farsi in this case).

Well, it is time to say few words about the Print-Preview window. Via the File menu you can create Postscript, HTML or RTF file. The Print menu will start the OS print dialog. The Page menu navigates to the next or to the previous page in the view. The Zoom menu needs no explanation, we hope. The Frames menu allows showing in the view the frames of the page and/or the margins. The Print-Preview window reflects any change made in other modules and this way you can browse the crosswords directly in printout form.

6.1 New Locale File

The name of the locale-specific file for printing should be 'doc_<locale>.properties', where <locale> is ISO-639 language code [+ "_" + ISO-3166 country code]. If in the directory 'locale' the locale file for you language (e.g. Greek) is missing, do the following:

The file 'doc_el.properties' will be used when you set the Locale to 'el' or 'el_GR'.

6.2 Postscript File

In the File menu you can see two options: 'PostScript File...' and 'PostScript Raster File...'. The first option is intended for Ghostscript style files and you have to prepare a reference file for the fonts as described below. The second option means that the text will be sent as graphics to the Postscript file and you have not to bother about the Postscript fonts reference file. This option is available if you are using Java 1.4 or newer and it gives better output when pictures are included in the grid.

When the program is creating Postscript file, it first looks in directory 'locale' for a file 'pfonts.properties.<encoding>', where <encoding> is the code set via Encoding from Document Options | Font tab. For example, for Cyrillic printout, it is 'pfonts.properties.Cp1251'. This file contains mappings of the Java fonts to Postscript fonts, having the proper encoding. If the file is not found, the program uses standard font names and the default encoding is applied - this is usually the case when you print in English.

Before using this module, you should check/modify the template files in order to reflect you environment. In case you are using Ghostscript, you have to change its 'Fontmap' file according to the comments from our template files, and find fonts having the proper encoding.

6.3 HTML File

Via the File menu you can create HTML file from the current crossword/sudoku. There are several limitations however.

The grid is formatted as table in black and white. If you prefer the special drawing or insist on including clues inside, you can select from the File menu HTML and Grid Image Files. In this case a GIF image file containing the grid will be created as well, and it will be linked in the HTML file.

If Grid Image option is not selected:
- the layout will not be always exactly the same as in the preview;
- crosswords with Clues In style are not supported;
- the drawing flags Draw 3D, No Black Fill, Inside Marks, and Draw White are silently ignored.

The crosswords using user defined encoding converter or Unicode will be written in UTF-8 encoding. The bidi processing for RTL scripts is left to your browser - 'direction:rtl' should be properly supported for text and tables.

6.4 RTF File

Via the File menu you can create RTF file from the current crossword/sudoku. The grid is included as image EMF or BMP. Some programs (like WordPad) do not support EMF and in this case, you should use the RTF File with BMP Grid Image menu item.


7. Header

When the Show Header check box from Folder Browser's Options dialog is set, the following will appear:

Header dialog, Name tab  Header dialog, Encoding tab

It is common dialog for all functions about the library files/headers. In this case in the Name tab you can change the name of the library file and when OK is clicked, it will be renamed. In the Flags tab you can change the flags for the Style, for the Stage and Marked. These flags are mainly for the user and they can be used as folder filters and for queries.
In the Encoding tab you can change the settings for the Encoding and for the Locale. The Encode Data check box if set, will force converting of all text data in the library to the new encoding. For example, if you change the Encoding from "Cyrillic MS-Windows CP1251" to "Cyrillic IBM/MS-DOS CP866", set the Encode Data and click OK button, and all crosswords in the library will be converted to the new encoding. Be careful to change the encoding to new one, which can be mapped to the old, as in the example. If the Encode Data check box is not set but the Encoding is changed, this setting will be reflected in the header only.
The Sort tab is shown only if the dialog is started from the Folder Browser. The check box Sort and the OK button will sort the current library according to the options. The check box Descending defines the descending or ascending order. For crossword libraries you have the options: Number Words, or Max Word Length, or % Blacks, or Random. For sudoku libraries you have the options: Number Givens, or Difficulty, or Random. Before the sorting you have to save all changes (if any) or the program will give an error message.

The library conversions of Data Format, to RTL numbers, and data recoding to/from Unicode are not supported here. You have to select the library in the Source and in the main program use New Library dialog to set the conversions (and to save the new library).


8. Details and Word Lengths

These windows show the properties of the diagram, which are not shown in the Grid Editor's status bar.


To start it, set the check box Show Details from the Folder Browser's Options dialog. The properties are described in "CPT-The Primer". There are some fields where you can enter user data. The Marked and User Flag are single flags, the User Data is an integer (0-255). This user information can be used for the automated queries. To save the settings, click the OK button and the OK button in Folder Browser as well.

Word Lengths

To start it, set the check box Show Word Lengths from the Folder Browser's Options dialog.

Word Lengths dialog

The first line "Word Lengths 3-12 (4.66):" shows the minimum (3), the maximum (12), and the average (4.66) word length. The line "3: 32=41.02%, A:8, D:24" means that the words of length 3 are 32 which is 41.02% of all words and 8 are across words and 24 are down words. The last line shows the total number of words.

top of page  |  cpt home