ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: gnwiii@gmail.com
Subject: Re: texmfstart newbie
Date: Tue, 27 Jun 2006 18:07:04 -0300	[thread overview]
Message-ID: <22af238a0606271407p735271c8q921becd646ff52b6@mail.gmail.com> (raw)
In-Reply-To: <10800A51-BD3A-44F1-BA15-CD5BF6633216@cox.net>

On 6/27/06, David Arnold <dwarnold45@cox.net> wrote:
> OK,
>
> I've updated to the latest context via Gerben's i-installer on my mac
> osx 10.4.6.
>
> I have no idea what texmfstart is nor do I understand its purpose.
>
> I imagine the first thing I have to do is configure, because it is
> certainly not found on my system.
>
> tmp $ which texmfstart
> tmp $ texmfstart
> -bash: texmfstart: command not found
>
>
> Here is my path:
>
> tmp $ echo $PATH
> /sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/
> local/teTeX/bin/powerpc-apple-darwin-current:/opt/local/bin:/usr/
> local/mysql/bin:/usr/X11R6/bin
>
> For example:
>
> tmp $ texexec --version
>
> TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
>
>                 texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
>                 texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
>                     tex : pdfeTeX, 3.141592-1.30.4-2.2 (Web2C 7.5.5)
>                 context : ver: 2006.06.23 20:39
>                 cont-en : ver: 2006.06.23 20:39  fmt: 2006.6.27  mes:
> english
>                 cont-nl : ver: 2006.06.23 20:39  fmt: 2006.6.27  mes:
> dutch
>
>          total run time : 3 seconds
>
>                 warning : use 'texmfstart texexec' instead
>
>
> tmp $ which texexec
> /usr/local/teTeX/bin/powerpc-apple-darwin-current/texexec
>
> Which appears to be some sort of shell script.

Yes, it is a wrapper that uses kpsewhch to search for <what>.pl and
then fires up perl with the full path to the script.  The same trick
works for ruby (.rb) and java (.jar).  I've made 3 scripts, called
runtexmfXX, where XX={pl,rb,jar}:

  ----------------- runtexmfrb ----------------
#! /bin/sh
# runtexmfrb -- run ruby scripts with "ruby <path>texmfstart.rb .."
# Author: George N. White III <gnwiii@gmail.com>
# Date: 2006-06-25
# to use: link (ln -s) to the names of ConTeXt scripts in your tex bin
# directory.
# cd <...>/bin/<arch>
# for f in texmfstart texexec pstopdf textools texutil ctxtools
pdftools rlxtools texsync ; do ln -s runtexmfrb $f ; done
#
# requires:
# ruby, sed, kpsewhich

what=`echo $0 | sed 's@.*/@@'`

p=`kpsewhich -format=texmfscripts texmfstart.rb`
{ test -n "$p" && test -f "$p"; } \
   || { echo "\`texmfstart.rb' not found."; exit 1; }

# for texmfstart just
case $what in
texmfstart)
exec ruby "$p" ${1+"$@"}
  ;;
*)
q=`kpsewhich -format=texmfscripts $what.rb`
{ test -n "$q" && test -f "$q"; } \
   || { echo "\`$what.rb' not found."; exit 1; }
exec ruby "$p" "$what.rb" ${1+"$@"}
 ;;
esac
   ----------------- end runtexmfrb ----------

   ----------------- runtexmfjar ----------------
#!/bin/sh
# runtexmfjar -- run texmf Java app
# Author: George N. White III <gnwiii@gmail.com>
# Date: 2006-06-25
# to use: link to the names of the apps:
# e.g., "ln -s runtexmfjar JabRef"

java=/usr/java/jre1.5.0/bin/java
what=`echo $0 | sed 's@.*/@@'`

p=`kpsewhich -format=texmfscripts $what.jar`
{ test -n "$p" && test -f "$p"; } \
  || { echo "\`$what.jar' not found."; exit 1; }
exec "$java" -jar "$p" ${1+"$@"}
   ----------------- end runtexmfjar ----------

   ----------------- runtexmfpl ----------------
#!/bin/sh
# runtexmfpl -- run texmf perl script
# to use: link to the names of the apps:
# e.g., "ln -s runtexmfpl epstopdf"

what=`echo $0 | sed 's@.*/@@'`

p=`kpsewhich -format=texmfscripts $what.pl`
{ test -n "$p" && test -f "$p"; } \
  || { echo "\`$what.pl' not found."; exit 1; }
exec perl "$p" ${1+"$@"}
   ----------------- end runtexmfpl ----------


> [...]

> Ruby is installed:
>
> tmp $ which ruby
> /usr/bin/ruby
> tmp $ ruby --version
> ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
>
> And here is the location of texmfstart:
>
> /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb
> /usr/local/teTeX/share/texmf.local/scripts/context/stubs/lib/texmfstart
> /usr/local/teTeX/share/texmf.local/scripts/context/stubs/lib/
> texmfstart/base
> /usr/local/teTeX/share/texmf.local/scripts/context/stubs/lib/
> texmfstart/base/kpse
>
>
> Now for questions:
>
> 1. How do I configure my system to use texmstart?

in the "bin" directory with texexec, rename texexec to texexec.orig, create the
2 or 3 scripts you want to use, do "chmod +x runtexmf*", and decide
which names are perl (.pl) and which are ruby (.rb).  Create symbolic
links:  "ln -s runtexmfrb texmfstart", etc. for the ruby scripts.  You
can also do this for other perl scripts such as epstopdf, but be
careful, as the bin directory may contain newer versions than the
texmf trees.

> 2. What are some of the usual uses I should be employing of
> texmfstart? How will it improve performance? How will it simplify my
> work? Etc? I.e what are the advantages?

Performance for scripts like this is not much af an issue these days
-- if you want performance, buy better hardware.  What is an issue is
the ability of the developers to find and fix bugs.  Perl is old and
tricky.  There are lots of old buggy perl versions installed.
Hopefully ruby will turn out to be more robust (lessons learned,
etc.).

The advantages to us are that you will use it and report bugs before we do.

The advantages to you are that Hans is replacing perl scripts with
ruby scripts, so if you need a new feature it is more likely to appear
as ruby than as perl code.

-- 
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

  reply	other threads:[~2006-06-27 21:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27 19:35 David Arnold
2006-06-27 21:07 ` gnwiii [this message]
2006-06-28 11:13 ` Mojca Miklavec
2006-06-28 13:11   ` Taco Hoekwater
2006-06-28 17:57     ` David Arnold
2006-06-28 18:24       ` Mojca Miklavec
2006-06-28 21:46         ` Gerben Wierda
2006-06-28 21:56           ` David Arnold
2006-09-01 10:38           ` Patrick Gundlach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22af238a0606271407p735271c8q921becd646ff52b6@mail.gmail.com \
    --to=gnwiii@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).