Hi Bruce -

Thanks! I had to fiddle with it a bit, but it works exactly as I want. Here is the TeX code I came up with:

=====================
code tex-map
  \savepath{ProfilesPath1}{"GeronimoSpringsCave-Profiles.pdf"}
  \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
      }
    \legendbox{0}{0}{SW}{\loadpicture{ProfilesPath1}}
  }
endcode
=====================

You mentioned constant fiddling with the {x}{y}{anchor} parameters as the map changes. That is the reason I save photos and profiles for the very end of a cartography project. I really like Therion, but its handling of profiles leaves a LOT to be desired.

I have done several maps where the profiles were treated like cross-sections. In a way they are a cross-section, so that method is not entirely wrong. The main problem with it is when I want to join multiple profile scraps.

So far I have drawn only one section of profile for this map. I will have some others. Finding a way to create a different .pdf file for them could be interesting. I suspect I will have to create thconfig/.th files specifically for the profiles, and each different section of profile will have to be defined in a "map" directive.

For this map I am already doing that to generate a debug version of the map. A thconfig file can have exactly ONE "select" directive, and that does not work when generating a debug map.

===============
Bill Gee

On 2/13/25 01:40, Bruce Mutton wrote:
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 <[email protected]> On Behalf Of Bill Gee
Sent: Thursday, 13 February 2025 04:49
To: Therion Mail List <[email protected]>
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


_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

Reply via email to