Prev Up Top Next Contents

2.2 xtherion

Let's start with a very simple example: a configuration file and just one survey data file. Since therion files are text files you can write them with any text editor, but it is easier to use xtherion.
The advantage of xterion is that while you write them you can try and compile your project, and if there are errors you can correct them. xtherion helps you highlighting the error message in the output window (the lower window) and linking this to the line in the source file that caused the error.
Now run xtherion which starts with the compiler mode. You can create a new configuration file (menu "File | New"), or open and existing one. Create a directory for this example and move into it. Put in there the files for this example
Open the file "thconfig" with xtherion (menu "File | Open"). It says to use the data file "gm0.th", it defines a layout (named "xxx") with two lines of code for TeX, and two output commands ("export"); the first for the extended section (scale 1:200), the second for the plan, with several layout options.
Now switch xtherion in "Text Editor" mode and open the data file (menu "File | Open"). This is almost as a survex data file, with slight syntax differences, but you should not have trouble to understand it. If you have problem, you can read the therion data syntax in app. 2.b .
Now you can compile everything (menu "File | Compile"). xtherion switches to "Compiler" mode and near the "Compile" button of the panel, there appear a yellow "RUNNING". After a while it should turn in a green "OK". If it becomes a red "ERROR" it means that something went wrong: check the output for error messages. If there is no error message (and therion has generated a pdf) the error might be due to a missing program (or incorrect installation, or runtime environment): make sure that therion can find the programs it needs (cavern, metapost, and pdftex). A third possible outcome is a yellow "WARNING". It means that therion detected something wrong but managed to get around it (for example a missing layout).


Compiling with therion
Fig. 10. Compiling with therion

You can see the pdf output with a pdf viewer. There is not very much: only segments at the positins of the stations and a few lines of header. After all the data amount only to the survey and there is no drawing data yet.
Before continuing, however, play a little more by adding the different layout options, to see how the pdf changes. Refer to app. 2.a for more datils on the commands of the configuration file.

2.2.1 PDF preview

While you are making a survey map it is incovenient to continuosly go back and forth between xtherion and a PDF viewer. The "Compiler" window of xtherion has a control named "PDF preview". If you write the name of a pdf file you are generating with therion, at each successful compilation, xtherion invokes a PDF viewer to display the specified file, reloading it automatically.

therion users - Fri Feb 12 06:33:06 2010
Prev Up Top Next Contents

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