Procházka Lukáš Ing. - Pontex s. r. o.
23. Juni 2015 09:45
Hello,

I'm really satisfied with the way you coded the part page layout.

I've modified a bit your code - just to highlight the dependencies (rendering setup, makeup and so on; if anyone interested, see the attachment).
You can drop the \definebodyfontenvironment line when you use \definefont to set the part fonts, e.g.

\definefont[PartText][SerifBold sa 5]
\setuphead[part][textstyle=PartText]

On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

This method to set your own layout is also used by other command (e.g.
the list mechanism used for the table of contents) and the
\defineheadplacement has also a alternative key which is needed when you
want an inline heading (e.g. \setuphead[...][alternative=text]).

...

The necessary key would be endless with each new layout and with the
\defineheadplacement command to create your own without adding
additional keys but you can also use the command key instead of
\defineheadplacement. The advantage of \defineheadplacement is that you
can better structure the code in the setups environment because you
don't have to worry about spaces.

Wolfgang

As "\defineheadplacement" is concerned:

You mentioned this command in your response, but "\defineheadplacement" is used nowhere in your code and there is no info about on wiki.

Could you provide a MWE how \defineheadplacement is supposed to be used?
You shouldn’t use it because Hans kept it only for backwards compatibility and \defineheadplacement is the better alternative. You can also use the same rendering (the content of the setups environment) for different head alternatives where you set the differences with the \defineheadalternative command.

% HeadA

\defineheadplacement[HeadA][vertical]#1#2%
  {\startframedtext
     #1\quad #2%
   \stopframedtext}

\definehead[HeadA][section][alternative=HeadA]

% HeadB

\defineheadalternative[HeadB][renderingsetup=HeadB] % alternative=vertical

\startsetups[HeadB]
  \startframedtext
    \headnumbercontent \qquad \headtextcontent
  \stopframedtext
\stopsetups

\definehead[HeadB][section][alternative=HeadB]

\starttext

\HeadA{Knuth}

\input knuth

\HeadB{Tufte}

\input tufte

\stoptext

Wolfgang