ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
@ 2006-05-11 17:12 Johannes Graumann
  2006-05-11 18:31 ` nico
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Johannes Graumann @ 2006-05-11 17:12 UTC (permalink / raw)


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

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 17:12 Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO? Johannes Graumann
@ 2006-05-11 18:31 ` nico
  2006-05-11 18:35 ` Taco Hoekwater
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: nico @ 2006-05-11 18:31 UTC (permalink / raw)


On Thu, 11 May 2006 10:12:58 -0700, Johannes Graumann  
<johannes_graumann@web.de> wrote:

> 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

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 17:12 Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO? Johannes Graumann
  2006-05-11 18:31 ` nico
@ 2006-05-11 18:35 ` Taco Hoekwater
  2006-05-11 18:48 ` Hans Hagen
  2006-05-11 19:54 ` Peter Münster
  3 siblings, 0 replies; 9+ messages in thread
From: Taco Hoekwater @ 2006-05-11 18:35 UTC (permalink / raw)


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

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 17:12 Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO? Johannes Graumann
  2006-05-11 18:31 ` nico
  2006-05-11 18:35 ` Taco Hoekwater
@ 2006-05-11 18:48 ` Hans Hagen
  2006-05-11 19:54 ` Peter Münster
  3 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2006-05-11 18:48 UTC (permalink / raw)


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

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 17:12 Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO? Johannes Graumann
                   ` (2 preceding siblings ...)
  2006-05-11 18:48 ` Hans Hagen
@ 2006-05-11 19:54 ` Peter Münster
  2006-05-11 20:14   ` Hans Hagen
  2006-05-13 13:53   ` Peter Münster
  3 siblings, 2 replies; 9+ messages in thread
From: Peter Münster @ 2006-05-11 19:54 UTC (permalink / raw)


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/

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 19:54 ` Peter Münster
@ 2006-05-11 20:14   ` Hans Hagen
  2006-05-13 13:25     ` Peter Münster
  2006-05-13 13:53   ` Peter Münster
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2006-05-11 20:14 UTC (permalink / raw)


� 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
-----------------------------------------------------------------

_______________________________________________
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: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 20:14   ` Hans Hagen
@ 2006-05-13 13:25     ` Peter Münster
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Münster @ 2006-05-13 13:25 UTC (permalink / raw)


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
<tex.pro><texnansi-lm.enc><texps.pro>. <lmr10.pfb>[1] 
and the PostScript page is completely empty (blanc).

When running "dvips -u +original-base -u +ec-public-lm -u +ec-base -u
+8r-base -u +t5-base -u +original-ams-base -u +original-ams-euler -u
+original-public-lm -u +texnansi-base -u +texnansi-public-lm test" (same
command is used by texexec), the output of dvips is
This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com)
' TeX output 2006.05.13:1510' -> test.ps
<tex.pro><texps.pro>. [1] 
and the PostScript file has an ugly font and nothing for \textmu.

When running "dvips 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:1510' -> test.ps
<tex.pro><lm-texnansi.enc><texps.pro>. <lmr10.pfb>[1] 
and the PostScript file is ok.

So here my questions:
- Why does texexec use these options for dvips?
- Where can I tell texexec to use just "dvips" without options?
- Why is there a difference between running dvips by texexec or by command
  line, does texexec modify perhaps the environment?
- Why do I have this behaviour only with texnansi but not with ec encoding?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-11 19:54 ` Peter Münster
  2006-05-11 20:14   ` Hans Hagen
@ 2006-05-13 13:53   ` Peter Münster
  2006-05-14  8:18     ` Taco Hoekwater
  1 sibling, 1 reply; 9+ messages in thread
From: Peter Münster @ 2006-05-13 13:53 UTC (permalink / raw)


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/

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

* Re: Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO?
  2006-05-13 13:53   ` Peter Münster
@ 2006-05-14  8:18     ` Taco Hoekwater
  0 siblings, 0 replies; 9+ messages in thread
From: Taco Hoekwater @ 2006-05-14  8:18 UTC (permalink / raw)


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

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

end of thread, other threads:[~2006-05-14  8:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 17:12 Linux: ConTeXt in local texmf-tree and Ruby scripts - HOWTO? Johannes Graumann
2006-05-11 18:31 ` nico
2006-05-11 18:35 ` Taco Hoekwater
2006-05-11 18:48 ` Hans Hagen
2006-05-11 19:54 ` Peter Münster
2006-05-11 20:14   ` Hans Hagen
2006-05-13 13:25     ` Peter Münster
2006-05-13 13:53   ` Peter Münster
2006-05-14  8:18     ` Taco Hoekwater

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