<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle24
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Thanks Henry<o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal>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?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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 <span lang=EN-US>custom_entrance_theta?  (It is tex and metapost that I am not so good at).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>But I do have the problem presented in </span><a href="https://therion.speleo.sk/wiki/tex?s%5b%5d=texinputs#changing_the_look_or_layout_of_a_map_output">this wiki post</a> (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.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Bruce<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Therion <therion-bounces@speleo.sk> <b>On Behalf Of </b>Henry.Bennett@dell.com<br><b>Sent:</b> Wednesday, 13 November 2019 20:42<br><b>To:</b> therion@speleo.sk<br><b>Subject:</b> Re: [Therion] metapost input file<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Hi Bruce,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>For example with a directory structure like this<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>.\CodeLibary\<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>.\Region\Area\Cave<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Declare the fully qualified path to the root (.) in </span>texmf.cnf.  <span lang=EN-US>You can access you code stored in files in the CodeLibrary directory like this when working on a survey stored in the “Cave” directory. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thconfig.th<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                …<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                #inject standard code for layouts<o:p></o:p></span></p><p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>  input ..\..\CodeLibrary\_layouts.mp       # custom Metapost<o:p></o:p></span></p><p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>  input ..\..\CodeLibrary\_layouts.tex       # custom tex<o:p></o:p></span></p><p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>  input ..\..\CodeLibrary\_layouts.thc       # custom layouts<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>layout local<o:p></o:p></span></p><p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>  copy custom_water_blue<o:p></o:p></span></p><p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>  copy custom_entrance_theta<o:p></o:p></span></p><p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>  copy custom_northarrow_large<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Is that what you were after?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Henry<o:p></o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Therion <<a href="mailto:therion-bounces@speleo.sk">therion-bounces@speleo.sk</a>> <b>On Behalf Of </b>Bruce Mutton<br><b>Sent:</b> 13 November 2019 07:07<br><b>To:</b> 'List for Therion users'<br><b>Subject:</b> [Therion] metapost input file<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><p><span style='color:#CE1126'>[EXTERNAL EMAIL] <o:p></o:p></span></p></div><p class=MsoPlainText>Henry<o:p></o:p></p><p class=MsoPlainText>Your solution looks very similar to <a href="https://therion.speleo.sk/wiki/tex?s%5b%5d=texinputs#changing_the_look_or_layout_of_a_map_output">this wiki post</a> but with some differences.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Looking at my standard texmf.cnf file, it has<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>TEXINPUTS = $TEXMF/tex;.<o:p></o:p></p><p class=MsoPlainText>MPINPUTS = .<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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?<o:p></o:p></p><p class=MsoPlainText>It would be nice to have some actual examples of amended variables, and some Therion input mp and tex files snippets that use them.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Bruce<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span lang=EN-US>-----Original Message-----<br>From: Therion <<a href="mailto:therion-bounces@speleo.sk">therion-bounces@speleo.sk</a>> On Behalf Of <a href="mailto:Henry.Bennett@dell.com">Henry.Bennett@dell.com</a><br>Sent: Wednesday, 13 November 2019 07:55<br>To: <a href="mailto:therion@speleo.sk">therion@speleo.sk</a><br>Subject: Re: [Therion] metapost input file</span><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Hi Andrew,<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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).<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I've used this <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>   TEXINPUTS = $TEXMF/tex;C:/path/to/your/therion/root/;.<o:p></o:p></p><p class=MsoPlainText>   MPINPUTS = C:/path/to/your/therion/root/;.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>you will need to change this to your source paths.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Not quite what you were looking for prehaps, but certainly makes for portable codebases.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Henry<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<o:p></o:p></p><p class=MsoPlainText>From: Therion <<a href="mailto:therion-bounces@speleo.sk"><span style='color:windowtext;text-decoration:none'>therion-bounces@speleo.sk</span></a>> On Behalf Of Andrew Atkinson<o:p></o:p></p><p class=MsoPlainText>Sent: 12 November 2019 17:06<o:p></o:p></p><p class=MsoPlainText>To: List for Therion users<o:p></o:p></p><p class=MsoPlainText>Subject: [Therion] metapost input file<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>My layouts for my areas has become difficult to manage, especially all the metapost.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>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<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>input symbol.mp inside the one code metapost/ endcode<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>thanks<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Andrew<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p></div></body></html>