1

I am setting up a project structure for a new journal and I want to use a structure like the one in this answer. However, instead of using document:start I tried \startsetups component:start, but no results.

My structure looks like this:

  • test.tex
\startproject *
\environment test_env

\product test_prod

\stopproject
  • test_env.tex
\startenvironment *

\setuphead
    [section]
    [textstyle=\em]

\startsetups component:start
  \startalignment[middle]
    {\bfa\setupinterlinespace 
    This should appear somewhere!
     \endgraf}
    \blank[big]
   \stopalignment
\stopsetups

\stopenvironment
  • test_prod.tex
\startproduct *
\project test

\component test_comp

\stopproduct
  • test_comp.tex
\startcomponent *
\product test_prod
%\project test

\section{Test}

Blabla


\stopcomponent
  • 2
    That's because there is no component:start. You could add \directsetup{component:start} before every \startcomponent or more programatically \prependvalue{startcomponent}{\directsetup{component:start}} (and likewise \appendvalue{stopcomponent}{\directsetup{component:stop}}). – Henri Menke May 6 at 23:25
  • Where can I learn about these things? It's not really clear to me why the mechanism works with \startdocument but not with \startcomponent. For me this looks similar enough. – Denis May 7 at 8:09
  • 1
    I just grepped the ConTeXt source tree for component:start and nothing came up. Then I also looked at the definition of \startcomponent to find that there also isn't any other setup code called before. – Henri Menke May 8 at 3:11
  • Should I post my comments as an answer? – Henri Menke May 13 at 3:45
  • Yes, please. ... – Denis May 13 at 7:36
3

There is not component:start. The idea is that you only set metadata for the whole document once when you place \startdocument. If you still want to insert your setups before \startcomponent you can write

\directsetup{component:start}
\startcomponent

or more programmatically

\prependvalue{startcomponent}{\directsetup{component:start}}

Of course this has to be placed before the first \startcomponent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.