ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* finding project files in parent dirs automatically
@ 2006-04-08 16:31 Sanjoy Mahajan
  2006-04-08 16:54 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Sanjoy Mahajan @ 2006-04-08 16:31 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2852 bytes --]

I'm learning how to use projects/products/components, and have got
reasonably far.  However, I'm confused about far upwards context
searches for the configuration files (product/project/environment
files).

Here's a directory structure that worked fine:

double/chap/1/c_ch1.tex
double/prd_oom.tex
double/project_books.tex
double/env_books.tex

It's called 'double' to signify that the components are two levels below
the main project file.  I cd to double/chap/1/ and then 'texexec c_ch1',
and c_ch1.log tells me:

  systems         : begin file c_ch1 at line 1
  systems         : begin file project_books at line 3
  (../../project_books.tex
  systems         : begin file env_books at line 3
  (../../env_books.tex)
  systems         : end file env_books at line 3
  )
  systems         : end file project_books at line 3

So the project and environment files got read in.  By the way, why isn't
the product file loaded?  Is it not needed when making just one
component?  But it could modify the environment.

Leaving that question aside, here is the chap/1/c_ch1.tex file (all the
.tex files and the log files are in the small attached .tgz archive):

  \startcomponent c_ch1
  \product prd_oom
  \project project_books
  \title{chapter 1}
  \input tufte
  \par
  \stopcomponent

The prd_oom.tex:

  \startproduct prd_oom
  \project project_books
  \component chap/1/c_ch1
  \stopproduct

And project_books.tex:

  % output=pdf interface=en
  \startproject project_books
  \environment env_books
  \product prd_oom
  \stopproject

So the "\project project_books" in c_ch1.tex is sufficient for context
to find ../../project_books.tex

But I really want each product to live in its own directory.  In this
minimal example, the only product is 'oom', for "Order of Magnitude
physics".  So I tried this directory structure:

triple/oom/chap/1/c_ch1.tex
triple/oom/chap/1/c_ch1.log
triple/oom/prd_oom.tex
triple/project_books.tex
triple/env_books.tex

Now the project_books.tex file is three levels up from the component,
and project_books.tex has "\product oom/prd_oom" instead of "\product
prd_oom".  Now project_books.tex isn't found when compiling c_ch1.tex.
>From c_ch1.log:

systems         : begin file project_books at line 3
systems         : end file project_books at line 3

Is there a hardcoded limit on how far up context searches?

$ texexec --version

 TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

               texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
               texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
                   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
               context : ver: 2006.03.25 13:21
               cont-en : ver: 2006.03.25 13:21  fmt: 2006.4.6  mes: english

-Sanjoy

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


[-- Attachment #2: minimal tex and log files --]
[-- Type: application/x-gtar, Size: 1770 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

end of thread, other threads:[~2006-04-10  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-08 16:31 finding project files in parent dirs automatically Sanjoy Mahajan
2006-04-08 16:54 ` Taco Hoekwater
2006-04-08 18:29   ` Sanjoy Mahajan
2006-04-09 18:00     ` Hans Hagen
2006-04-10  3:42   ` Sanjoy Mahajan

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