[therion-users] TeX paths
Debian does not really like to use environment variables to make applications run so the little script that does: #!/bin/sh THERION=${THERION:-/usr/share/therion} MPINPUTS=${MPINPUTS:-.:$THERION/mpost:} TEXINPUTS=${TEXINPUTS:-.:$THERION/tex:} export THERION MPINPUTS TEXINPUTS exec /usr/bin/therion.bin "$@" before running therion is something of a bodge. A better solution was to set the compiled defaults correctly (they are already in fact) for finding things in /etc and /usr/share/therion and to install the metapost and TeX macros in the right places for TeX and Metapost to find them. So, I asked on a list and was told that I should put them in subdirs in /usr/share/texmf and then run texhash to update the index. So I have installed the metapost macros in /usr/lib/texmf/metapost/therion/* and the TeX macros in /usr/lib/texmf/therion/* and run texhash, which has indeed updated /usr/lib/texmf/ls-R However this seems to work fine for the metapost stuff but not the TeX stuff. When I run therion on the example jsv dataset I get the output below. I'm hoping one of you teX experts can tell me what's wrong. I assume that whichever bit of TeX is involved isn't using the ls-R file to find therion.tex, but something else. I tried reading the kpathsea docs and the kpsewhich debug options to understand what goes on but it's all too complicated! I need to know which bits of TeX config I should be dealing with and where the config is stored. This is on a plain TeTeX installation, which so far as I can tell is the only option you get on Debian (I have jadeTex and PDFtex installed too). Does the bit of info at the end mean that I have to tell pdftex somehow how to find the therion.tex file? Is there any more info you need to diagnose this (such as config files?) therion 0.2.9 reading initialization file ... done. reading configuration file ... done. reading source files ... done. processing survey data ... ####################### cavern log file ######################## 1> Survex 1.0.20 2> Copyright (C) 1990-2002 Olly Betts 3> 4> Survey contains 281 survey stations, joined by 283 legs. 5> There are 3 loops. 6> Total length of survey legs = 1706.95m (1706.87m adjusted) 7> Total plan length of survey legs = 1434.82m 8> Total vertical length of survey legs = 735.85m 9> Vertical range = 127.56m (from 275 at 1761.45m to 34 at 1633.89m) 10> North-South range = 194.96m (from 1 at 5420144.07m to 245 at 5419949.11m) 11> East-West range = 203.22m (from 81 at 401613.48m to 234 at 401410.26m) 12> 40 1-nodes. 13> 202 2-nodes. 14> 34 3-nodes. 15> 5 4-nodes. 16> ######################### transcription ######################## 4> 281 : 1velka@dur_dom.jsv 5> 3 : 2@vchod.stara_jsv.jsv 9> 275 : 2@monum.dur_dom.jsv -- 34 : 3@odb.stara_jsv.jsv 10> 1 : 0@vchod.stara_jsv.jsv -- 245 : 0@za_zlomom.dur_dom.jsv 11> 81 : 14@zabch.stara_jsv.jsv -- 234 : 7@13kom.dur_dom.jsv 12> 40 : jsv9@odb.stara_jsv.jsv 13> 202 : 4@dur.dur_dom.jsv 14> 34 : 3@odb.stara_jsv.jsv 15> 5 : 24@vchod.stara_jsv.jsv #################### end of cavern log file #################### done. processing references ... done. selecting export objects ... done. scanning data tree ... done. processing projection plan ... done. writing cave_m.pdf ... processing projection none ... done. ####################### metapost log file ######################## This is MetaPost, Version 0.641 (Web2C 7.3.7) (mem=mpost 2002.11.21) 21 NOV 2002 19:30 **data.mp (data.mp (/usr/share/texmf/metapost/therion/therion.mp (/usr/share/texmf/metapost/therion/thPoint.mp) (/usr/share/texmf/metapost/therion/thLine.mp) (/usr/share/texmf/metapost/therion/thText.mp) (/usr/share/texmf/metapost/therion/thRandom.mp) (/usr/share/texmf/metapost/therion/thPatterns.mp [4001] write0 = `patterns.dat'. [4002] [4003] [4004]) (/usr/share/texmf/metapost/therion/thArea.mp write1 = `rgbcolors.dat'. ) (/usr/share/texmf/metapost/therion/thTrans.mp) (/usr/share/texmf/metapost/therion/thTmp.mp)) [1] write2 = `data.2bg'. write3 = `data.2clip'. [2] [3] write2 = `data.4bbox'. [4] [6] write2 = `data.7bg'. write3 = `data.7clip'. [7] [8] write2 = `data.9bbox'. [9] [11] write2 = `data.12bg'. write3 = `data.12clip'. [12] [13] write2 = `data.17bg'. write3 = `data.17clip'. [17] [18] write2 = `data.19bbox'. [19] write2 = `data.22bg'. write3 = `data.22clip'. [22] [23] [26] write2 = `data.27bg'. write3 = `data.27clip'. [27] [28] write2 = `data.29bbox'. [29] write2 = `data.32bg'. write3 = `data.32clip'. [32] [33] write2 = `data.37bg'. write3 = `data.37clip'. [37] [38] write2 = `data.39bbox'. [39] [41] write2 = `data.42bg'. write3 = `data.42clip'. [42] [43] write2 = `data.44bbox'. [44] [46] write2 = `data.47bg'. write3 = `data.47clip'. [47] [48] [51] write2 = `data.52bg'. write3 = `data.52clip'. [52] [53] write2 = `data.54bbox'. [54] write2 = `data.57bg'. write3 = `data.57clip'. [57] [58] [61] write2 = `data.62bg'. write3 = `data.62clip'. [62] [63] write2 = `data.67bg'. write3 = `data.67clip'. [67] [68] write2 = `data.72bg'. write3 = `data.72clip'. [72] [73] write2 = `data.77bg'. write3 = `data.77clip'. [77] [78] [81] write2 = `data.82bg'. write3 = `data.82clip'. [82] [83] [86] write2 = `data.87bg'. write3 = `data.87clip'. [87] [88] write2 = `data.89bbox'. [89] [91] write2 = `data.92bg'. write3 = `data.92clip'. [92] [93] write2 = `data.94bbox'. [94] [96] write2 = `data.97bg'. write3 = `data.97clip'. [97] [98] [101] write2 = `data.102bg'. write3 = `data.102clip'. [102] [103] write2 = `data.104bbox'. [104] write2 = `data.107bg'. write3 = `data.107clip'. [107] [108] write2 = `data.112bg'. write3 = `data.112clip'. [112] [113] [116] write2 = `data.117bg'. write3 = `data.117clip'. [117] [118] write2 = `data.119bbox'. [119] [121] write2 = `data.122bg'. write3 = `data.122clip'. [122] [123] write2 = `data.124bbox'. [124] write2 = `data.127bg'. write3 = `data.127clip'. [127] [128] write2 = `data.132bg'. write3 = `data.132clip'. [132] [133] [136] write2 = `data.137bg'. write3 = `data.137clip'. [137] [138] write2 = `data.139bbox'. [139] [141] write2 = `data.142bg'. write3 = `data.142clip'. [142] [143] write2 = `data.144bbox'. [144] [146] write2 = `data.147bg'. write3 = `data.147clip'. [147] [148] write2 = `data.149bbox'. [149] [151] write2 = `data.152bg'. write3 = `data.152clip'. [152] [153] [156] write2 = `data.157bg'. write3 = `data.157clip'. [157] [158] write2 = `data.162bg'. write3 = `data.162clip'. [162] [163] [166] write2 = `data.167bg'. write3 = `data.167clip'. [167] [168] write2 = `data.169bbox'. [169] write2 = `data.172bg'. write3 = `data.172clip'. [172] [173] write2 = `data.177bg'. write3 = `data.177clip'. [177] [178] [181] write2 = `data.182bg'. write3 = `data.182clip'. [182] [183] [186] write2 = `data.187bg'. write3 = `data.187clip'. [187] [188] write2 = `data.189bbox'. [189] [191] write2 = `data.192bg'. write3 = `data.192clip'. [192] [193] [196] write2 = `data.197bg'. write3 = `data.197clip'. [197] [198] write2 = `data.199bbox'. [199] [201] write2 = `data.202bg'. write3 = `data.202clip'. [202] [203] write2 = `data.204bbox'. [204] write2 = `data.207bg'. write3 = `data.207clip'. [207] [208] [211] write2 = `data.212bg'. write3 = `data.212clip'. [212] [213] write2 = `data.214bbox'. [214] write2 = `data.217bg'. write3 = `data.217clip'. [217] [218] write2 = `data.222bg'. write3 = `data.222clip'. [222] [223] [226] write2 = `data.227bg'. write3 = `data.227clip'. [227] [228] write2 = `data.229bbox'. [229] [231] write2 = `data.232bg'. write3 = `data.232clip'. [232] [233] write2 = `data.234bbox'. [234] write2 = `data.237bg'. write3 = `data.237clip'. [237] [238] ) 151 output files written: data.1 .. data.4004 #################### end of metapost log file #################### ######################## pdftex log file ######################### This is pdfeTeX, Version 3.14159-1.00a-pretest-20011114-ojmw-2.1 (Web2C 7.3.7) (format=pdfetex 2002.11.21) 1 APR 2003 01:34 entering extended mode **data.tex (./data.tex{/usr/share/texmf/pdftex/config/pdftex.cfg} ! I can't find file `therion.tex'. l.1 \input therion.tex Please type another input file name ! Emergency stop. l.1 \input therion.tex *** (job aborted, file error in nonstop mode) No pages of output. ##################### end of pdftex log file ##################### therion: error -- pdftex exit code -- 256 Wookey -- Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK Tel +44 (0) 1223 811679 work: http://www.aleph1.co.uk/ play: http://www.chaos.org.uk/~wookey/
On Mon 07 Apr, Wookey wrote:
Debian does not really like to use environment variables to make applications run so the little script that does: #!/bin/sh THERION=${THERION:-/usr/share/therion} MPINPUTS=${MPINPUTS:-.:$THERION/mpost:} TEXINPUTS=${TEXINPUTS:-.:$THERION/tex:} export THERION MPINPUTS TEXINPUTS exec /usr/bin/therion.bin "$@"
before running therion is something of a bodge. A better solution was to set the compiled defaults correctly (they are already in fact) for finding things in /etc and /usr/share/therion and to install the metapost and TeX macros in the right places for TeX and Metapost to find them.
So, I asked on a list and was told that I should put them in subdirs in /usr/share/texmf and then run texhash to update the index.
So I have installed the metapost macros in /usr/lib/texmf/metapost/therion/* and the TeX macros in /usr/lib/texmf/therion/* and run texhash, which has indeed updated /usr/lib/texmf/ls-R
sorry - that should have been written /usr/share/texmf/ throughout - brain failure. Please answer on that basis Wookey -- Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK Tel +44 (0) 1223 811679 work: http://www.aleph1.co.uk/ play: http://www.chaos.org.uk/~wookey/
So I have installed the metapost macros in /usr/lib/texmf/metapost/therion/* and the TeX macros in /usr/lib/texmf/therion/* and run texhash, which has indeed updated /usr/lib/texmf/ls-R
However this seems to work fine for the metapost stuff but not the TeX stuff.
Web2C based TeX distributions (you have one such according to pdfTeX banner) use configuratin file texmf/web2c/texmf.cnf (or vartexmf/web2c/texmf.cnf -- various TeX distributions may differ in this point). All searching paths are set here. For tex is it usually TEXINPUTS.pdftex = .;$TEXMF/{pdftex,tex}/{plain,generic,}// TEXINPUTS = .;$TEXMF/tex/{generic,}// It means that pdftex searches only in 'pdftex' and 'tex' subdirectories of the texmf tree. So one solution would be to move therion tex to texmf/tex/. (You had good luck to copy metapost files to texmf/metapost/) It's also possible to modify TEXINPUTS to point to directory outside of texmf, so there would be no necessity to copy therion files in texmf directory. Try TEXINPUTS = .;$TEXMF/tex/{generic,}//;/cave/therion/lib/tex// or similar. Run texhash after changing texmf.cnf file. Best regards Martin
After reinstalling therion on several computers several times, I agree, that installation process should be easier (without setting environment variables). It means doing following things: 1. Therion should automatically search for other executable files it is using, if it can not find them with default settings. This is not very difficult task, and would work on 90% of all computers, because we can assume, that thpdf and theps2pdf are located where therion.exe is. Perl and TeX usually works from command line on UNIX, on Win32, there are may be five common installations . . . 2. The THERION environment variable could be ignored, if we will assume some default location for therion library (e.g. /usr/share/therion or C:\Program files\therion\lib). As far as I know, on Linux is standard /usr/share or /usr/local/share. Which would be better? 3. The TeX's (MPINPUTS and TEXINPUTS) could be probably written somehow to tex and mp file. I can write instead "input therion.tex" filename with the path "input /usr/local/share/therion/lib/tex/therion.tex". Than no TEXINPUTS is needed. Probably the same can be somehow done with MPOST. Do you have any other ideas? S.
On Tue 08 Apr, Stacho Mudrak wrote:
After reinstalling therion on several computers several times, I agree, that installation process should be easier (without setting environment variables). It means doing following things:
1. Therion should automatically search for other executable files it is using, if it can not find them with default settings. This is not very difficult task, and would work on 90% of all computers, because we can assume, that thpdf and theps2pdf are located where therion.exe is. Perl and TeX usually works from command line on UNIX, on Win32, there are may be five common installations . . .
2. The THERION environment variable could be ignored, if we will assume some default location for therion library (e.g. /usr/share/therion or C:\Program files\therion\lib).
This already works on Debian Linux - The therion.ini file is not needed for a normal installation of survex and therion.
As far as I know, on Linux is standard /usr/share or /usr/local/share. Which would be better?
Check the LSB for details but on Debian /usr/share is the default place and local system overrides go in /usr/local/share, so check /usr/local/share first then /usr/share. I think that should be pretty standard everywhere now.
3. The TeX's (MPINPUTS and TEXINPUTS) could be probably written somehow to tex and mp file. I can write instead "input therion.tex" filename with the path "input /usr/local/share/therion/lib/tex/therion.tex". Than no TEXINPUTS is needed. Probably the same can be somehow done with MPOST.
This would work, but it seems 'better' to use the built-in config mechanisms unless it is difficult to make it work (in case you needed somehow to use the therion macros from an external TeX program - is that possible or likely?). The default non-packaged version of therion could keep it's /usr/{local}/share/therion/lib/ directory and use an explicit path but packaged versions (deb and maybe rpm) should probably just put the files in the right place.
Do you have any other ideas?
Putting the therion TeX macros into /usr/share/texmf/tex/therion works fine on Debian TeTeX so I will use that for the Debian version as it seems 'right'. This probably works on nearly all Linux systems. We may need to use explicit paths on some other unix systems? I've just uploaded the first official Debian Therion package (0.2.9-1) to the servers. It should go into the unstable distribution in the next few days. I'll do a 0.2.10 in a week or two. Wookey -- Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK Tel +44 (0) 1223 811679 work: http://www.aleph1.co.uk/ play: http://www.chaos.org.uk/~wookey/
This probably works on nearly all Linux systems. We may need to use explicit paths on some other unix systems?
I've just installed TexLive distribution on my Linux, and it installed it self to /usr/TeX/ directory ;-) Also on Win32 and MacOSX there are a lot of different TeX distributions...
I've just uploaded the first official Debian Therion package (0.2.9-1) to the servers. It should go into the unstable distribution in the next few days.
I'll do a 0.2.10 in a week or two.
Thanks a lot. We will discuss installation this weekend, I hope we will find some reasonable solutions... S.
On Thu 10 Apr, Stacho Mudrak wrote:
This probably works on nearly all Linux systems. We may need to use explicit paths on some other unix systems?
I've just installed TexLive distribution on my Linux, and it installed it self to /usr/TeX/ directory ;-) Also on Win32 and MacOSX there are a lot of different TeX distributions...
Hmm, that does make it sound like keeping the files in */share/lib/therion and using an explicit path makes sense. An alternative approach is to use configure and the autotools - they set out to solve exactly this sort of problem (which paths things are installed on) for packages distributed as source. And as a bonus the Debian stuff will automagically work as well. Wookey -- Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK Tel +44 (0) 1223 811679 work: http://www.aleph1.co.uk/ play: http://www.chaos.org.uk/~wookey/
participants (3)
-
Martin Budaj -
Stacho Mudrak -
Wookey