Hi,

Maybe someone can help me out, either by sharing some wisdom or pointing me
to the specific doc that explains this...

I am working on a ConTeXt project which has the following directory/file
structure:

├── 00_FrontMatter
│   ├── a01_TitlePage.tex
│   └── a02_Preface.tex
├── 01_BodyMatter
│   ├── b01_Introduction.tex
│   ├── ...
│   ├── b13_Floats.tex
├── 02_Appendices
│   ├── Installation.tex
│   ├── Macros.tex
│   └── Symbols.tex
├── introCTX.tex
└── introCTX_env.tex

To compile the whole thing, I would use
        context introCTX.tex
in the top-level directory.

The introCTX_env.tex file contains what ConTeXt calls the "environment"
(which might be what LaTeX people would call the "preamble", but I'm not
sure about that).

All of the chapter files \input the introCTX_env.tex file (in ConTeXt
second and subsequent inclusions of environment files have no effect).

The .tex files in the sub-directories all have

%%% Local Variables:
%%% mode: ConTeXt
%%% TeX-master: "../introCTX.tex"
%%% coding: utf-8-unix
%%% End:

With this setup, while editing (e.g.,) b13_Floats.tex, if I C-c C-c, it
runs context on introCTX.tex, compiling the whole book.  This takes a bit
longer than I would like.  So I would like to compile either a region or
the single chapter I am working on at the time.

If I try to compile a region, it creates the _region_.tex file in the
top-level directory, at which point "../introCTX.tex" is wrong because it
runs context while cd'ed to the top-level directory and doesn't find that
file in the dir above the top-level directory.

If I set TeX-master to t, I can compile the chapter by itself.

Finally my question: aside from changing TeX-master, is there A Right Way
to do this?

Thanks.
                                Jim

Reply via email to