[NTG-context] \setuphead command

Elena Fraboschi elena at mendoza.math.indiana.edu
Mon Jul 25 16:50:51 CEST 2005


Dear All:

I amhaving my own private warfare with the \setuphead command, and 
I wonder whether anyone can give me a hint.  I have three problems,
which I describe in detail below.  They are:

(1) how to setup run-in text after a subhead,
(2) how to align the section, subsection, ... headers left or right
    (I am not talking of the running heads here)
(3) vertical whitespace before a section header when it falls at the
    beginning of a new page
    
What is *not* wanted :-)
====================
If the solution is use command=\mycommand, fine, I can do that.  just
please tell me that that's the only solution. I really am not asking
about how to write a "Plain" or "LaTeX" command.  Rather, what I'd like
to know is if there is a ConTeXt-ish way to do these things, and by
that I mean [something=something].

Description of my problems
==========================
(1) At the Indiana Univ. Math. J. we use three levels of headings, let's call 
them \section, \subsection, and \subsubsection.  The last two use run-in
text.  In Plain, the corresponding command might be something like this:

\def\mysubsection#1{\vskip14pt\indent{\tenbfsl#1}.~}

The outcome is this:

    My cat Inca.  Inca is a beautiful black cat though she is now
approaching her "golden" years.

I could not come up with a [...=...] way to do run-in text after a
heading.  The only thing I did not try is something that occurred to 
me while walking to work - would this work?

\setuphead[subsection][
    after={\blank[none]}
                      ]
                      
(2) Horizontal alignment.  This problem is almost funny.  Consider these
two setups:

\setuphead[section][
    align=middle
    ]
    
\setuphead[subsection][
    align=left,
    ]
    
The section will appear just fine, centered between the left and the
right margins.  The subsection head will appear flush RIGHT!  If, instead,
you write

\setuphead[subsection][
    align=right,
    ]
    
the subsection head will appear flush LEFT.  Hmmm...  Hans, are you dyslexic?
:-)  (just in case, here comes another one :-))

I was able to obtain a subsection header as I wanted it by writing

\setuphead[subsection][
    align=left,
    command=\doglobal
    ]
    
The problem is that, even though it works, I do not want to learn ConTeXt
the wrong way.  I do not want to "hack" it if there are set, orthodox ways
to do what I want to do.

(3) Plain TeX had some setup commands (have to re-acquaint myself with
The TeXBook - have not done Plain in years) such that you could insert
vertical whitespace before a section (subsection...) header, as wanted,
but if in the course of writing that section header happened to fall
at the top of a new page, then the vertical whitespace before it would
be gobbled up.  The reason is very simple:  you do not want to have a
"ragged top".  My question is this:  Is there any built-in thing like
that in ConTeXt?  Is there a command to "gobble up" vertical whitespace
when a page break sends a heading to the top of the next page?

Many thanks for any and all help.  Best, elena (I wore thin the
LiveContext interface this weekend - what a great thing to have!)





More information about the ntg-context mailing list