[tex-k] -format/-progname

Reinhard Kotucha reinhard.kotucha at web.de
Wed Oct 29 03:32:08 CET 2003


>>>>> "Hans" == Hans Hagen <pragma at wxs.nl> writes:

    > I fully agree with you that -progname directive is indeed fuzzy
    > esp in combination with "other text files" (btw, just 'other'
    > would be more comfortable, esp since supporting "quoting" is
    > painful in cross platform apps).

    > Maybe we need categories: 'programs and scripts'
    > (pl,rb,py,java,exe,cmd,sh), documentation (pdf,ps,dvi,htm,html),
    > fonts (pl,...)

As Akira Kakuto has confirmed my assumption that -progname just causes
kpsewhich to search in $TEXMFS/<progname> I'd say that the
documentation is not clear.

   kpsewhich -format='other text files' -progname=fonts readme.txt

finds a readme.txt in $TEXMFS/fonts.

So there is no need for a table lookup.

A new category 'programs and scripts' is not necessary, IMHO.  There
is only one directory where executable files are expected while all
other files must be painfully searched in several texmf trees.

Executables can be found using the -expand-var option, though it might
be more convenient if one could say

   kpsewhich -format=executable texexec

As far as the -format option is concerned, I'm still not sure what it
does.  Assuming that it does what I suppose, then it is probably a
good idea to behave like this:

  If there is no format option, then retrieve the extension from the
  filename and search for files with that extension.  

  If you look for a pk file, then kpsewhich needs some internal magic
  because there are no .pk files at all.  In this case you could say
  -format=pk to search for files with the extension ".*pk" such as
  cmr10.300pk. 
  
  It is probably better not to compile those exceptions into kpsewhich
  but instead put the rules into texmf.cnf.

  For instance 

      kpsewhich.format.doc=.pdf,.ps,.dvi,.htm,.html
      kpsewhich.format.pk =.*pk

  should make -format=doc to search for files .pdf,.ps,.dvi,.htm,.html

I dislike table lookups, especially if the tables are compiled into
programs.  It would be much nicer if a program would use an algorithm
to do it's job rather than look into a table.  If there is a need for
a table lookup, the table shouldn't be compiled into the program.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			             Phone: +49-511-27060390
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------




More information about the tex-k mailing list