Am 01.02.2011 um 13:33 schrieb Andreas Harder:

> Am 01.02.2011 um 12:11 schrieb Wolfgang Schuster:
> 
>> Am 01.02.2011 um 11:43 schrieb Andreas Harder:
>> 
>>> Hi,
>>> 
>>> it seems there go something wrong with layers.
>> 
>> With the last beta context postpones font loading till \starttext.
>> 
>> As there is no font loaded the layer content is not visible,
>> move \starttext at the begin of the file and you can see the
>> layer text.
> 
> Thanks Wolfgang, I forgot about that.

Even though it’s not so obvious because other commands like \setupheadertexts
don’t have this problem, for all the curious people here is a small example
where you can see the problem in another context.

\starttext
\tt\setbox0=\hbox{boxed text}\ss unboxed text \box0
\stoptext

You would now expect both texts are printed sans serif but the first
was saved in a box and use not the font which was active when you
stored it in the box, the same happens with \setlayer because
the commands stores the content too in a \hbox and since there was
no font available when you put it in the box nothing is shown.

Besides moving \setlayer after \starttext you can just load a font
before the \setlayer settings, e.g.

\setupbodyfont[modern]
\definelayer[…]
\setlayer[…]{…}
\starttext
…
\stoptext

or you use \startproduct which is normally always written as first line
and acts \starttext which preloads then the Latin Modern fonts, e.g.

\startproduct

\definelayer[…]
\setlayer[…]{…}

\startbodymatter
…
\stopbodymatter

\stopproduct

The bodymatter enviroment isn’t necessary here because it’s always enabled
when you other sectionblockenvironment is used but it’s useful to have
something which separates the preamble from the text.

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to