<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
</head><body><p>Hi all<br></p><p>You can use relatives paths like that:<br></p><p>..\top-folder\<br>.\sub-folder\<br></p><p>..\ means one folder level higher (..\..\ is like to folder levels up)<br>.\ means actual working folder<br></p><p>If you have your project files at the same level like a folder for your tex/metapost code like this:<br>Therion-Folder<br> Sub-Folder-Code<br> Sub-Folder-project<br></p><p>You can reference from your project folder to the code folder like this:<br>..\Sub-Folder\Code\metapost-code.th<br></p><p>cheers,<br>Torsten<br></p><blockquote type="cite">Bruce Mutton <bruce@tomo.co.nz> hat am 13. November 2019 um 08:06 geschrieben: <br> <br><div class="ox-6414d12cf2-WordSection1"><p class="ox-6414d12cf2-MsoPlainText">Henry</p><p class="ox-6414d12cf2-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.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">Looking at my standard texmf.cnf file, it has</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">TEXINPUTS = $TEXMF/tex;.</p><p class="ox-6414d12cf2-MsoPlainText">MPINPUTS = .</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-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?</p><p class="ox-6414d12cf2-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.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">Bruce</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">-----Original Message-----<br>From: Therion <therion-bounces@speleo.sk> On Behalf Of Henry.Bennett@dell.com<br>Sent: Wednesday, 13 November 2019 07:55<br>To: therion@speleo.sk<br>Subject: Re: [Therion] metapost input file</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">Hi Andrew,</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-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).</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">I've used this</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText"> TEXINPUTS = $TEXMF/tex;C:/path/to/your/therion/root/;.</p><p class="ox-6414d12cf2-MsoPlainText"> MPINPUTS = C:/path/to/your/therion/root/;.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">you will need to change this to your source paths.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-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.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">Not quite what you were looking for prehaps, but certainly makes for portable codebases.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">Henry</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">-----Original Message-----</p><p class="ox-6414d12cf2-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</p><p class="ox-6414d12cf2-MsoPlainText">Sent: 12 November 2019 17:06</p><p class="ox-6414d12cf2-MsoPlainText">To: List for Therion users</p><p class="ox-6414d12cf2-MsoPlainText">Subject: [Therion] metapost input file</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">My layouts for my areas has become difficult to manage, especially all the metapost.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-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.</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-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</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">input symbol.mp inside the one code metapost/ endcode</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">thanks</p><p class="ox-6414d12cf2-MsoPlainText"> </p><p class="ox-6414d12cf2-MsoPlainText">Andrew</p><p class="ox-6414d12cf2-MsoPlainText"> </p></div></blockquote><p class="default-style"><br> </p><blockquote type="cite">_______________________________________________ <br>Therion mailing list <br>Therion@speleo.sk <br>https://mailman.speleo.sk/listinfo/therion <br></blockquote><p class="default-style"><br> </p></body></html>