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
THERION
, search path for the initialization files;
HOME
, the path $HOME/.therion
is used in the search of the
initialization files when these are not found in the path THERION
(or the latter is not defined);
TEMP
and TMP
are used to make the path of the directory for
the temporary files. These are $TMP/th$PID
, where $PID
is the
process id. They are also used for the path of the debug directory
whree the temporary data files are saved, $TMP/thDEBUG
.
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:
$THERION
$HOME/.therion
/etc
/usr/etc
/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:
- "encoding-default", defines the default output encoding;
- "encoding-sql", defines the encoding for the data exported in the SQL
scripts;
- "language", defines the language for the output legends. For example
"language fr";
- "loop-closure", defines the loop closure algorithm. It can be either
"survex" (default) or "therion" (a simpler algorithm);
- "mpost-path", specifies the path of MetaPost. The default is "mpost";
- "pdftex-path", specifies the path of pdfTeX. The default is "pdfetex";
- "source-path", is the path of search of the input files (.th e .th2)
and the configuration file ("thconfig").
- "tmp-path", specifies the directory where the temporary directories
should be created. The default is "/tmp".
- "tmp-remove", defines the command to remove temporary files.
- "tex-env" used only in Windows (TODO);
- "tex-font" specifies the fonts for an encoding. It ha syntax
"tex-font encoding rm it bf ss ssi", where the name of the encoding is
followed by the fonts for the five styles: normal, italics, boldface,
sans-serif, and sans-serif italics.
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:
cavern
, to process the survey data;
metapost
, to process the scraps;
pdfTeX
, to put together the scraps and form the maps.
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.
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.