[NTG-context] base/tex.rb comments

Hans Hagen pragma at wxs.nl
Fri Jul 21 13:12:23 CEST 2006

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

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

More information about the ntg-context mailing list