Layout Basic

Log in for wiki controls

Created on:
Before records began
Last changed on:
January 22, 2019 16:14

Short layout in the .thconfig file

To start personalising what you wish to display in the final pdf, let's look at the following code:

layout local
  legend on 
  map-header se 0 100
endlayout

What does this code do? For a start, we're adding an automatically generated legend of symbols to our map. The legend will be displayed under the map header (which by default contains the title, surveyors, length, depth etc...).

Then we're placing the header at a specific location around the map. Here, we're placing the bottom right corner of our header (se) at a longitude of 0 (left), and latitude of 100 (top) relative to the map.

Let's add this code to the .thconfig file, as below and recompile, comparing the results with the previous map.

source M19.th

layout local
  legend on 
  map-header se 0 100
endlayout

export map -projection plan -o M19_plan.pdf -layout local

Notice we've added the option layout local to our export line, to tell the compiler which layout options to use when processing the data files.

new_header_layout.png

Some more layout options

It's possible to choose several more options in the layout, for instance to display a grid, or to fill the cave passage with a specific colour.

Let's experiment with the scale of our drawins. Try adding scale 1 100or scale 1 400 to the layout block.

new scale 1 100 new scale 1 400

Then add fill the passages with a foreground colour using a standard RGB call. colour map-fg [92 86 65]

colour fg

Our layout block now looks like this:

layout local
  legend on 
  map-header  0 100 se
  scale 1 400
  colour map-fg [92 86 65]
endlayout

Maybe we would also like to add a grid in the background of our cave map. Before we do this, we should fix the entrance to a coordinate system. The simplest would be to use a latitude-longitude-elevation call. To do this, we need to add the following line to the centreline block in M19.th:

cs lat-long
fix 25  46.253034  13.760225 1860 # fix 

25 is the entrance station, the coordinates are found from GPS referencing the point.

Now we can extend our layout block with the following few lines:

grid bottom              # grid 
grid-size 20 20 5 m      # grid-size 
grid-coords off          # grid-coords 

See the result:

layout_grid.png

Find the references to the layout options in the therionbook.

next lesson: advanced map generation

back to the menu