ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: base/tex.rb comments
@ 2006-07-21 12:39 Richard Gabriel
  2006-07-21 12:49 ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Gabriel @ 2006-07-21 12:39 UTC (permalink / raw)



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

> I have the same observation. The TeXLive 2005 definition is
  >
> TEXFORMATS = .;$TEXMF/web2c/{$engine,}
  >
> but it seems to me tex binaries do not set $engine variable. If so, it 
> can be locally solved (without changing binaries and supposing not using 
> xetex or another engine) by
  >
>TEXFORMATS = .;$TEXMF/web2c//
  >
  > Vit

I'm sorry it doesn't work for me either. (have TL2005 on WinXP)
I still get the message "I can't find the TeX format 'cont-en'" unless I copy it into the 'web2c' directory.

I've noticed this in context.cnf:

TEXMFMAIN     = $SELFAUTOPARENT/texmf
TEXMFLOCAL    = $SELFAUTOPARENT/texmf-local
TEXMFFONTS    = $SELFAUTOPARENT/texmf-fonts
TEXMFEXTRA    = $SELFAUTOPARENT/texmf-extra
TEXMFPROJECT  = $SELFAUTOPARENT/texmf-project
VARTEXMF      = $SELFAUTOPARENT/texmf-var
TEXMF         = {!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFEXTRA,!!$TEXMFMAIN}

% --- cut ---

TEXFORMATS    = .;$TEXMF/web2c/{$engine,} 

It's strange that there isn't $VARTEXMF included in the TEXMF path. I've tried to add it:

TEXMF         = {!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFEXTRA,!!$TEXMFMAIN,!!$VARTEXMF}

but with no result... :-(

I'm attaching the complete context.cnf file for reference.

-Richard

  

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

[-- Attachment #2: context.zip --]
[-- Type: application/x-zip-compressed, Size: 2410 bytes --]

[-- Attachment #3: 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] 7+ messages in thread

* Re: base/tex.rb comments
  2006-07-21 12:39 base/tex.rb comments Richard Gabriel
@ 2006-07-21 12:49 ` Taco Hoekwater
  0 siblings, 0 replies; 7+ messages in thread
From: Taco Hoekwater @ 2006-07-21 12:49 UTC (permalink / raw)




Richard Gabriel wrote:
> 
> I'm attaching the complete context.cnf file for reference.

context.cnf is not actually used by any programs. It is only
provided as a sample of how texmf.cnf could be set up.

Greetings, Taco

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

* Re: base/tex.rb comments
@ 2006-07-21 13:34 Richard Gabriel
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Gabriel @ 2006-07-21 13:34 UTC (permalink / raw)



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

> well, we can use:
  > 
> def validsomething(str,something)
> if str then
> list = [str].flatten.collect do |s|
> something[s] || s # || s added

Excellent! Could you please add it to the distribution?

Many thanks!

-Richard

P.S. I'll probably have to learn at basics of Ruby... I'm familiar with Perl, PHP, shell scripts... but the Ruby code is totally cryptic for me! :-(((



  _____  

From: Hans Hagen [mailto:pragma@wxs.nl]
To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl]
Sent: Fri, 21 Jul 2006 13:12:23 +0200
Subject: Re: [NTG-context] base/tex.rb comments

Richard Gabriel wrote:
  > Hello Hans and others,
  >
  > I'd have two comments to the texmf/scripts/context/ruby/base/tex.rb 
  > script.
  >
  > 1. I find quite impractical that the formats (cont-en, cont-nl etc.) 
  > are hardcoded in the scripts. When one wants to add a new format, then 
  > he must add it on 4 or 5 places in the script, and do it again and 
  > again everytime when upgrading ConTeXt. :-(
  well, we can use:
  
      def validsomething(str,something)
          if str then
              list = [str].flatten.collect do |s|
                  something[s] || s # || s added
              end .compact.uniq
              if list.length>0 then
                  if str.class == String then list.first else list end
              else
                  false
              end
          else
              false
          end
      end
  
  and then you can say
  
  texexec --all --make --texformats=cont-xx
  
  given that you have cont-xx.tex
  
  >
  > 2. Maybe this is an OS and TeX distribution specific issue...
  > I use TeXLive 2005 on Windows XP.
  > The TeX formats are located in C:\TeXLive\texmf-var\web2c. [the 
  > "kpsewhich --show-path=fmt" command also shows this path].
  > When generating a format using "texmfstart texexec --make en", the 
  > generated format is placed into C:\TeXLive\texmf-var\web2c\pdfetex. 
  > Then, when trying to use the format, it is not found...
  >
  > This is done on line 547 of tex.rb:
  >
  > texformatpath = if getvariable('local') then '.' else 
  > Kpse.formatpath(texengine,true) end
  >
  > So I've changed it to "Kpse.formatpath(texengine,false)" and 
  > everything is fine.
  >
  > But I don't understand why it is set so by default and why it doesn't 
  > work for me.
  > Does anybody experience the same problem?
  we really need the engine path so i wonder why the format is not found; maybe an error in the cnf file (should recursively search the web2c path for formats) 
  
  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
    

[-- Attachment #1.2: Type: text/html, Size: 4023 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] 7+ messages in thread

* Re: base/tex.rb comments
@ 2006-07-21 13:20 Richard Gabriel
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Gabriel @ 2006-07-21 13:20 UTC (permalink / raw)



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

OH SO!

There was only

TEXFORMATS = .;$TEXMF/web2c 

in my texmf-var/web2c/texmf.cnf

I changed it into 

TEXFORMATS = .;$TEXMF/web2c/{$engine,}

(as suggested in context.cnf) and IT WORKS!


Many thanks for the hint, Taco!

-Richard



  _____  

From: Taco Hoekwater [mailto:taco@elvenkind.com]
To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl]
Sent: Fri, 21 Jul 2006 14:49:34 +0200
Subject: Re: [NTG-context] base/tex.rb comments


  
  Richard Gabriel wrote:
  > 
  > I'm attaching the complete context.cnf file for reference.
  
  context.cnf is not actually used by any programs. It is only
  provided as a sample of how texmf.cnf could be set up.
  
  Greetings, Taco
  _______________________________________________
  ntg-context mailing list
  ntg-context@ntg.nl
  http://www.ntg.nl/mailman/listinfo/ntg-context
    

[-- Attachment #1.2: Type: text/html, Size: 1495 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] 7+ messages in thread

* Re: base/tex.rb comments
  2006-07-21 11:12 ` Hans Hagen
@ 2006-07-21 12:05   ` Vit Zyka
  0 siblings, 0 replies; 7+ messages in thread
From: Vit Zyka @ 2006-07-21 12:05 UTC (permalink / raw)


Hans Hagen wrote:
> Richard Gabriel wrote:
>> Hello Hans and others,
>>
>> I'd have two comments to the texmf/scripts/context/ruby/base/tex.rb 
>> script.
>>
>> 1. I find quite impractical that the formats (cont-en, cont-nl etc.) 
>> are hardcoded in the scripts. When one wants to add a new format, then 
>> he must add it on 4 or 5 places in the script, and do it again and 
>> again everytime when upgrading ConTeXt. :-(
> well, we can use:
> 
>     def validsomething(str,something)
>         if str then
>             list = [str].flatten.collect do |s|
>                 something[s] || s # || s added
>             end .compact.uniq
>             if list.length>0 then
>                 if str.class == String then list.first else list end
>             else
>                 false
>             end
>         else
>             false
>         end
>     end
> 
> and then you can say
> 
> texexec --all --make --texformats=cont-xx
> 
> given that you have cont-xx.tex
> 
>> 2. Maybe this is an OS and TeX distribution specific issue...
>> I use TeXLive 2005 on Windows XP.
>> The TeX formats are located in C:\TeXLive\texmf-var\web2c. [the 
>> "kpsewhich --show-path=fmt" command also shows this path].
>> When generating a format using "texmfstart texexec --make en", the 
>> generated format is placed into C:\TeXLive\texmf-var\web2c\pdfetex. 
>> Then, when trying to use the format, it is not found...
>>
>> This is done on line 547 of tex.rb:
>>
>> texformatpath = if getvariable('local') then '.' else 
>> Kpse.formatpath(texengine,true) end
>>
>> So I've changed it to "Kpse.formatpath(texengine,false)" and 
>> everything is fine.
>>
>> But I don't understand why it is set so by default and why it doesn't 
>> work for me.
>> Does anybody experience the same problem?
> we really need the engine path so i wonder why the format
 > is not found; maybe an error in the cnf file (should recursively
 > search the web2c path for formats)

I have the same observation. The TeXLive 2005 definition is

   TEXFORMATS = .;$TEXMF/web2c/{$engine,}

but it seems to me tex binaries do not set $engine variable. If so, it 
can be locally solved (without changing binaries and supposing not using 
xetex or another engine) by

   TEXFORMATS = .;$TEXMF/web2c//

Vit

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

* Re: base/tex.rb comments
  2006-07-21  9:50 Richard Gabriel
@ 2006-07-21 11:12 ` Hans Hagen
  2006-07-21 12:05   ` Vit Zyka
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2006-07-21 11:12 UTC (permalink / raw)


Richard Gabriel wrote:
> Hello Hans and others,
>
> I'd have two comments to the texmf/scripts/context/ruby/base/tex.rb 
> script.
>
> 1. I find quite impractical that the formats (cont-en, cont-nl etc.) 
> are hardcoded in the scripts. When one wants to add a new format, then 
> he must add it on 4 or 5 places in the script, and do it again and 
> again everytime when upgrading ConTeXt. :-(
well, we can use:

    def validsomething(str,something)
        if str then
            list = [str].flatten.collect do |s|
                something[s] || s # || s added
            end .compact.uniq
            if list.length>0 then
                if str.class == String then list.first else list end
            else
                false
            end
        else
            false
        end
    end

and then you can say

texexec --all --make --texformats=cont-xx

given that you have cont-xx.tex

>
> 2. Maybe this is an OS and TeX distribution specific issue...
> I use TeXLive 2005 on Windows XP.
> The TeX formats are located in C:\TeXLive\texmf-var\web2c. [the 
> "kpsewhich --show-path=fmt" command also shows this path].
> When generating a format using "texmfstart texexec --make en", the 
> generated format is placed into C:\TeXLive\texmf-var\web2c\pdfetex. 
> Then, when trying to use the format, it is not found...
>
> This is done on line 547 of tex.rb:
>
> texformatpath = if getvariable('local') then '.' else 
> Kpse.formatpath(texengine,true) end
>
> So I've changed it to "Kpse.formatpath(texengine,false)" and 
> everything is fine.
>
> But I don't understand why it is set so by default and why it doesn't 
> work for me.
> Does anybody experience the same problem?
we really need the engine path so i wonder why the format is not found; maybe an error in the cnf file (should recursively search the web2c path for formats) 

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

* base/tex.rb comments
@ 2006-07-21  9:50 Richard Gabriel
  2006-07-21 11:12 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Gabriel @ 2006-07-21  9:50 UTC (permalink / raw)



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

Hello Hans and others,

I'd have two comments to the texmf/scripts/context/ruby/base/tex.rb script.

1. I find quite impractical that the formats (cont-en, cont-nl etc.) are hardcoded in the scripts. When one wants to add a new format, then he must add it on 4 or 5 places in the script, and do it again and again everytime when upgrading ConTeXt. :-(

2. Maybe this is an OS and TeX distribution specific issue...
I use TeXLive 2005 on Windows XP.
The TeX formats are located in C:\TeXLive\texmf-var\web2c. [the "kpsewhich --show-path=fmt" command also shows this path].
When generating a format using "texmfstart texexec --make en", the generated format is placed into C:\TeXLive\texmf-var\web2c\pdfetex. Then, when trying to use the format, it is not found...

This is done on line 547 of tex.rb:

texformatpath = if getvariable('local') then '.' else Kpse.formatpath(texengine,true) end

So I've changed it to "Kpse.formatpath(texengine,false)" and everything is fine.

But I don't understand why it is set so by default and why it doesn't work for me. 
Does anybody experience the same problem?

-Richard

[-- Attachment #1.2: Type: text/html, Size: 1431 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] 7+ messages in thread

end of thread, other threads:[~2006-07-21 13:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-21 12:39 base/tex.rb comments Richard Gabriel
2006-07-21 12:49 ` Taco Hoekwater
  -- strict thread matches above, loose matches on Subject: below --
2006-07-21 13:34 Richard Gabriel
2006-07-21 13:20 Richard Gabriel
2006-07-21  9:50 Richard Gabriel
2006-07-21 11:12 ` Hans Hagen
2006-07-21 12:05   ` Vit Zyka

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