ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* using environments with project structure (in MkIV)
@ 2014-02-28 15:03 Sanjoy Mahajan
  0 siblings, 0 replies; only message in thread
From: Sanjoy Mahajan @ 2014-02-28 15:03 UTC (permalink / raw)
  To: ntg-context

I'm having trouble using project structure and font loading together in
MkIV.  Here's how the problem arises.

As Aditya and Wolfgang have pointed out, the recommended way to set up
fonts in MkIV is before \starttext or \startcomponent.  For a component,
the setups usually go in an environment file that is referenced by the
project file, and the project file is mentioned with a \project, e.g.

\startcomponent test
\project testproject
\input knuth
\stopcomponent

However, the \project line has to come *after* \startcomponent.  If it
comes before \startcomponent, then context doesn't process the component
file at all, and no PDF file is generated.  An example:

\project testproject
\startcomponent test
\input knuth
\stopcomponent

(with testproject.tex containing \startproject blah \stopproject)

A workaround is to replace the \project line with \environment env where
env is what testproject would have included anyway.  e.g.

\environment env
\startcomponent test
\input knuth
\stopcomponent

Here, env.tex has all the setups including the font setups (and one
would do the same in the product file, i.e. in the file that includes
the components, by putting "\environment env" before the \startproduct).

The first problem is that it seems some of the functionality of
products, projects, and components is lost.  But maybe that's a matter
of taste.

Another problem is that env.tex doesn't know that one is compiling a
product or component---thus, the system modes *product and *component
are not defined while reading env.tex.

Is there another way of doing project structure that I am missing?

My update to the wiki page on project structure (on putting \project
before \startcomponent) seems to be wrong, and I'll fix it once I
understand what to do!

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-28 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28 15:03 using environments with project structure (in MkIV) 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).