On Thu, Jun 23, 2011 at 11:30:39PM +0200, Jean-Marc Lasgouttes wrote: > Le 23/06/11 21:53, Enrico Forestieri a écrit : > >>Question: can we get rid (at least in trunk) of \input@path handling now? > > > >I really don't know. Consider that the TEXINPUTS prefix is by default > >set to ".", i.e., the document directory, but it can be removed by the > >user. If that happens and \input@path is not defined, suddenly some old > >documents may fail to compile. > > I would have a default texinput_prefix that is empty, and add . and > docdir to TEXINPUTS (in what order?) if they are not there already.
As the current directory takes precedence when TEXINPUTS is not defined, I would say first . (the place where the .tex file is located) and then docdir. > >Of course, we may enforce things such that to be sure that the document > >directory is always added to TEXINPUTS, but I'm not sure that is the > >right thing to do. > > Why? What is important IMO is not to enforce the ordering. Suppose that I have a .sty file in docdir (maybe because I want to overwrite another copy) but would like to try the version in the tex tree (maybe to check whether the bug that I was trying to overcome was fixed). I could do that by escluding docdir from the search path, but LyX adds it behind the scenes, frustrating my effort. Now, this example may seem convoluted, but I hate when a software pretends to be smarter than me and silently enforces his decisions. However, to be honest, even this case could be dealt with by simply adding the default search path before docdir (if docdir is not already present). The point is that things start becoming complicated and the more complicated they are the more easily they break. > IMO, input@path is a hack that does not work in all cases. So as a > fallback solution, it is bad. And it does force to add docdir at the > front of texinputs. That is true and also invalidates my previous example, so maybe it is better to simply get rid of \input@path and educate people to include the docdir in the TEXINPUTS prefix if suddenly a file is not found anymore. -- Enrico