[Therion] Embedded image does not appear in some layouts
Bruce Mutton
bruce at tomo.co.nz
Thu Feb 13 08:40:03 CET 2025
Bill
I think def\maplayout{ redefines completely what is exported, and so any
map-image statements will silently fail. Page 76 of the Therion Book
explains somewhat.
So if your def\maplayout does not have an equivalent of map-image , then
each time it is called your map-image will be ignored.
Here is an example where I have done what I think you are after.
code tex-map #this snippet intended for a minimal plan pdf with
'map-image' that will later be inserted into an elevation pdf
\savepath{mypath1}{"Laghu-kmlSurface-Dec2022.png"} %#save relative
path to file to absolute path
\def\maplayout{
\legendbox{73}{120}{NW}{\loadpicture{mypath1}} %#equivalent of
map-image
\ifnortharrow\legendbox{130}{20}{E}{\northarrow}\fi %#now insert a north
arrow if appropriate
}
endcode
A slightly less elegant version of this solution is described here
https://therion.speleo.sk/wiki/tex?s%5b%5d=tex&s%5b%5d=map#changing_the_look
_or_layout_of_a_map_output
I hope one day to be completely free of the constraints imposed of
'map-header', and it is possible that the example above is the last missing
piece of the puzzle for me. However doing everything by def/maplayout does
make it complicated when the boundaries of the cave are extended or multiple
outputs at different scales are required. There are a lot of {x}{y}{anchor}
parameters to juggle.
Bruce
-----Original Message-----
From: Therion <therion-bounces at speleo.sk> On Behalf Of Bill Gee
Sent: Thursday, 13 February 2025 04:49
To: Therion Mail List <therion at speleo.sk>
Subject: [Therion] Embedded image does not appear in some layouts
Here is a puzzle ... I have set up a thconfig file to create a profiles
map, then used the "map-image" layout directive to include it in the output
files. It works ... SOMETIMES!
Take a look at the thconfig file embedded below. The profiles image appears
on the files produced from the MainMap and MainMapNoColor layouts. It does
not appear on MainMapPrint.
Why? Does it have something to do with the TeX code in MainMapPrint?
Thanks!
--
===============
Bill Gee
...
code tex-map
\def\maplayout{
\legendbox{3}{85}{W}{
\def\txtsize{16} % Define the default text size
\legendwidth=20 cm
\legendtextsectionsize={\size[\txtsize]}
\legendtextsize={\size[\txtsize]}
\legendtextheadersize={\size[40]}
\hsize=\legendwidth
\the\legendcontent={\size[\txtsize]}
\the\legendtextsize\ Map generated at \the\time
\the\currentdate\medskip
\the\legendtextsize\ Therion version \the\thversion
}
}
endcode
More information about the Therion
mailing list