ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Elena Fraboschi <elena@mendoza.math.indiana.edu>
Cc: pragma@wxs.nl
Subject: Re: \setuphead command
Date: Mon, 25 Jul 2005 09:50:51 -0500 (EST)	[thread overview]
Message-ID: <20050725145051.939AC1A8C8@mendoza.math.indiana.edu> (raw)

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!)

             reply	other threads:[~2005-07-25 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-25 14:50 Elena Fraboschi [this message]
2005-07-25 17:01 ` Nikolai Weibull
2005-07-25 16:02 Elena Fraboschi
2005-07-25 17:19 Elena Fraboschi
2005-07-25 18:58 ` Nikolai Weibull
2005-07-25 19:13 Elena Fraboschi
2005-07-25 20:04 ` Nikolai Weibull

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=20050725145051.939AC1A8C8@mendoza.math.indiana.edu \
    --to=elena@mendoza.math.indiana.edu \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).