Thanks Martin,

That worked perfectly. 

Cheers

Nigel

From: [email protected]
Sent: Sunday, 13 February 2022 10:00 PM
To: [email protected]
Subject: Therion Digest, Vol 194, Issue 6

Send Therion mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://mailman.speleo.sk/listinfo/therion
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Therion digest..."


Today's Topics:

   1. Re: Tex-map code for passing variables (Martin Budaj)


----------------------------------------------------------------------

Message: 1
Date: Sat, 12 Feb 2022 21:46:34 +0100
From: Martin Budaj <[email protected]>
To: List for Therion users <[email protected]>
Subject: Re: [Therion] Tex-map code for passing variables
Message-ID:
        <calpsdssw3lznttvv2ow6jj6pigh4n58zcmuffpkmfxspyq4...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi,

I think the following should work:

1) use \loadpicture{\pathvar} in the shared thconfig file
2) define \pathvar macro in the 'code tex-map' section of the
customised thconfig file: \def\pathvar{yourfile.pdf}

Martin

On Tue, Feb 8, 2022 at 11:03 AM Nigel Cooke <[email protected]> wrote:
>
> Good evening all,
>
>
>
> I am trying to pass a variable to the \loadpicture function in a tex-map code 
> block. As part of a \def\maplayout{ } block, I am using this line of code :
>
> \legendbox{100}{-3}{NE}{\loadpicture{output/ShadesOfDeath_HallOfTheMountainKingLocation-p.pdf}}
>  to place a picture in the map header. This works fine but I need to pass in 
> the file path as a variable.
>
>
>
> To put it in context, I have a suite of maps, each of which has a small inset 
> map as part of the header. The inset map gives an overview/location 
> reference, much the same as the navigation panel in an atlas. The maps share 
> a common layout block in a shared thconfig file. Parameters in the shared 
> layout are populated with map specific information via Therion data and some 
> variables (eg \cavename) that I set in a thconfig file customised for the 
> specific map. I want to keep the common layout generic in case I need to 
> change it in the future and to avoid having to update it in numerous files. 
> What I'm trying to do with \loadpicture is select the picture that is the 
> location overview for the specific map. I can do it using a hardcoded file 
> path but I need it to work with a variable that contains the file path. I 
> would then set the variable in the thconfig for a specific map. The layout 
> command ?map-image? doesn't work because I have redefined the \maplayout 
> macro in a tex-map code bloc
 k.
>
>
>
> Is it possible to pass a file path in a variable to the \loadpicture 
> function? If so, can anyone show me some code that would to do it? I?ve tried 
> reusing an existing variable like \the\comment but that only produces a 
> compile error. My Tex knowledge is limited so I am struggling with working 
> out how to set this up. Also, if anyone knows of a better way to achieve the 
> same result I?d be eternally grateful if you would share that knowledge.
>
>
>
> Thanks
>
>
>
> Nigel
>
>
>
>
>
> _______________________________________________
> Therion mailing list
> [email protected]
> https://mailman.speleo.sk/listinfo/therion


------------------------------

Subject: Digest Footer

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


------------------------------

End of Therion Digest, Vol 194, Issue 6
***************************************

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

Reply via email to