ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fw: Subsections
@ 1999-08-30  7:42 Gilbert van den Dobbelsteen
  1999-08-30  9:01 ` Hans Hagen
  1999-08-30 19:34 ` Fw: Subsections David Arnold
  0 siblings, 2 replies; 5+ messages in thread
From: Gilbert van den Dobbelsteen @ 1999-08-30  7:42 UTC (permalink / raw)


Sorry, something went wrong with my mailer (accidently sent the message too
early).

>
> I would like to change the format of subsections. If I name a subsection
with
>
> \subsection{Troubleshooting Function M-files}
>
> then I would like the following formats.
>
> A little bit of blank space before the subsection, but not so much as
there
> is now. The title of the subsection (without a number preceding),
flushleft
> to the margin, in the same font size as the regular body font, but bold,
> with a period after the subsection title, then run-in to the remainder of
> the text, as in

Nice challenge, but in the end pretty easy:

\setuphead
  [subsection]
  [alternative=text,
   before={\blank[10pt]},
   after=,
   style=bold,
   command=\mysubsection]

\def\mysubsection#1#2{#2.}

You could also say: number=no, to tell context, that this will not be
numbered. Though the output is not an different at all, the table of
contents would be. EXperimenting is the game here.

Now I wonder, would Hans come up with a completely different solution?

Gilbert.


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

* Re: Fw: Subsections
  1999-08-30  7:42 Fw: Subsections Gilbert van den Dobbelsteen
@ 1999-08-30  9:01 ` Hans Hagen
  1999-08-31  5:16   ` Fw: Subsections (spoke too soon) David Arnold
  1999-08-30 19:34 ` Fw: Subsections David Arnold
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 1999-08-30  9:01 UTC (permalink / raw)
  Cc: NTG-ConTeXt

Gilbert van den Dobbelsteen wrote:

> Nice challenge, but in the end pretty easy:
> 
> \setuphead
>   [subsection]
>   [alternative=text,
>    before={\blank[10pt]},
>    after=,
>    style=bold,
>    command=\mysubsection]
> 
> \def\mysubsection#1#2{#2.}
> 
> You could also say: number=no, to tell context, that this will not be
> numbered. Though the output is not an different at all, the table of
> contents would be. EXperimenting is the game here.
> 
> Now I wonder, would Hans come up with a completely different solution?

No. But it makes me think of adding a 'stopper' (afsluiter) feature. 

Because 'subject' inherits from 'section', there is no need for the the
number=no, just use \subsubject. Also, beware of lower level headers
inheriting defaults! 

Note: when cross document links are turned on, (see pdftex manuals as an
example of this), text headers are handled ok, even multiple ones, even
when spanning mulriple lines, like in: 

[bf: a subsection] [bs: a subsubsection] the text etc 

If one wants to see some uncomprehensible horrible tex, take a look at
the code used to do this: typeset, unfold, combine, unwhateverbox, etc.
This is a typical example of nightmare programming. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


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

* Re: Fw: Subsections
  1999-08-30  7:42 Fw: Subsections Gilbert van den Dobbelsteen
  1999-08-30  9:01 ` Hans Hagen
@ 1999-08-30 19:34 ` David Arnold
  1 sibling, 0 replies; 5+ messages in thread
From: David Arnold @ 1999-08-30 19:34 UTC (permalink / raw)


All,

Gilbert's solution worked perfectly. Thanks.

At 09:42 AM 8/30/99 +0200, you wrote:
>Sorry, something went wrong with my mailer (accidently sent the message too
>early).
>
>
>>
>> I would like to change the format of subsections. If I name a subsection
>with
>>
>> \subsection{Troubleshooting Function M-files}
>>
>> then I would like the following formats.
>>
>> A little bit of blank space before the subsection, but not so much as
>there
>> is now. The title of the subsection (without a number preceding),
>flushleft
>> to the margin, in the same font size as the regular body font, but bold,
>> with a period after the subsection title, then run-in to the remainder of
>> the text, as in
>
>Nice challenge, but in the end pretty easy:
>
>\setuphead
>  [subsection]
>  [alternative=text,
>   before={\blank[10pt]},
>   after=,
>   style=bold,
>   command=\mysubsection]
>
>
>\def\mysubsection#1#2{#2.}
>
>You could also say: number=no, to tell context, that this will not be
>numbered. Though the output is not an different at all, the table of
>contents would be. EXperimenting is the game here.
>
>
>Now I wonder, would Hans come up with a completely different solution?
>
>Gilbert.
>
>
>


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

* Re: Fw: Subsections (spoke too soon)
  1999-08-30  9:01 ` Hans Hagen
@ 1999-08-31  5:16   ` David Arnold
  1999-08-31  7:46     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: David Arnold @ 1999-08-31  5:16 UTC (permalink / raw)
  Cc: ntg-context

All,

Looks like I spoke too soon when I claimed we had a good solution with the
subhead set up below. Now I have some terrible line breaks and indenting
problems that I did not have before. I checked, and if I eleiminate the
subsection setup below, my problems go away.

For example, the following source

\section{Surface Area}

A too infrequently used result from Pappus states that if a simple
convex figure is rotated about a line then the surface area of the
resulting figure equals the perimeter of the original figure
multiplied by the distance traveled by that figure's centroid.
For example, if the line of length $h$ in \in{Figure}[pappus] is
revolved around the line $L$,

\placefigure
 [here][pappus]
 {Producing a cylinder.}
 {\externalfigure[chap3/pappus.1]}

then a cylinder of height $h$ and radius $r$ is produced, which is
well-known to have lateral surface area equal to $2\pi rh$. Still,
according to Pappus, the lateral surface area should equal

gets typeset exactly like this:

\section{Surface Area}

A too infrequently used result from Pappus states that if a simple
convex figure is rotated about a line then the surface area of the
resulting figure equals the perimeter of the original figure
multiplied by the distance traveled by that figure's centroid.
For example, if the line of length $h$ in \in{Figure}[pappus] is
revolved around the line $L$,
then a cylinder of height $h$ and radius $r$ is produced, which is
well-known to have lateral surface area equal to $2\pi rh$. Still,
according to Pappus, the lateral surface area should equal

with the figure on the next page. There are other bad problems, with some
paragraphs indenting, some not.

At 11:01 AM 8/30/99 +0200, you wrote:
>Gilbert van den Dobbelsteen wrote:
>
>> Nice challenge, but in the end pretty easy:
>> 
>> \setuphead
>>   [subsection]
>>   [alternative=text,
>>    before={\blank[10pt]},
>>    after=,
>>    style=bold,
>>    command=\mysubsection]
>> 
>> \def\mysubsection#1#2{#2.}
>> 
>> You could also say: number=no, to tell context, that this will not be
>> numbered. Though the output is not an different at all, the table of
>> contents would be. EXperimenting is the game here.
>> 
>> Now I wonder, would Hans come up with a completely different solution?
>
>No. But it makes me think of adding a 'stopper' (afsluiter) feature. 
>
>Because 'subject' inherits from 'section', there is no need for the the
>number=no, just use \subsubject. Also, beware of lower level headers
>inheriting defaults! 
>
>Note: when cross document links are turned on, (see pdftex manuals as an
>example of this), text headers are handled ok, even multiple ones, even
>when spanning mulriple lines, like in: 
>
>[bf: a subsection] [bs: a subsubsection] the text etc 
>
>If one wants to see some uncomprehensible horrible tex, take a look at
>the code used to do this: typeset, unfold, combine, unwhateverbox, etc.
>This is a typical example of nightmare programming. 
>
>Hans
>
>-----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
>-----------------------------------------------------------------
>
>


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

* Re: Fw: Subsections (spoke too soon)
  1999-08-31  5:16   ` Fw: Subsections (spoke too soon) David Arnold
@ 1999-08-31  7:46     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 1999-08-31  7:46 UTC (permalink / raw)
  Cc: ntg-context

David Arnold wrote:

> Looks like I spoke too soon when I claimed we had a good solution with the
> subhead set up below. Now I have some terrible line breaks and indenting
> problems that I did not have before. I checked, and if I eleiminate the
> subsection setup below, my problems go away.

Can you send me (and gilbert -) the complete setup you use? In your
example I see no \subsection, so I wonder what happens. Maybe some
forgotten brace or so. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


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

end of thread, other threads:[~1999-08-31  7:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-30  7:42 Fw: Subsections Gilbert van den Dobbelsteen
1999-08-30  9:01 ` Hans Hagen
1999-08-31  5:16   ` Fw: Subsections (spoke too soon) David Arnold
1999-08-31  7:46     ` Hans Hagen
1999-08-30 19:34 ` Fw: Subsections David Arnold

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