[Therion] metapost input file

Henry.Bennett at dell.com Henry.Bennett at dell.com
Wed Nov 13 08:41:48 CET 2019


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 <therion-bounces at speleo.sk> 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 <therion-bounces at speleo.sk<mailto:therion-bounces at speleo.sk>> On Behalf Of Henry.Bennett at dell.com<mailto:Henry.Bennett at dell.com>
Sent: Wednesday, 13 November 2019 07:55
To: therion at speleo.sk<mailto:therion at speleo.sk>
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 <therion-bounces at speleo.sk<mailto:therion-bounces at speleo.sk>> 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20191113/4e5c4639/attachment.htm>


More information about the Therion mailing list