ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* texmfstart newbie
@ 2006-06-27 19:35 David Arnold
  2006-06-27 21:07 ` gnwiii
  2006-06-28 11:13 ` Mojca Miklavec
  0 siblings, 2 replies; 9+ messages in thread
From: David Arnold @ 2006-06-27 19:35 UTC (permalink / raw)


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.

tmp $ cat /usr/local/teTeX/bin/powerpc-apple-darwin-current/texexec
#!/bin/sh

test -f /bin/sh5 && test -z "$RUNNING_SH5" \
   && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
   && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1 
+"$@"}; }
unset RUNNING_SH5

test -f /bin/bsh && test -z "$RUNNING_BSH" \
   && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
   && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1 
+"$@"}; }
unset RUNNING_BSH

export PATH

# hack around a bug in zsh:
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'

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

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

perl "$p" ${1+"$@"}



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?

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?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-27 19:35 texmfstart newbie David Arnold
@ 2006-06-27 21:07 ` gnwiii
  2006-06-28 11:13 ` Mojca Miklavec
  1 sibling, 0 replies; 9+ messages in thread
From: gnwiii @ 2006-06-27 21:07 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-27 19:35 texmfstart newbie David Arnold
  2006-06-27 21:07 ` gnwiii
@ 2006-06-28 11:13 ` Mojca Miklavec
  2006-06-28 13:11   ` Taco Hoekwater
  1 sibling, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2006-06-28 11:13 UTC (permalink / raw)
  Cc: Hans van der Meer

On 6/27/06, David Arnold 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.

...

> 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
>
>
> Now for questions:
>
> 1. How do I configure my system to use texmstart?

Under windows it comes as an executable, under linux I sometimes
created an executable file named texexec (in the bin folder of course)
with the content
    ruby path-to-context-ruby-scripts/texmfstart.rb

Here's a citation from a mac user:

On 5/25/06, Hans van der Meer wrote:
> I did some digging in the .../context/ruby script directory and found
> a small problem with the script, at least for some users.
>
> On my MacOSX system the script file(s) needed the execute bits set,
> so I did:
> cd ..../context/ruby
> (sudo) chmod -R a+x *.rb
>
> And of course an alias "texmfstart=texmfstart.rb" comes in handy.
>
> I hope this helps others who might be struggling to get texmfstart
> running.
>
> Hans van der Meer

Something should be automated here I suppose. The MikTeX guy wasn't
extremely responsive to it, tetex isn't maintained any more, perhaps
at least you Mac guys could/should do something about it. Can someone
write a note to the contextgarden about how to do configure the
texmfstart properly?

> 2. What are some of the usual uses I should be employing of
> texmfstart?

As a regular user you shouldn't note it's presence once you set it up
properly. But generally you can use it to run stuff such as
"texmfstart mptopdf" without having to worry whether mptopdf is a perl
or ruby program, you can use it to edit config files, open
documentation and so on, but the list is way to long (and I don't know
it all/don't know how to use all its features) ...

Most notable the modern modules which call external programs are
written in such a way that they execute "texmfstart
name-of-the-script", for example "texmfstart pstopdf some-ps-file"
instead of "pstopdf some-ps-file". This means that the user doesn't
need "pstopdf" to be present on the system as an executable command
and means better portability.

> How will it improve performance?

Just as George N. White said: performance in terms of
how-many-seconds-per-run is not really the question, but I guess that
it might improve performance since it might use more clever methods to
execute things. I know that Hans has somehow rewritten the kapathsea
and mpto, but I don't really know which scripts are responsible for
calling them and for faster execution. However: you don't need to
worry about performance. Hans does.

If you care about performance in mp labels, you can improve it
considerable by using texexec.rb (and texmfstart to start it) an by
switching from btex ... etex to textext("...") and \sometxt
(aproximately ten times faster on my examples and able to do some
crazy things that have never been possible with btex ... etex or
textext). But well ... the presence of texmfstart is essential in this
case.

> How will it simplify my work? Etc?
> I.e what are the advantages?

Portability. Support: sooner or later you'll figure out that the old
texexec.pl doesn't do what it's supposed to do (mp labels being one of
the problems for example). Hans is willing to work on improving the
texexec.rb, but not on fixing the old stuff that will become obsolete
one day anyway.

Mojca

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-28 11:13 ` Mojca Miklavec
@ 2006-06-28 13:11   ` Taco Hoekwater
  2006-06-28 17:57     ` David Arnold
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2006-06-28 13:11 UTC (permalink / raw)
  Cc: Hans van der Meer



Mojca Miklavec wrote:
> with the content
>     ruby path-to-context-ruby-scripts/texmfstart.rb

What I have is this simple script (and it should work on MacOSX
just as well). Name it 'texfmstart', make it executable, fill in
the correct path and put it in a binaries directory.


   #!/bin/sh
   ruby path-to-context-ruby-scripts/texmfstart.rb $@


Cheers, taco

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-28 13:11   ` Taco Hoekwater
@ 2006-06-28 17:57     ` David Arnold
  2006-06-28 18:24       ` Mojca Miklavec
  0 siblings, 1 reply; 9+ messages in thread
From: David Arnold @ 2006-06-28 17:57 UTC (permalink / raw)
  Cc: Jacob Prystowsky, Bruce Wagner

Taco, Mojca,

Thanks, on my Mac OSX 10.4.6 with Gerben's TeX, I:

cd /usr/local/teTeX/share/texmf.local/scripts/context/ruby/
sudo chmod -R a+x *.rb

Then I wrote in .bash_profile:

alias texmfstart='/usr/local/teTeX/share/texmf.local/scripts/context/ 
ruby/texmfstart.rb'

Now I have:

chapter1 $ texmfstart --help
version  : 2.0.0 - 2003/2006 - www.pragma-ade.com

usage    : texmfstart [switches] filename [optional arguments]

switches : --verbose --report --browser --direct --execute --locate -- 
iftouched --ifchanged
            --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 --direct ruby rel:wn-cleanup-1.rb oldfile.xml  
newfile.xml
            texmfstart bin:xsltproc env:somepreset path:somefile.xsl  
somefile.xml
            texmfstart --iftouched=normal,lowres downsample.rb normal  
lowres
            texmfstart --ifchanged=somefile.dat --direct processit  
somefile.dat
            texmfstart bin:scite kpse:texmf.cnf
            texmfstart --exec bin:scite *.tex
            texmfstart --edit texmf.cnf
            texmfstart --edit kpse:texmf.cnf
            texmfstart --serve

            texmfstart --stubpath=/usr/local/bin [--make --remove] -- 
verbose all
            texmfstart --stubpath=auto [--make --remove] all

I can now run:

chapter1 $ texmfstart texexec section1.tex

Is there anything else I should do now?



On Jun 28, 2006, at 6:11 AM, Taco Hoekwater wrote:

>
>
> Mojca Miklavec wrote:
>> with the content
>>     ruby path-to-context-ruby-scripts/texmfstart.rb
>
> What I have is this simple script (and it should work on MacOSX
> just as well). Name it 'texfmstart', make it executable, fill in
> the correct path and put it in a binaries directory.
>
>
>    #!/bin/sh
>    ruby path-to-context-ruby-scripts/texmfstart.rb $@
>
>
> Cheers, taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-28 17:57     ` David Arnold
@ 2006-06-28 18:24       ` Mojca Miklavec
  2006-06-28 21:46         ` Gerben Wierda
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2006-06-28 18:24 UTC (permalink / raw)


On 6/28/06, David Arnold wrote:
> Taco, Mojca,
>
> Thanks, on my Mac OSX 10.4.6 with Gerben's TeX, I:
>
> cd /usr/local/teTeX/share/texmf.local/scripts/context/ruby/
> sudo chmod -R a+x *.rb
>
> Then I wrote in .bash_profile:
>
> alias texmfstart='/usr/local/teTeX/share/texmf.local/scripts/context/
> ruby/texmfstart.rb'
>
> Now I have:
>
> chapter1 $ texmfstart --help
> version  : 2.0.0 - 2003/2006 - www.pragma-ade.com
...
> Is there anything else I should do now?

1. either

alias texexec='/usr/local/teTeX/share/texmf.local/scripts/
context/stubs/unix/texexec

or copy the content of that folder somewhere to PATH. Just make sure
that texexec resolves to "texmfstart texexec" unless you really like
writing it the long way.

2. write a page on the wiki about how you did it (or at least one of
the mac users should do that)

Mojca

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Gerben Wierda @ 2006-06-28 21:46 UTC (permalink / raw)


On Jun 28, 2006, at 20:24, Mojca Miklavec wrote:

> 1. either
>
> alias texexec='/usr/local/teTeX/share/texmf.local/scripts/
> context/stubs/unix/texexec
>
> or copy the content of that folder somewhere to PATH. Just make sure
> that texexec resolves to "texmfstart texexec" unless you really like
> writing it the long way.
>
> 2. write a page on the wiki about how you did it (or at least one of
> the mac users should do that)

I will fix (but I have no idea if I can do it before my vacation) the 
ConTeXt updater such that texmfstart is supported out of the box. If 
you write instructions, make sure you remove them after I have fixed 
this.

G

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-28 21:46         ` Gerben Wierda
@ 2006-06-28 21:56           ` David Arnold
  2006-09-01 10:38           ` Patrick Gundlach
  1 sibling, 0 replies; 9+ messages in thread
From: David Arnold @ 2006-06-28 21:56 UTC (permalink / raw)


G,

Nah, I'll hold of on instructions. Much better your way.

Thanks.

On Jun 28, 2006, at 2:46 PM, Gerben Wierda wrote:

> On Jun 28, 2006, at 20:24, Mojca Miklavec wrote:
>
>> 1. either
>>
>> alias texexec='/usr/local/teTeX/share/texmf.local/scripts/
>> context/stubs/unix/texexec
>>
>> or copy the content of that folder somewhere to PATH. Just make sure
>> that texexec resolves to "texmfstart texexec" unless you really like
>> writing it the long way.
>>
>> 2. write a page on the wiki about how you did it (or at least one of
>> the mac users should do that)
>
> I will fix (but I have no idea if I can do it before my vacation) the
> ConTeXt updater such that texmfstart is supported out of the box. If
> you write instructions, make sure you remove them after I have fixed
> this.
>
> G
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: texmfstart newbie
  2006-06-28 21:46         ` Gerben Wierda
  2006-06-28 21:56           ` David Arnold
@ 2006-09-01 10:38           ` Patrick Gundlach
  1 sibling, 0 replies; 9+ messages in thread
From: Patrick Gundlach @ 2006-09-01 10:38 UTC (permalink / raw)


Hello Gerben,

[texmfstart on OS X not in PATH]

> I will fix (but I have no idea if I can do it before my vacation) the 
> ConTeXt updater such that texmfstart is supported out of the box. If 
> you write instructions, make sure you remove them after I have fixed 
> this.

are you back from your vacation? Any news on this one?

Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-09-01 10:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27 19:35 texmfstart newbie David Arnold
2006-06-27 21:07 ` gnwiii
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

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).