Re: [Therion] thfill with page background colour?

2021-11-23 Thread Tarquin Wilton-Jones via Therion
> In which variable do i access the page's background color (the one set
> wit the layout option "map-bg")?

Fun fact ... you can't access that. Or at least, it didn't seem to be
available back when I was trying to do that in version 5. And I still
can't see any useful variable in version 6.

"background" is the default background (white) in v5, but even that is
absent in v6.

I tested like this with identical input using the -d switch to get the
data.mp:

1. color map-bg [100 100 0] # yellow
2. color map-bg [100 0 0] # red

The data.mp debugging output was identical in both cases, so it is not
putting the colour into a variable in that file.

In places where I have needed this, my layout included a "code metapost"
which set a global variable where I specified the background colour
(written in metapost notation this time). The symbol code could then
read my global variable. Messy solution.
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Fwd: PDF output: layers nested?

2021-11-23 Thread Andrew Atkinson




On 23/11/2021 15:08, Benedikt Hallinger wrote:


I don't know PDF specifics, but it would be very handy to have "nested" layers, 
i.e. submaps as separate layers in the main layer.


That would be very useful, don't know if it is possible


If sublayersa re not possible, it would be cool to have an optional 
option at the export config command to instruct therion to not collate 
submaps into a bigger layer, but add each map as independent layer.



If I understand correctly what you are after I think what you maybe 
looking for are the options used with select. I used -map-level 2 to get 
what you describe.



Other options are

recursive  and  chapter-level 

I cannot say I really understand these fully, however trial and error 
got me there


Andrew
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Fwd: PDF output: layers nested?

2021-11-23 Thread Benedikt Hallinger

Hi,
no, i really have submaps in my example.
mymap in my case is defined in my thconfig file, and it references a 
mainmap as submap.
That submap again is a collection of other submaps, that finally contain 
scraps:



-
source
  map 164-Grundriss -title "Mappe 164: Wandaugenlabyrinth Ost"

#preview above 172-Hauptplan@172.Wandaugenlabyrinth.Hirlatzhoehle
preview above 162-Hauptplan@162.Wandaugenlabyrinth.Hirlatzhoehle
preview above 180-Hauptplan@180.Wandaugenlabyrinth.Hirlatzhoehle
preview above 170-Hauptplan@170.Wandaugenlabyrinth.Hirlatzhoehle
preview above 171-Hauptplan@171.Wandaugenlabyrinth.Hirlatzhoehle

164-Hauptplan@164.Wandaugenlabyrinth.Hirlatzhoehle #<-- this 
contains several other maps, which finally contain scraps


  endmap
endsource




select 164-Grundriss -map-level 2
This works, but removes the previews (from 164-Grundriss) and also the 
offsets defined in 164-Hauptplan.
I also tried "select 164-Grundriss -map-level basic" with the same 
result.





Am 2021-11-23 17:01, schrieb Andrew Atkinson:

On 23/11/2021 15:49, Benedikt Hallinger wrote:
es, exactly, when i use "select" and fetch the maps that way, it 
generates layers as expected.
However, in this instance i just have one big "map" element, but it 
would be nice if i could have the submaps also as distinct layers.


With a map definition in th file

map mymap
 map1
 map2
 map3
endmap

then in thconfig

select mymap

should give you map1, map2.. as leyers in pdf

if you also have in a th file

map map1
 mapA
 mapB
 mapC
endmap

select mymap -maplevel 2

should give you layers of mapA, mapB...

In your example you had scraps, I don't think the map-level works on
scraps. If I have a survey with a single survey I always make it into
a map, I find this makes things easier in the end. I also do this if
In have many scraps that I want on several layers

map SingleScrap
 SingleScrapA
endmap

(I have no idea why scraps cannot just be treated as maps, it's
probably something to do with the coding, however it is easy to just
turn them into maps, I've not found any downside, well apart from a
little more typing and a larger map tree)

Andrew
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Fwd: PDF output: layers nested?

2021-11-23 Thread Andrew Atkinson






On 23/11/2021 15:49, Benedikt Hallinger wrote:
es, exactly, when i use "select" and fetch the maps that way, it 
generates layers as expected.
However, in this instance i just have one big "map" element, but it 
would be nice if i could have the submaps also as distinct layers.


With a map definition in th file

map mymap
 map1
 map2
 map3
endmap

then in thconfig

select mymap

should give you map1, map2.. as leyers in pdf

if you also have in a th file

map map1
 mapA
 mapB
 mapC
endmap

select mymap -maplevel 2

should give you layers of mapA, mapB...

In your example you had scraps, I don't think the map-level works on 
scraps. If I have a survey with a single survey I always make it into a 
map, I find this makes things easier in the end. I also do this if In 
have many scraps that I want on several layers


map SingleScrap
 SingleScrapA
endmap

(I have no idea why scraps cannot just be treated as maps, it's probably 
something to do with the coding, however it is easy to just turn them 
into maps, I've not found any downside, well apart from a little more 
typing and a larger map tree)


Andrew
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


[Therion] thfill with page background colour?

2021-11-23 Thread Benedikt Hallinger

Hi metapost wizards,

I try to fill a label with the page background.
  thfill ((bbox lab)) scaled (sc * basescale * 1.5) withcolor 
;


For  i tried "label_fill_color", which however may be a 
different background.
I also tried "background", but that yields the cave passage background 
colour.


In which variable do i access the page's background color (the one set 
wit the layout option "map-bg")?



Thanks!
Beni
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] Fwd: PDF output: layers nested?

2021-11-23 Thread Benedikt Hallinger
Yes, exactly, when i use "select" and fetch the maps that way, it 
generates layers as expected.
However, in this instance i just have one big "map" element, but it 
would be nice if i could have the submaps also as distinct layers.


Am 2021-11-23 16:41, schrieb Andrew Atkinson:

On 23/11/2021 15:08, Benedikt Hallinger wrote:

I don't know PDF specifics, but it would be very handy to have 
"nested" layers, i.e. submaps as separate layers in the main layer.


That would be very useful, don't know if it is possible


If sublayersa re not possible, it would be cool to have an optional 
option at the export config command to instruct therion to not collate 
submaps into a bigger layer, but add each map as independent layer.



If I understand correctly what you are after I think what you maybe
looking for are the options used with select. I used -map-level 2 to
get what you describe.


Other options are

recursive  and  chapter-level 

I cannot say I really understand these fully, however trial and error
got me there

Andrew
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] thfill with page background colour?

2021-11-23 Thread Tarquin Wilton-Jones via Therion
On 23/11/2021 20:35, Martin Budaj wrote:
> On Tue, Nov 23, 2021 at 4:34 PM Tarquin Wilton-Jones via Therion
>  wrote:
>>
>>> In which variable do i access the page's background color (the one set
>>> wit the layout option "map-bg")?
>>
>> Fun fact ... you can't access that. Or at least, it didn't seem to be
>> available back when I was trying to do that in version 5. And I still
>> can't see any useful variable in version 6.
> 
> Hi,
> 
> it's now set as MapBackground in the latest commit.

Woohoo! What service :)
Thank you kind sir.

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] thfill with page background colour?

2021-11-23 Thread Martin Budaj
On Tue, Nov 23, 2021 at 4:34 PM Tarquin Wilton-Jones via Therion
 wrote:
>
> > In which variable do i access the page's background color (the one set
> > wit the layout option "map-bg")?
>
> Fun fact ... you can't access that. Or at least, it didn't seem to be
> available back when I was trying to do that in version 5. And I still
> can't see any useful variable in version 6.

Hi,

it's now set as MapBackground in the latest commit.

M.
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] thfill with page background colour?

2021-11-23 Thread Benedikt Hallinger

Great, that works as intended!
Thank you very much!

Am 2021-11-23 21:35, schrieb Martin Budaj:

On Tue, Nov 23, 2021 at 4:34 PM Tarquin Wilton-Jones via Therion
 wrote:


> In which variable do i access the page's background color (the one set
> wit the layout option "map-bg")?

Fun fact ... you can't access that. Or at least, it didn't seem to be
available back when I was trying to do that in version 5. And I still
can't see any useful variable in version 6.


Hi,

it's now set as MapBackground in the latest commit.

M.
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion