> -----Ursprüngliche Nachricht-----
> Von: Aditya Mahajan <adit...@umich.edu>
> Gesendet: Dienstag, 18. Februar 2025 04:23
> An: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Betreff: [NTG-context] Re: Are paths resolved relative to file location or
calling
> location?
> 
> On Mon, 17 Feb 2025, denis.ma...@unibe.ch wrote:
> 
> > Hi,
> > I have a (simplified) project structure like this:
> >
> > root-folder
> >   /asset
> >     /tex
> >   /results
> >   /source
> >
> > My tex file is stored under assets, the source is an xml file under
source, the
> pdf should be saved under results.
> >
> > If I call context from within the assets folder, the pdf is created as
expected,
> but if I call context from the results folder, I get an error message
saying that
> the xml file is not found. As the file is created properly when I call
context from
> the assets folder, I assume context performs lookups based on the calling
> location (not the file location). Is that correct? Is there a simple way
to call
> context from the results folder and still have the sources found, or do I
have to
> call context from the assets folder and copy/move the result afterwards?
> 
> (Untested): Context also searches for a file in the parent folder and
grand-
> parent folder. So, something like
> 
> \input assets/file.tex
> 
> or
> 
> \processxmlfile{source/file.xml}
> 
> should work when called from the results folder.

I'll need to check if that still applies, but IIRC, context searches parent
folders for environments, but not when using \input. Don't know about
processxmlfile though.

Best,
Denis

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to