[NTG-context] texexec from parent directory

Aditya Mahajan adityam at umich.edu
Sun Sep 3 06:46:23 CEST 2006

On Sat, 2 Sep 2006, Aditya Mahajan wrote:

> On Fri, 1 Sep 2006, Aditya Mahajan wrote:
>> Hi,
>>  I have the following project structure
>> base/
>>   |
>>   +--project.tex
>>   |
>>   +--product.tex
>>   |
>>   +--environment.tex
>>   +
>>  subdir/
>>     |
>>     +---component.tex
>> If I in subdir and texexec component it compiles fine. If I am in base
>> and texexec subdir/component it works fine. However, if I am in the
>> parent directory of base and
>> texexec base/subdir/component
>> it does not work as the environment file is not found. It seems that
>> the search for files is taking place relative to the directory from
>> where texexec is invoked, rather than relative to the directory where
>> the file resides. Is there some way I can make the component file
>> compile from the parent directory of base?
> Looking into tex.rb, shouldn't --autopath take care of this? (It does
> not).
> I also tried
> texexec --environments=environment.tex base/subdir/component.tex
> and I get

Sorry for the noise. --environment works. I was getting the error 
because of a typo in the environment file. Strange that I did not get 
the error while compiling the component file. See the end for the 

However the pdf is created in the directory from which texexec was 
called. Hans, whenever you work on tex.rb next, can you implement a 
switch that will "cd directory" and then run everything.

Here is a description of the error. Consider the attached directory 
structure of files. environment.tex has a typo. It starts with


but ends with


If I 'texexec component' it runs fine.

If I 'texexec --environment=environment component' I get

! You can't use `\relax' after \the.
<recently read> \@sl@\currentcomponentpath

Can the error message be made easier to understand? Can I get an
error or warning when I just 'texexec component'?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/zip
Size: 835 bytes
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20060903/5c0f00a9/attachment.zip 

More information about the ntg-context mailing list