ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* updating ConTeXt with ctxtools
@ 2006-08-06 13:16 Alan Bowen
  2006-08-06 13:39 ` Sanjoy Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Bowen @ 2006-08-06 13:16 UTC (permalink / raw)


Gerben’s iInstaller does not seem to be picking up new versions any  
more, so I tried
     texmfstart ctxtools --update
What I got in response was
    kpsewhich: option `--expand-var' requires an argument
    CtxTools | updating
    CtxTools | unable to change to
and a return to the prompt.

I checked the man page for ctxtools, but the --updatecontext option  
does not seem to include any further options. So what am I missing?

I am running
CtxTools | version 1.3.3 - 2004/2006 - PRAGMA ADE/POD
context version: 2006.07.22 18:35

Best, Alan

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

* Re: updating ConTeXt with ctxtools
  2006-08-06 13:16 updating ConTeXt with ctxtools Alan Bowen
@ 2006-08-06 13:39 ` Sanjoy Mahajan
  2006-08-08 20:19   ` Alan Bowen
  0 siblings, 1 reply; 6+ messages in thread
From: Sanjoy Mahajan @ 2006-08-06 13:39 UTC (permalink / raw)


>    kpsewhich: option `--expand-var' requires an argument

See the Ubuntu installation thread a couple weeks ago (search for
TEXMFLOCAL and Ubuntu).  The problem is that TEXMFLOCAL isn't being
evaluated properly due to quoting differences between Unix and Windows
syntax (with ctxtools using the Windows syntax at the moment).

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

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

* Re: updating ConTeXt with ctxtools
  2006-08-06 13:39 ` Sanjoy Mahajan
@ 2006-08-08 20:19   ` Alan Bowen
  2006-08-08 20:52     ` Sanjoy Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Bowen @ 2006-08-08 20:19 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1267 bytes --]

Sanjoy—thanks for pointing me to the thread. I must have missed it  
the first time around.

I inserted Hans’
f.write("#{program} #{callname} \"$@\"\012")
in my texmfstart, changing the original  012 to 015 as Taco suggested  
for the Mac. But now I get
	syntax error near unexpected token `"#{program} #{callname} \"$@\"\015"
whenever I run texmfstart. (The same, if I restore 012 as well.) I am  
running Mac OS X 10.4.7.

In any case, I have probably misunderstood the thread. Has a summary  
been posted somewhere that I might consult?

Alan

On Aug 6, 2006, at 9:39 AM, Sanjoy Mahajan wrote:

>>    kpsewhich: option `--expand-var' requires an argument
>
> See the Ubuntu installation thread a couple weeks ago (search for
> TEXMFLOCAL and Ubuntu).  The problem is that TEXMFLOCAL isn't being
> evaluated properly due to quoting differences between Unix and Windows
> syntax (with ctxtools using the Windows syntax at the moment).
>
> -Sanjoy
>
> `Never underestimate the evil of which men of power are capable.'
>          --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context


[-- Attachment #1.2: Type: text/html, Size: 3480 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: updating ConTeXt with ctxtools
  2006-08-08 20:19   ` Alan Bowen
@ 2006-08-08 20:52     ` Sanjoy Mahajan
  2006-08-08 21:14       ` Hans Hagen
  2006-08-09 17:36       ` Alan Bowen
  0 siblings, 2 replies; 6+ messages in thread
From: Sanjoy Mahajan @ 2006-08-08 20:52 UTC (permalink / raw)


> In any case, I have probably misunderstood the thread. Has a summary
> been posted somewhere that I might consult?

I need to summarize all the Linux installation methods on the Wiki,
once I get it all straight in my head.  Right now in reality and in my
head it's a nightmare because of all the flavors (texlive, tetex 2 or
3, etc.) and the gazillion map files that could be anywhere.  ConTeXt
tries to work everywhere so it has a hard life.

I don't know much about what MacOS X does, but if you're not using a
graphical installation method, it should be like BSD 4.[0123] Unix
that I once used.  In which case it should work mostly like Linux.

Here's what I do now and did just half hour ago to update to the
2006.08.08 version.  I use bash (a mostly sh-compatiable shell), which
the MacOS terminal runs too I think.  The $ below is my bash prompt
and everything after it is what I type:

  $ TEXMFLOCAL=/home/sanjoy/texmf texmfstart ctxtools --updatecontext

This fixes the problem that ctxtools uses (I think) Windows quoting in
this source line:

            tree = `kpsewhich --expand-path $TEXMFLOCAL`.chomp rescue nil

In Unix ruby (like in Perl) the $TEXMFLOCAL is expanded by the shell
because of the $, and the result is run by the backticks.  Usually
TEXMFLOCAL has no setting in the shell or environment so ruby runs the
command with $TEXMFLOCAL replaced by an empty string, giving:

   kpsewhich --expand-path 

So kpsewhich complains that it didn't get an argument for
--expand-path (or --expand-var).  The long-term fix is to figure out
how to quote that works in Windows and Unix, but I don't know how
since I don't use Windows.

The short-term hack is to set TEXMFLOCAL just while running ctxtools,
which is done by the command above that I run.

So maybe try that using the vanilla distribution (so with \012
restored) and report back what happens and let's see if we can find a
fix if something else doesn't work.  My computers run Linux but my
partner has a MacOS 10.3 machine and I'll use it for ConTeXt
experiments if needed.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

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

* Re: updating ConTeXt with ctxtools
  2006-08-08 20:52     ` Sanjoy Mahajan
@ 2006-08-08 21:14       ` Hans Hagen
  2006-08-09 17:36       ` Alan Bowen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2006-08-08 21:14 UTC (permalink / raw)


Sanjoy Mahajan wrote:
>> In any case, I have probably misunderstood the thread. Has a summary
>> been posted somewhere that I might consult?
>>     
>
> I need to summarize all the Linux installation methods on the Wiki,
> once I get it all straight in my head.  Right now in reality and in my
> head it's a nightmare because of all the flavors (texlive, tetex 2 or
> 3, etc.) and the gazillion map files that could be anywhere.  ConTeXt
> tries to work everywhere so it has a hard life.
>
> I don't know much about what MacOS X does, but if you're not using a
> graphical installation method, it should be like BSD 4.[0123] Unix
> that I once used.  In which case it should work mostly like Linux.
>
> Here's what I do now and did just half hour ago to update to the
> 2006.08.08 version.  I use bash (a mostly sh-compatiable shell), which
> the MacOS terminal runs too I think.  The $ below is my bash prompt
> and everything after it is what I type:
>
>   $ TEXMFLOCAL=/home/sanjoy/texmf texmfstart ctxtools --updatecontext
>
> This fixes the problem that ctxtools uses (I think) Windows quoting in
> this source line:
>
>             tree = `kpsewhich --expand-path $TEXMFLOCAL`.chomp rescue nil
>
> In Unix ruby (like in Perl) the $TEXMFLOCAL is expanded by the shell
> because of the $, and the result is run by the backticks.  Usually
> TEXMFLOCAL has no setting in the shell or environment so ruby runs the
> command with $TEXMFLOCAL replaced by an empty string, giving:
>
>    kpsewhich --expand-path 
>
> So kpsewhich complains that it didn't get an argument for
> --expand-path (or --expand-var).  The long-term fix is to figure out
> how to quote that works in Windows and Unix, but I don't know how
> since I don't use Windows.
>
> The short-term hack is to set TEXMFLOCAL just while running ctxtools,
> which is done by the command above that I run.
>
> So maybe try that using the vanilla distribution (so with \012
> restored) and report back what happens and let's see if we can find a
> fix if something else doesn't work.  My computers run Linux but my
> partner has a MacOS 10.3 machine and I'll use it for ConTeXt
> experiments if needed.
>   

does this one work ok?

(the stupid thing is that kpsewhich is not made for user friendlyness, 
e.g.\ a natural solution would be to support

kpsewhich --expand-path TEXMFLOCAL

i.e. it expects an internal var so why not be clever and put the $ in 
front of it internally; there are more places in kpsewhich where robust 
cross-platformness can be provided but it has a low priority i guess


        def locatedlocaltree
            if System.unix? then
                tree = `kpsewhich --expand-path '$TEXMFLOCAL'`.chomp 
rescue nil
                unless tree && FileTest.directory?(tree) then
                    tree = `kpsewhich --expand-path '$TEXMF'`.chomp 
rescue nil
                end
            else
                tree = `kpsewhich --expand-path $TEXMFLOCAL`.chomp 
rescue nil
                unless tree && FileTest.directory?(tree) then
                    tree = `kpsewhich --expand-path $TEXMF`.chomp rescue nil
                end
            end
            return tree
        end


-- 

-----------------------------------------------------------------
                                          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] 6+ messages in thread

* Re: updating ConTeXt with ctxtools
  2006-08-08 20:52     ` Sanjoy Mahajan
  2006-08-08 21:14       ` Hans Hagen
@ 2006-08-09 17:36       ` Alan Bowen
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Bowen @ 2006-08-09 17:36 UTC (permalink / raw)


On Aug 8, 2006, at 4:52 PM, Sanjoy Mahajan wrote:

>> In any case, I have probably misunderstood the thread. Has a summary
>> been posted somewhere that I might consult?
>
> I need to summarize all the Linux installation methods on the Wiki,
> once I get it all straight in my head.  Right now in reality and in my
> head it's a nightmare because of all the flavors (texlive, tetex 2 or
> 3, etc.) and the gazillion map files that could be anywhere.  ConTeXt
> tries to work everywhere so it has a hard life.
>
> I don't know much about what MacOS X does, but if you're not using a
> graphical installation method, it should be like BSD 4.[0123] Unix
> that I once used.  In which case it should work mostly like Linux.
>
> Here's what I do now and did just half hour ago to update to the
> 2006.08.08 version.  I use bash (a mostly sh-compatiable shell), which
> the MacOS terminal runs too I think.  The $ below is my bash prompt
> and everything after it is what I type:
>
>   $ TEXMFLOCAL=/home/sanjoy/texmf texmfstart ctxtools --updatecontext
>
> This fixes the problem that ctxtools uses (I think) Windows quoting in
> this source line:
>
>             tree = `kpsewhich --expand-path $TEXMFLOCAL`.chomp  
> rescue nil
>
> In Unix ruby (like in Perl) the $TEXMFLOCAL is expanded by the shell
> because of the $, and the result is run by the backticks.  Usually
> TEXMFLOCAL has no setting in the shell or environment so ruby runs the
> command with $TEXMFLOCAL replaced by an empty string, giving:
>
>    kpsewhich --expand-path
>
> So kpsewhich complains that it didn't get an argument for
> --expand-path (or --expand-var).  The long-term fix is to figure out
> how to quote that works in Windows and Unix, but I don't know how
> since I don't use Windows.
>
> The short-term hack is to set TEXMFLOCAL just while running ctxtools,
> which is done by the command above that I run.
>
> So maybe try that using the vanilla distribution (so with \012
> restored) and report back what happens and let's see if we can find a
> fix if something else doesn't work.  My computers run Linux but my
> partner has a MacOS 10.3 machine and I'll use it for ConTeXt
> experiments if needed.
>
> -Sanjoy

Sanjoy—

Since I use the teTeX distribution on my Mac, I ran
TEXMFLOCAL=/usr/local/teTeX/share/texmf.local sudo texmfstart  
ctxtools --updatecontext
in Terminal (bash) and the update went perfectly.

Many thanks!

Alan

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

end of thread, other threads:[~2006-08-09 17:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-06 13:16 updating ConTeXt with ctxtools Alan Bowen
2006-08-06 13:39 ` Sanjoy Mahajan
2006-08-08 20:19   ` Alan Bowen
2006-08-08 20:52     ` Sanjoy Mahajan
2006-08-08 21:14       ` Hans Hagen
2006-08-09 17:36       ` Alan Bowen

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