Prev Up Top Next Contents

1.A Therion setup

therion and xtherion rely on environment variables and initialization files to configure their execution behaviour.

1.A.1 Environment

therion uses the following environments

1.A.2 Inizialization files.

The inizialization files, "therion.ini" and "xtherion.ini", respectively, are text files written with a syntax similar to the data files, ie, with command lines and comments (these start with the character '#').
Therion searches the initialization files in the following directories (on Linux; on Windows after the first two things are a little different), in the order:
  1. $THERION
  2. $HOME/.therion
  3. /etc
  4. /usr/etc
  5. /usr/local/etc (this is the default installation place)
The search stops when an initialization file is found. If the initialization file is not found therion uses the default values (hardcoded in the program). The commands of the initialization file are:
The initialization file of xtherion contains a list of variables that modify the behaviour of the program. The values of these variables can be set by replacing the default one. Among the others we have
To set the keyboard encoding to suit your keyboard change the value on the line with set xth(app,sencoding) to your codepage. To get your codepage in the Window->KBD Encoding menu item add to the xtherion initialization file the line lappend xth(kbencodings) codepage (with the proper name of your codepage, eg, cp1252).

1.A.3 Execution

Therion relies on three external programs to compile the maps of a project: Indeed you can see in the output of the project builds (the lower part of the compiiler window in xtherion) the outputs from these programs.
xtherion writes the input files, both data files ".th" and ".th2" and configuration files, on disk, so that they are in sync with their images in xtherion memory. Next it invokes therion. As a matter of fact you could do without xtherion and call therion from the shell (the command prompt), which is what I do when i want to generate a map from a set of input files, without editing them.


Flow of control
Fig. 8. Flow of control

therion processes the input data files and coordinates the work of the external programs [thbook 8]. It reads the input files and interprets the commands in them. First it computes the positions of the stations. In particular it find closed loops and distributes the closure error on the shots.
Next it processes the data of the scraps (files .th2) and transforms them according to the positions of the stations. After this it exports the data as MetaPost files (.mp), and invokes mpost. This program processes the ".mp" files and produces PostScript files (.ps). A small file for each scrap, ie, for each piece of the map.
The PostScript files are processed by therion and converted into a PDF-like format. Then it invokes pdfetex passing it these PDF-like files. This program produces the cave maps in PDF format, taking care of the formatting and the inclusion of texts.

therion users - Thu Mar 3 13:05:09 2011
Prev Up Top Next Contents

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.