ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* project files searched for using TEXINPUTS
@ 2006-05-14 18:47 Sanjoy Mahajan
  2006-05-15  8:26 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Sanjoy Mahajan @ 2006-05-14 18:47 UTC (permalink / raw)


In experimenting with projects, products, and components, I was tracing
file searches (using Linux, teTeX 3.0 and kpathsea).

>From the cont-eni.pdf manual (p. 26 of the PDF file), explaining more
about components and project structure:

> Many TEX implementations look for a file in all directories and
> subdirectories when a requested file is not in the current
> directory. This is not only time--consuming but may lead to errors when
> the wrong file (a file with the same name) is loaded.

> For this reason ConTEXt works somewhat differently. A file that is not
> available on the working directory is searched for on the parent
> directories.

I agree with this reasoning.  But as implemented, if the current and
parent directories fail, ConTeXT will look in the TEXINPUTS search path.
Is that the intended behavior when looking for project files?  Probably
not ideal for the project file, though maybe it is useful for the
resulting environment file?

For finding figures, the behavior is clear: look in the local (.) and
then the global directories, and that's it.

For finding files specified by \input, the behavior is also clear (use
TEXINPUTS).

So I wondered whether the intention for finding project files was also
equally clear: look in . and in (grand)parent directories (I've
increased the number of levels to three).

Here's the test.tex file I used:

\startcomponent blah
\product null
\project abcd
\stopcomponent

$ texexec -passon="-kpathsea-debug 32" --once test >& log
$ grep abcd log | grep kpse_find
kdebug:kpse_find_file: searching for ./abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ../abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ../../abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ../../../abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ./abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ../abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ../../abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for ../../../abcd of type tex (from TEXINPUTS environment variable)
kdebug:kpse_find_file: searching for abcd of type tex (from TEXINPUTS environment variable)

The last search, for 'abcd', runs through the entire TEXINPUTS path.
The other searches have directories specified, so they will look only in
those directories.

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal

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

end of thread, other threads:[~2006-05-17  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-14 18:47 project files searched for using TEXINPUTS Sanjoy Mahajan
2006-05-15  8:26 ` Hans Hagen
2006-05-16 22:22   ` Sanjoy Mahajan
2006-05-17  8:10     ` Hans Hagen

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