ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: title settings
Date: Sun, 17 Oct 2010 15:19:23 +0200	[thread overview]
Message-ID: <4CBAF7DB.9080402@wxs.nl> (raw)
In-Reply-To: <4CBADBE9.3080803@FU-Berlin.DE>

On 17-10-2010 1:20, Herbert Voss wrote:
> If I understand the documentations correct, then
> the first command should set _all_ titles to
> slanted except the subsection. When I run
> this example the titles are always upright.
>
>
> \setupheads[textstyle=slanted]
> \setuphead[part][placehead=yes,color=blue]
> \setuphead[subsection][numberstyle=bold,textstyle=cap]
>
> \starttext
> \part{Teilebene}
> \chapter{Kapitelebene}
> \section{Abschnittsebene 1}
> \subsection{Abschnittsebene 2}
> \subsubsection{Abschnittsebene 3}
> \stoptext
>
> running TeXLive2010 with mkiv

Heads indeed inherit from parents with the root being \setupheads, but 
with a few exeptions. The definition deep down is:

\unexpanded\def\definestructuresection[#1]%
  {....
   \getparameters[\??nh#1]
     [  \c!textstyle=\structureheadparameterstrict\c!style,
        \c!textcolor=\structureheadparameterstrict\c!color,
      \c!numberstyle=\structureheadparameterstrict\c!style,
      \c!numbercolor=\structureheadparameterstrict\c!color]%
   ....}

So, the explicit style and color variables have a more resticted 
inheritance, that does not backtrack.

The reasons for this are a bit fuzzy and lays in the fact that we also 
have style and color keys and if we would inherit this would mean that 
one should nil the explicit text and number ones quite often.

So, text* and number* are bound to the current section level which means 
that you can set up all (cloned) sections, subsections etc at once but 
the setting does not bleed to other levels unless of course that is 
somehow configured.

In practice, I often use style and color for setting both and then 
textstyle and numberstyle if there is an exception. This permits things 
like:

style={\switchtobodyfont[10pt]},textstyle=bold,numberstyle=slanted

In such cases the spacing is style driven which makes sense (I hope).

Hans




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


      parent reply	other threads:[~2010-10-17 13:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 11:20 Herbert Voss
2010-10-17 11:22 ` Herbert Voss
2010-10-17 12:44 ` luigi scarso
2010-10-17 13:23   ` Herbert Voss
2010-10-17 13:19 ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBAF7DB.9080402@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).