[tex-k] Re: format files

Olaf Weber olaf@infovore.xs4all.nl
25 Oct 2002 21:26:47 +0200


Reinhard Kotucha writes:

>>>>>> "Thomas" == Thomas Esser <te@dbs.uni-hannover.de> writes:
>>> Another problem is that "tex \&latex myfile" doesn't work
>>> properly.

>> What exactly is the problem? I just have successfully tried $
>> tex \&latex small2e This is TeX, Version 3.14159 (Web2C 7.3.9)
>> (/usr/share/texmf/tex/latex/base/small2e.tex LaTeX2e
>> <2001/06/01> ...  Transcript written on small2e.log

> The problem is that the plain TeX search path is used rather the LaTeX
> one.  No problem with small2e, but generally you must say
> --progname=latex to get the desired result.  And I think that this is
> tex-k specific.

I'm not sure to what extent this is really tex-k specific.  However, I
do have an idea of what to change so that TeX will "adapt" its search
paths to the name of the format it is trying to load, pretty much
regardless of how this was specified.

This, plus some infrstructure changes to get this to compile.

Thomas, WDYT?

Index: tex.ch
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/web2c/tex.ch,v
retrieving revision 1.50
diff -u -r1.50 tex.ch
--- tex.ch      20 Oct 2002 17:20:16 -0000      1.50
+++ tex.ch      25 Oct 2002 19:18:55 -0000
@@ -1683,10 +1683,14 @@
 
 @x [29.523] l.10095 - Change to pack_buffered_name as with pack_file_name.
 for j:=1 to n do append_to_name(xord[TEX_format_default[j]]);
+for j:=a to b do append_to_name(buffer[j]);
 @y
 if name_of_file then libc_free (name_of_file);
 name_of_file := xmalloc_array (ASCII_code, n+(b-a+1)+format_ext_length+1);
 for j:=1 to n do append_to_name(xord[TEX_format_default[j]]);
+for j:=a to b do append_to_name(buffer[j]);
+name_of_file[k+1]:=0;
+kpse_reset_program_name(name_of_file+1);{set search path to match format}
 @z
 
 @x [29.523] l.10100 - Change to pack_buffered_name as with pack_file_name.


-- 
Olaf Weber

               (This space left blank for technical reasons.)