Thanks Henry Can you take your examples further? What you have shown is what I am sure many of us are already doing with our everyday Therion data files, and does not require any fancy tricks to work with versioned repositories where each user has a different root file structure. It is the configuration variable, and then the indirect use of it from within metapost or tex that I am curious about.
To demonstrate how TEXINPUTS or MPINPUTS might be used, could you show an example of the value you assign your TEXINPUTS and MPINPUTS variables in texmf.cnf? And then how those variables are used to reference (perhaps with relative paths) particular files from within tex or metapost code? Maybe using the tex example for your custom_entrance_theta? (It is tex and metapost that I am not so good at). I don’t think I am having the problem that I think Andrew is describing, managing access to metapost code – each of my projects has a copy that is manually synced whenever I make a change to my custom symbols, rather than a single copy per machine, as I think your example is implying. Only about 20 projects for which the custom symbols rarely change (and themselves have a master versioned repository) and so it is manageable. The goal and the result I have so far is that every therion project is completely self-contained and portable. But I do have the problem presented in this wiki post <https://therion.speleo.sk/wiki/tex?s%5b%5d=texinputs#changing_the_look_or_layout_of_a_map_output> (ie loading a picture or text file that is in or near the current folder). I am not sure that I find the solution presented for ‘absolute paths’ palatable yet, unless tex and or metapost can be tricked into accepting some degree of relative path. Bruce From: Therion <[email protected]> On Behalf Of [email protected] Sent: Wednesday, 13 November 2019 20:42 To: [email protected] Subject: Re: [Therion] metapost input file Hi Bruce, For example with a directory structure like this .\CodeLibary\ .\Region\Area\Cave Declare the fully qualified path to the root (.) in texmf.cnf. You can access you code stored in files in the CodeLibrary directory like this when working on a survey stored in the “Cave” directory. Thconfig.th … #inject standard code for layouts input ..\..\CodeLibrary\_layouts.mp # custom Metapost input ..\..\CodeLibrary\_layouts.tex # custom tex input ..\..\CodeLibrary\_layouts.thc # custom layouts layout local copy custom_water_blue copy custom_entrance_theta copy custom_northarrow_large Is that what you were after? Henry From: Therion <[email protected] <mailto:[email protected]> > On Behalf Of Bruce Mutton Sent: 13 November 2019 07:07 To: 'List for Therion users' Subject: [Therion] metapost input file [EXTERNAL EMAIL] Henry Your solution looks very similar to this wiki post <https://therion.speleo.sk/wiki/tex?s%5b%5d=texinputs#changing_the_look_or_layout_of_a_map_output> but with some differences. Looking at my standard texmf.cnf file, it has TEXINPUTS = $TEXMF/tex;. MPINPUTS = . If ‘.’ refers to the current folder, then can we specify a path relative to that? I presume not (otherwise there would be no problem) but you suggest that relative paths can be specified from an absolute path enumerated in one of those variables. So maybe they are relative, but with limitations? It would be nice to have some actual examples of amended variables, and some Therion input mp and tex files snippets that use them. Bruce -----Original Message----- From: Therion <[email protected] <mailto:[email protected]> > On Behalf Of [email protected] <mailto:[email protected]> Sent: Wednesday, 13 November 2019 07:55 To: [email protected] <mailto:[email protected]> Subject: Re: [Therion] metapost input file Hi Andrew, To make the command data portable you can use relative paths but you need to define your root in the texmf.cnf file which is located in \therion\texmf\web2c folder (in windows). I've used this TEXINPUTS = $TEXMF/tex;C:/path/to/your/therion/root/;. MPINPUTS = C:/path/to/your/therion/root/;. you will need to change this to your source paths. You may find that you are unable to save the texmf.cnf file unless you edit it as the host administrator. To do this open a command prompt as an administrator and then edit the file directly from there. Not quite what you were looking for prehaps, but certainly makes for portable codebases. Henry -----Original Message----- From: Therion < <mailto:[email protected]> [email protected]> On Behalf Of Andrew Atkinson Sent: 12 November 2019 17:06 To: List for Therion users Subject: [Therion] metapost input file My layouts for my areas has become difficult to manage, especially all the metapost. input file works in metapost, but requires the full path, is there a way to find the path of the file that you are in and us that as a base. We use version control so different machines have different file paths, so really want to avoid this. At the moment I have make a different file for my symbols and in each file have to have a layout/endlayout and code metapost/endcode, then in the master file I have to input outside the layout and then copy the layout for each file, which works but it would be so much nicer to just have input symbol.mp inside the one code metapost/ endcode thanks Andrew
_______________________________________________ Therion mailing list [email protected] https://mailman.speleo.sk/listinfo/therion
