Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
Hello, I'm on Debian unstable and have the latest context sitting in my home directory's 'texmf'. The new ruby scripts confuse me to no end - I just don't understand how to make it works. Here is what works and what doesn't: 1) 'ruby ~/texmf/scripts/context/ruby/texexec.rb document.tex' works. 2) Made ~/texmf/scripts executable (recursively). 3) I have linked '~/texmf/scripts/context/ruby/texmfstart.rb' to '~/bin/texmfstart' (~/bin being in my path) and now calling 'texmfstart' gives me this: version : 1.8.6 - 2003/2006 - www.pragma-ade.com usage : texmfstart [switches] filename [optional arguments] switches : --verbose --report --browser --direct --execute --locate --iftouched --program --file --page --arguments --batch --edit --report --clear --make --lmake --wmake --path --stubpath --indirect --before --after --tree --autotree --environment --showenv example : texmfstart pstopdf.rb cow.eps texmfstart --locate examplex.rb texmfstart --execute examplex.rb texmfstart --browser examplap.pdf texmfstart showcase.pdf texmfstart --page=2 --file=showcase.pdf texmfstart --program=yourtex yourscript.rb arg-1 arg-2 texmfstart --direct xsltproc kpse:somefile.xsl somefile.xml texmfstart bin:xsltproc env:somepreset path:somefile.xsl somefile.xml texmfstart --iftouched=normal,lowres downsample.rb normal lowres texmfstart texmfstart bin:scite kpse:texmf.cnf texmfstart --exec bin:scite *.tex texmfstart --edit texmf.cnf texmfstart --serve texmfstart --stubpath=/usr/local/bin [--make --remove] --verbose all texmfstart --stubpath=auto [--make --remove] all Seems to work to a first approximation. 4) I have also added '~/texmf/scripts/context/stubs/unix' to my path to make the stubs residing therein accessible on the command line. 'which texexec' now returns ~/texmf/scripts/context/stubs/unix/texexec Which seems right. Also added to the path '~/texmf/scripts/context/ruby'. 'which texexec.rb' now returns ~/texmf/scripts/context/ruby/texexec.rb However, just calling 'texexec document.tex' does not work - NOTHING happens, new prompt, no errors. Same thing with 'texmfstart texexec.rb document.tex' - which is the command the 'texexec'-stub actually calls. I'm at the end of my knowledge and intuition. Can anybody help circumventing the need for the monster 'ruby ~/texmf/scripts/context/ruby/texexec.rb document.tex'? Thanks, Joh
On Thu, 11 May 2006 10:12:58 -0700, Johannes Graumann
I'm at the end of my knowledge and intuition. Can anybody help circumventing the need for the monster 'ruby ~/texmf/scripts/context/ruby/texexec.rb document.tex'?
Since I'm lazy, I didn't add any new path nor link, but just created the following wrapper texexec script in a classical bin directory (/usr/local/bin): #!/bin/sh ruby /your/path/texmf/scripts/context/ruby/texmfstart.rb texexec.rb $@ Don't know if it can help in your case. Regards, BG
Johannes Graumann wrote:
Hello,
I'm on Debian unstable and have the latest context sitting in my home directory's 'texmf'. The new ruby scripts confuse me to no end - I just don't understand how to make it works. Here is what works and what doesn't:
Have you run mktexlsr? I had to do that (manually) to make ruby 'see' some of the required libraries. Cheers, Taco
Johannes Graumann wrote:
4) I have also added '~/texmf/scripts/context/stubs/unix' to my path to make the stubs residing therein accessible on the command line. 'which texexec' now returns ~/texmf/scripts/context/stubs/unix/texexec Which seems right. Also added to the path '~/texmf/scripts/context/ruby'. 'which texexec.rb' now returns ~/texmf/scripts/context/ruby/texexec.rb However, just calling 'texexec document.tex' does not work - NOTHING happens, new prompt, no errors. Same thing with 'texmfstart texexec.rb document.tex' - which is the command the 'texexec'-stub actually calls.
strange indeed, so what does texmfstart --verbose texexec.rb --verbose document.tex tell you
I'm at the end of my knowledge and intuition. Can anybody help circumventing the need for the monster 'ruby ~/texmf/scripts/context/ruby/texexec.rb document.tex'?
oh, we'll find a way, esp since it has worked on my linux boxes for a few years now Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 11 May 2006, Johannes Graumann wrote:
However, just calling 'texexec document.tex' does not work - NOTHING happens, new prompt, no errors. Same thing with 'texmfstart texexec.rb document.tex' - which is the command the 'texexec'-stub actually calls.
You should try perhaps export RUBYLIB=~/texmf/scripts/context/ruby Using teTeX-3.0, here is what I've done to switch from perl texexec to the ruby one: chmod +x /opt/teTeX/texmf-context/scripts/context/ruby/texmfstart.rb cd /usr/local/bin ln -s /opt/teTeX/texmf-context/scripts/context/ruby/texmfstart.rb texmfstart copy these 3 lines into /opt/teTeX/bin/texexec: #!/bin/sh export RUBYLIB=/opt/teTeX/texmf-context/scripts/context/ruby exec texmfstart texexec.rb "$@" One remark for the texexec developer: it seems, when searching for executables, the order in $PATH is not respected. For example: I had /opt/teTeX/bin/dvips and /usr/bin/dvips and PATH=/opt/teTeX/bin:... but it was /usr/bin/dvips that was called to create the PS-file. (Not a big problem, I've just removed /usr/bin/dvips...) Cheers, Peter -- http://pmrb.free.fr/contact/
� wrote:
One remark for the texexec developer: it seems, when searching for executables, the order in $PATH is not respected. For example: I had /opt/teTeX/bin/dvips and /usr/bin/dvips and PATH=/opt/teTeX/bin:... but it was /usr/bin/dvips that was called to create the PS-file.
hm, i just call dvips -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 11 May 2006, Hans Hagen wrote:
? wrote:
One remark for the texexec developer: it seems, when searching for executables, the order in $PATH is not respected. For example: I had /opt/teTeX/bin/dvips and /usr/bin/dvips and PATH=/opt/teTeX/bin:... but it was /usr/bin/dvips that was called to create the PS-file.
hm, i just call dvips -)
I think, I must have made a mistake somewhere, since I cannot reproduce
this behaviour.
But there is another problem with the following test file:
%%% This needed to get upright \textmu:
\setupencoding[default=texnansi]
\usetypescript[modern-base][\defaultencoding]
\setupbodyfont[modern]
%%%
\starttext
bla and \textmu
\stoptext
When running "texexec --dvi test", the output of dvips is
This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com)
' TeX output 2006.05.13:1508' -> test.ps
On Thu, 11 May 2006, Peter Münster wrote:
Using teTeX-3.0, here is what I've done to switch from perl texexec to the ruby one: chmod +x /opt/teTeX/texmf-context/scripts/context/ruby/texmfstart.rb cd /usr/local/bin ln -s /opt/teTeX/texmf-context/scripts/context/ruby/texmfstart.rb texmfstart
copy these 3 lines into /opt/teTeX/bin/texexec: #!/bin/sh export RUBYLIB=/opt/teTeX/texmf-context/scripts/context/ruby exec texmfstart texexec.rb "$@"
I've just seen, that there are a lot of symbolic links in the teTeX installation to /opt/teTeX/bin/texexec, so please forget my advice above. Now I'm doing it like this: - keep the link for texmfstart - copy these 3 lines into /usr/local/bin/texexec: #!/bin/sh export RUBYLIB=/opt/teTeX/texmf-context/scripts/context/ruby exec texmfstart `basename $0` "$@" - /usr/local/bin must come before the /opt/teTeX/bin in your PATH - in /usr/local/bin you can create other symbolic links to texexec, for example texutil and texsync Cheers, Peter -- http://pmrb.free.fr/contact/
Peter Münster wrote:
I've just seen, that there are a lot of symbolic links in the teTeX installation to /opt/teTeX/bin/texexec, so please forget my advice above.
Yes, you have to delele all those symlinks that teTeX provides. If you go to the unix stubs directory in the ConTeXt distribution, you can do : # for a in *; do rm -i /usr/local/teTeX/bin/i686-pc-linux-gnu/$a; done Taco
participants (5)
-
Hans Hagen
-
Johannes Graumann
-
nico
-
Peter Münster
-
Taco Hoekwater