ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: \setuphead command
@ 2005-07-25 17:19 Elena Fraboschi
  2005-07-25 18:58 ` Nikolai Weibull
  0 siblings, 1 reply; 7+ messages in thread
From: Elena Fraboschi @ 2005-07-25 17:19 UTC (permalink / raw)


Hi nikolai, Many thanks for the hint in re right and left.  (The next one
to ask about this, I'll relieve you from the burden of having to answer
and will answer it myself! :-))

So I now have only two questions left unsolved, which are

(1) any ConTeXt command to gobble-up unwanted vertical space before
a section header, when the section header appears right at the
top of a new page?

(2) any ConTeXt way to do a \setuphead such that the text following
the header will be run-in text?

Many thanks.  Best, elena

P.S.  ok ok, I'll try to adopt your way of writing square bracketted
expressions...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead command
  2005-07-25 17:19 \setuphead command Elena Fraboschi
@ 2005-07-25 18:58 ` Nikolai Weibull
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolai Weibull @ 2005-07-25 18:58 UTC (permalink / raw)


Elena Fraboschi wrote:

> (1) any ConTeXt command to gobble-up unwanted vertical space before a
> section header, when the section header appears right at the top of a
> new page?

Hm, isn’t this done automatically?

> (2) any ConTeXt way to do a \setuphead such that the text following
> the header will be run-in text?

\setuphead
  [chapter]
  [alternative=text]

Enjoy,
        nikolai

-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead command
  2005-07-25 19:13 Elena Fraboschi
@ 2005-07-25 20:04 ` Nikolai Weibull
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolai Weibull @ 2005-07-25 20:04 UTC (permalink / raw)


Elena Fraboschi wrote:

> I'll test tonight what you says happens automatically (gobbling up
> whitespace at the top of a new page).  I'll use a grid to make sure
> that that's the case: to the naked eye, it seemed as though there was
> an awful amount of whitespace at the top of the page, but we'll see:
> I could be wrong.

Remember that there’s a rather spacious header defined by default,
        nikolai


-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead command
@ 2005-07-25 19:13 Elena Fraboschi
  2005-07-25 20:04 ` Nikolai Weibull
  0 siblings, 1 reply; 7+ messages in thread
From: Elena Fraboschi @ 2005-07-25 19:13 UTC (permalink / raw)


Wonderful, nikolai, many thanks.

I'll test tonight what you says happens automatically (gobbling up
whitespace at the top of a new page).  I'll use a grid to make sure
that that's the case: to the naked eye, it seemed as though there was
an awful amount of whitespace at the top of the page, but we'll see:
I could be wrong.

However, you have solved at least two of my three problems.  Thanks a
lot, elena

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead command
  2005-07-25 14:50 Elena Fraboschi
@ 2005-07-25 17:01 ` Nikolai Weibull
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolai Weibull @ 2005-07-25 17:01 UTC (permalink / raw)


Elena Fraboschi wrote:

> (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 :-))

They mean (ragged-)left and (ragged-)right, see
http://www.contextgarden.net/Right_and_left.

Isn’t

\setuphead
  [section]
  [align=middle]

a lot easier to read than what you’re writing?  We’re not writing C code
here…

Seriously, this is getting boring.  There’s a question on this topic
once a week now.  Sad part is, there’s really no good way to solve it,
        nikolai

-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead command
@ 2005-07-25 16:02 Elena Fraboschi
  0 siblings, 0 replies; 7+ messages in thread
From: Elena Fraboschi @ 2005-07-25 16:02 UTC (permalink / raw)
  Cc: pragma

Dear all:

I just conducted some follow up experiments on my previous questions,
and found out that...

(1) In re producing run-in text following a subsection header:  neither
[after={\blank[none]},] nor [after=\nowhitespace,] have any impact:
I still get the subsection header on one line, and the text on the
next line.

(2) In re horizontal alignment, I guess there is some sort of 
inheritance going on here?  In the setup below, I had hoped to
obtain the section header in the middle, and the subsection header
flush left, since "subsection" had not be re-defined at all.
However, once I define section to be [align=middle,], the
remaining headers follow suit, even when no \setuphead command
is written for them:

\setuphead[section][
    align=middle,
    ]

\starttext
\section{Will this work?}Hello world!  So here comes a
subsection that, not having been defined, would ideally
display at the default location, which is flush left.

\subsection{Is this flush left?}No, it isn't.
\stoptext

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead command
@ 2005-07-25 14:50 Elena Fraboschi
  2005-07-25 17:01 ` Nikolai Weibull
  0 siblings, 1 reply; 7+ messages in thread
From: Elena Fraboschi @ 2005-07-25 14:50 UTC (permalink / raw)
  Cc: pragma

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-07-25 20:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-25 17:19 \setuphead command Elena Fraboschi
2005-07-25 18:58 ` Nikolai Weibull
  -- strict thread matches above, loose matches on Subject: below --
2005-07-25 19:13 Elena Fraboschi
2005-07-25 20:04 ` Nikolai Weibull
2005-07-25 16:02 Elena Fraboschi
2005-07-25 14:50 Elena Fraboschi
2005-07-25 17:01 ` Nikolai Weibull

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