ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [Q] formatting chapter title to one line
@ 2001-02-20 21:22 Han The Thanh
  2001-02-23 11:45 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Han The Thanh @ 2001-02-20 21:22 UTC (permalink / raw)


Hi all,

I wish to format a chapter title (in appendix part) like:

                  A. <my chapter title>

I did try the following:

\setuphead[chapter][
    appendixlabel=,
    stype=\tfc,
    textstyle=bf,
    alternative=middle]

but the title is broken into two lines like:

                         A
                  <my chapter title>

So I tried next:

\setuphead[chapter][
    appendixlabel=,
    stype=\tfc,
    textstyle=bf,
    alternative=middle,
    command=\catalogchapter,
    alternative=middle]

\def\catalogchapter#1#2{%
    \hbox to \hsize{\hss#1.~#2\hss}
}

Now I get the title formatted into one line, but there are still two
problems:

1) the dot character doesn't get the correct size (it's smaller than the
   title text)

2) textstyle seems to be applied to the title text only, however the title
   number (which is A) remains the default (\rm).

Can someone please tell me what I am missing? 

Thanks,
Thanh


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

* Re: [Q] formatting chapter title to one line
  2001-02-20 21:22 [Q] formatting chapter title to one line Han The Thanh
@ 2001-02-23 11:45 ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-02-23 11:45 UTC (permalink / raw)
  Cc: ConTeXt List

At 10:22 PM 2/20/01 +0100, Han The Thanh wrote:
>Hi all,
>
>I wish to format a chapter title (in appendix part) like:
>
>                  A. <my chapter title>

\starttext

\setuphead [chapter]
  [appendixlabel=,style=\bfc,alternative=middle]

\chapter{OEPS}

\setuphead [chapter]
  [appendixlabel=,style=\bfc,alternative=middle,
   numbercommand=\catalogusnumber,command=\catalogchapter]

\def\catalogusnumber #1{#1.}
\def\catalogchapter#1#2{\hbox to \hsize{\hss#1~#2\hss}}

\chapter{OEPS}

\setuphead [chapter]
  [appendixlabel=,style=\bfc,alternative=paragraph,align=middle,
   numbercommand=\catalogusnumber,command=]

\chapter{OEPS}

\stoptext

-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: [Q] formatting chapter title to one line
  2001-02-21 13:04 ` Han The Thanh
@ 2001-02-22  8:58   ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-02-22  8:58 UTC (permalink / raw)
  Cc: ConTeXt List

At 02:04 PM 2/21/01 +0100, Han The Thanh wrote:
>> > 2) textstyle seems to be applied to the title text only, however the
title
>> >    number (which is A) remains the default (\rm).
>> 
>> Isn't there a numberstyle property also?
>
>aha, thanks. I could have guessed it from textstyle property. But what
>about the dot after the number? 

\setupheads[separator=*]

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: [Q] formatting chapter title to one line
       [not found] <3A93630B.9020009@pobox.com>
@ 2001-02-21 13:04 ` Han The Thanh
  2001-02-22  8:58   ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Han The Thanh @ 2001-02-21 13:04 UTC (permalink / raw)
  Cc: ConTeXt List

> > 2) textstyle seems to be applied to the title text only, however the title
> >    number (which is A) remains the default (\rm).
> 
> Isn't there a numberstyle property also?

aha, thanks. I could have guessed it from textstyle property. But what
about the dot after the number? 

Thanh


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

end of thread, other threads:[~2001-02-23 11:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-20 21:22 [Q] formatting chapter title to one line Han The Thanh
2001-02-23 11:45 ` Hans Hagen
     [not found] <3A93630B.9020009@pobox.com>
2001-02-21 13:04 ` Han The Thanh
2001-02-22  8:58   ` Hans Hagen

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