ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setuphead
@ 2006-07-27  8:59 Steffen Wolfrum
  2006-07-27 13:25 ` setuphead Taco Hoekwater
  2006-07-27 15:23 ` setuphead Hans Hagen
  0 siblings, 2 replies; 17+ messages in thread
From: Steffen Wolfrum @ 2006-07-27  8:59 UTC (permalink / raw)


Hi,

I was sure it should be quite standard, but I couldn't figure our how  
to set a heading like this:

"Chapter label/number" (centered,small,italic)
(linebreak)
"Chapter titel" (centered,bigger,bold)

Is there a command=... to be written, or could it be achieved by  
combining the various options that setuphead has predefined?


Steffen

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

* Re: setuphead
  2006-07-27  8:59 setuphead Steffen Wolfrum
@ 2006-07-27 13:25 ` Taco Hoekwater
  2006-07-28 20:08   ` setuphead Steffen Wolfrum
  2006-07-27 15:23 ` setuphead Hans Hagen
  1 sibling, 1 reply; 17+ messages in thread
From: Taco Hoekwater @ 2006-07-27 13:25 UTC (permalink / raw)




Steffen Wolfrum wrote:
> Hi,
> 
> I was sure it should be quite standard, but I couldn't figure our how  
> to set a heading like this:
> 
> "Chapter label/number" (centered,small,italic)
> (linebreak)
> "Chapter titel" (centered,bigger,bold)
> 
> Is there a command=... to be written, or could it be achieved by  
> combining the various options that setuphead has predefined?

I guess you need numbercommand,inbetween and textcommand. Not a
definitive answer, but I am positive that will work.

Taco

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

* Re: setuphead
  2006-07-27  8:59 setuphead Steffen Wolfrum
  2006-07-27 13:25 ` setuphead Taco Hoekwater
@ 2006-07-27 15:23 ` Hans Hagen
  2006-07-28 20:09   ` setuphead Steffen Wolfrum
  1 sibling, 1 reply; 17+ messages in thread
From: Hans Hagen @ 2006-07-27 15:23 UTC (permalink / raw)


Steffen Wolfrum wrote:
> Hi,
>
> I was sure it should be quite standard, but I couldn't figure our how  
> to set a heading like this:
>
> "Chapter label/number" (centered,small,italic)
> (linebreak)
> "Chapter titel" (centered,bigger,bold)
>
> Is there a command=... to be written, or could it be achieved by  
> combining the various options that setuphead has predefined?
>   
\setupheadertexts[\setups{header}]

\startsetups header
  \framed
    [align=middle,strut=no,offset=overlay]
    {\start
       \switchtobodyfont[small]\it 
       Chapter \getmarking[chapternumber]\par
     \stop
     \start
       \bf
       \getmarking[chapter]
     \stop}       
\stopsetups 

etc etc 


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

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

* Re: setuphead
  2006-07-27 13:25 ` setuphead Taco Hoekwater
@ 2006-07-28 20:08   ` Steffen Wolfrum
  2006-07-29  7:11     ` setuphead Taco Hoekwater
  0 siblings, 1 reply; 17+ messages in thread
From: Steffen Wolfrum @ 2006-07-28 20:08 UTC (permalink / raw)


You mean like this?

\setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween= 
\crlf,textcommand=\bf]


But what should inbetween be to force a linebreak?


Steffen


On 27.07.2006, at 15:25, Taco Hoekwater wrote:

>
>
> Steffen Wolfrum wrote:
>> Hi,
>>
>> I was sure it should be quite standard, but I couldn't figure our how
>> to set a heading like this:
>>
>> "Chapter label/number" (centered,small,italic)
>> (linebreak)
>> "Chapter titel" (centered,bigger,bold)
>>
>> Is there a command=... to be written, or could it be achieved by
>> combining the various options that setuphead has predefined?
>
> I guess you need numbercommand,inbetween and textcommand. Not a
> definitive answer, but I am positive that will work.
>
> Taco

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

* Re: setuphead
  2006-07-27 15:23 ` setuphead Hans Hagen
@ 2006-07-28 20:09   ` Steffen Wolfrum
  0 siblings, 0 replies; 17+ messages in thread
From: Steffen Wolfrum @ 2006-07-28 20:09 UTC (permalink / raw)


No, I don't mean "header" I mean heading, title, name of a section!

Steffen



On 27.07.2006, at 17:23, Hans Hagen wrote:

> Steffen Wolfrum wrote:
>> Hi,
>>
>> I was sure it should be quite standard, but I couldn't figure our how
>> to set a heading like this:
>>
>> "Chapter label/number" (centered,small,italic)
>> (linebreak)
>> "Chapter titel" (centered,bigger,bold)
>>
>> Is there a command=... to be written, or could it be achieved by
>> combining the various options that setuphead has predefined?
>>
> \setupheadertexts[\setups{header}]
>
> \startsetups header
>   \framed
>     [align=middle,strut=no,offset=overlay]
>     {\start
>        \switchtobodyfont[small]\it
>        Chapter \getmarking[chapternumber]\par
>      \stop
>      \start
>        \bf
>        \getmarking[chapter]
>      \stop}
> \stopsetups
>
> etc etc
>
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

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

* Re: setuphead
  2006-07-28 20:08   ` setuphead Steffen Wolfrum
@ 2006-07-29  7:11     ` Taco Hoekwater
  2006-07-30 20:17       ` setuphead Steffen Wolfrum
  0 siblings, 1 reply; 17+ messages in thread
From: Taco Hoekwater @ 2006-07-29  7:11 UTC (permalink / raw)


Steffen Wolfrum wrote:
> You mean like this?
> 
> \setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween= 
> \crlf,textcommand=\bf]

That is what I meant but it dodn't work out too well. New approach:

\def\Sectioncommand#1#2%
   {\vbox{\centerline{\it Chapter #1}%
          \centerline{\bfb #2}}}

\setuphead[chapter]
    [command=\Sectioncommand,
    style=]

Cheers, Taco

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

* Re: setuphead
  2006-07-29  7:11     ` setuphead Taco Hoekwater
@ 2006-07-30 20:17       ` Steffen Wolfrum
  2006-07-30 22:02         ` setuphead Aditya Mahajan
  2006-07-30 22:31         ` setuphead Hans Hagen
  0 siblings, 2 replies; 17+ messages in thread
From: Steffen Wolfrum @ 2006-07-30 20:17 UTC (permalink / raw)


Well, looks good, BUT
if the chapter's name is quite long and needs a break
then the break command used there (\crlf \break \\) can't work  
anymore ....

Steffen



Am 29.07.2006 um 09:11 schrieb Taco Hoekwater:

> Steffen Wolfrum wrote:
>> You mean like this?
>>
>> \setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween=
>> \crlf,textcommand=\bf]
>
> That is what I meant but it dodn't work out too well. New approach:
>
> \def\Sectioncommand#1#2%
>    {\vbox{\centerline{\it Chapter #1}%
>           \centerline{\bfb #2}}}
>
> \setuphead[chapter]
>     [command=\Sectioncommand,
>     style=]
>
> Cheers, Taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

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

* Re: setuphead
  2006-07-30 20:17       ` setuphead Steffen Wolfrum
@ 2006-07-30 22:02         ` Aditya Mahajan
  2006-07-30 22:31         ` setuphead Hans Hagen
  1 sibling, 0 replies; 17+ messages in thread
From: Aditya Mahajan @ 2006-07-30 22:02 UTC (permalink / raw)


> Am 29.07.2006 um 09:11 schrieb Taco Hoekwater:
>
>> Steffen Wolfrum wrote:
>>> You mean like this?
>>>
>>> \setuphead[chapter][command=\midaligned,numbercommand=\it,inbetween=
>>> \crlf,textcommand=\bf]
>>
>> That is what I meant but it dodn't work out too well. New approach:
>>
>> \def\Sectioncommand#1#2%
>>    {\vbox{\centerline{\it Chapter #1}%
>>           \centerline{\bfb #2}}}
>>
>> \setuphead[chapter]
>>     [command=\Sectioncommand,
>>     style=]
>>

On Sun, 30 Jul 2006, Steffen Wolfrum wrote:

> Well, looks good, BUT
> if the chapter's name is quite long and needs a break
> then the break command used there (\crlf \break \\) can't work
> anymore ....

How about

\def\Sectioncommand#1#2%
{\framed[align=middle,width=broad,frame=no]
    {\it Chapter #1 \crlf
    \bfb\setupinterlinespace#2\endgraf}}

\setuphead[chapter]
           [command=\Sectioncommand,
            style=]

\chapter{A very very very very very very loongish title of the 
chapter}

Aditya

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

* Re: setuphead
  2006-07-30 20:17       ` setuphead Steffen Wolfrum
  2006-07-30 22:02         ` setuphead Aditya Mahajan
@ 2006-07-30 22:31         ` Hans Hagen
  2006-07-30 22:51           ` setuphead Aditya Mahajan
  1 sibling, 1 reply; 17+ messages in thread
From: Hans Hagen @ 2006-07-30 22:31 UTC (permalink / raw)


Steffen Wolfrum wrote:
> Well, looks good, BUT
> if the chapter's name is quite long and needs a break
> then the break command used there (\crlf \break \\) can't work  
> anymore ....
>   

\setuphead[chapter]
    [command=\Sectioncommand,
     style=,
     textstyle=\bfb,
     numberstyle=\it]

\def\Sectioncommand#1#2%
  {\vbox \bgroup
     \framed[align=middle,frame=off,offset=0pt]{Chapter #1}%
     \framed[align=middle,frame=off,offset=0pt]{#2}%
   \egroup}


or something alike

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.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: setuphead
  2006-07-30 22:31         ` setuphead Hans Hagen
@ 2006-07-30 22:51           ` Aditya Mahajan
  2006-07-31  5:31             ` setuphead, setuplist Steffen Wolfrum
  0 siblings, 1 reply; 17+ messages in thread
From: Aditya Mahajan @ 2006-07-30 22:51 UTC (permalink / raw)


On Mon, 31 Jul 2006, Hans Hagen wrote:

> Steffen Wolfrum wrote:
>> Well, looks good, BUT
>> if the chapter's name is quite long and needs a break
>> then the break command used there (\crlf \break \\) can't work
>> anymore ....
>>
>
> \setuphead[chapter]
>    [command=\Sectioncommand,
>     style=,
>     textstyle=\bfb,
>     numberstyle=\it]
>
> \def\Sectioncommand#1#2%
>  {\vbox \bgroup
>     \framed[align=middle,frame=off,offset=0pt]{Chapter #1}%
>     \framed[align=middle,frame=off,offset=0pt]{#2}%
>   \egroup}
>
> or something alike

You also need to specify width of the frame, otherwise width=fit is 
default and framed box does not appear to be middle aligned.

Aditya

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

* Re: setuphead, setuplist
  2006-07-30 22:51           ` setuphead Aditya Mahajan
@ 2006-07-31  5:31             ` Steffen Wolfrum
  2006-07-31 11:46               ` Steffen Wolfrum
  2006-07-31 15:12               ` Hans Hagen
  0 siblings, 2 replies; 17+ messages in thread
From: Steffen Wolfrum @ 2006-07-31  5:31 UTC (permalink / raw)


That's it.

Now the corresponding entry in the TOC should be without sectionnumber,
but

setuplist[...][sectionnumber=no]

doesn't work.
And looking in the manual I saw that this command is listed for  
setuplist, but listed italic?!

Steffen



Am 31.07.2006 um 00:51 schrieb Aditya Mahajan:

> On Mon, 31 Jul 2006, Hans Hagen wrote:
>
>> Steffen Wolfrum wrote:
>>> Well, looks good, BUT
>>> if the chapter's name is quite long and needs a break
>>> then the break command used there (\crlf \break \\) can't work
>>> anymore ....
>>>
>>
>> \setuphead[chapter]
>>    [command=\Sectioncommand,
>>     style=,
>>     textstyle=\bfb,
>>     numberstyle=\it]
>>
>> \def\Sectioncommand#1#2%
>>  {\vbox \bgroup
>>     \framed[align=middle,frame=off,offset=0pt]{Chapter #1}%
>>     \framed[align=middle,frame=off,offset=0pt]{#2}%
>>   \egroup}
>>
>> or something alike
>
> You also need to specify width of the frame, otherwise width=fit is
> default and framed box does not appear to be middle aligned.
>
> Aditya
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

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

* Re: setuphead, setuplist
  2006-07-31  5:31             ` setuphead, setuplist Steffen Wolfrum
@ 2006-07-31 11:46               ` Steffen Wolfrum
  2006-07-31 15:12               ` Hans Hagen
  1 sibling, 0 replies; 17+ messages in thread
From: Steffen Wolfrum @ 2006-07-31 11:46 UTC (permalink / raw)
  Cc: Hans Hagen, Taco Hoekwater

I have tried ...

\setuplist[chapter]	 
[label=no,prefix=no,sectionnumber=no,alternative=a,textcommand= 
\midaligned,distance=0cm,margin=0cm,width=0cm]

... but still there is the sectionnumber shown in the content.
Is this because of our special setuphead[chapter] command?

Is there no way to avoid the sectionnumber for my chapter in the TOC?

Steffen


Am 31.07.2006 um 07:31 schrieb Steffen Wolfrum:

> That's it.
>
> Now the corresponding entry in the TOC should be without  
> sectionnumber,
> but
>
> setuplist[...][sectionnumber=no]
>
> doesn't work.
> And looking in the manual I saw that this command is listed for
> setuplist, but listed italic?!
>
>

...

>>>
>>> \setuphead[chapter]
>>>    [command=\Sectioncommand,
>>>     style=,
>>>     textstyle=\bfb,
>>>     numberstyle=\it]
>>>
>>> \def\Sectioncommand#1#2%
>>>  {\vbox \bgroup
>>>     \framed[align=middle,frame=off,offset=0pt]{Chapter #1}%
>>>     \framed[align=middle,frame=off,offset=0pt]{#2}%
>>>   \egroup}

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

* Re: setuphead, setuplist
  2006-07-31  5:31             ` setuphead, setuplist Steffen Wolfrum
  2006-07-31 11:46               ` Steffen Wolfrum
@ 2006-07-31 15:12               ` Hans Hagen
  1 sibling, 0 replies; 17+ messages in thread
From: Hans Hagen @ 2006-07-31 15:12 UTC (permalink / raw)


Steffen Wolfrum wrote:
> That's it.
>
> Now the corresponding entry in the TOC should be without sectionnumber,
> but
>
> setuplist[...][sectionnumber=no]
>
> doesn't work.
> And looking in the manual I saw that this command is listed for  
> setuplist, but listed italic?!
>   
has to do with prefixes, like \chapternumber=no and 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.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: setuphead
  2005-06-22  8:11 setuphead Wolfgang Zillig
  2005-06-22  9:19 ` setuphead Mikael Persson
@ 2005-06-22 18:35 ` Hans Hagen
  1 sibling, 0 replies; 17+ messages in thread
From: Hans Hagen @ 2005-06-22 18:35 UTC (permalink / raw)


Wolfgang Zillig wrote:
> Hello all,
> 
> I think the solution is quite simple but I don't know how to do it.
> I want to start a new page with each section, so I tried:
> 
>  \setuphead[section][style=\bfb,tolerance=verytolerant,page=yes]
> 
> but this does not work. What is is page=yes for?

it does work, but the first section (in a chapter) is an exception, and will 
unly be honored when continue=yes is also set; this permits

chapter
section
<page>
section
<page>
section

as well as:

chapter
<page>
section
<page>
section
<page>
section


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

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

* Re: setuphead
  2005-06-22  9:19 ` setuphead Mikael Persson
@ 2005-06-22 11:23   ` Wolfgang Zillig
  0 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Zillig @ 2005-06-22 11:23 UTC (permalink / raw)


Thanks,

I found my problem: I use somthing like:

\chapter{text}
some introduction
\section{bla}
some more text

and then the section starts not at a new page. I think I should no use 
chapter with some text afterwards.

Cheers
Wolfgang


Mikael Persson wrote:

>On 6/22/05, Wolfgang Zillig <wolfgang.zillig@student.kuleuven.be> wrote:
>  
>
>>Hello all,
>>
>>I think the solution is quite simple but I don't know how to do it.
>>I want to start a new page with each section, so I tried:
>>
>>  \setuphead[section][style=\bfb,tolerance=verytolerant,page=yes]
>>
>>but this does not work. What is is page=yes for?
>>
>>Thanks
>>
>>Wolfgang
>>    
>>
>
>Hello Wolfgang,
>
>Your setup works on live.contextgarden.net, so there might be a
>problem at your side. What it could be, I have no clue...
>%%% file that works
>\setuphead[section][style=\bfb,tolerance=verytolerant,page=yes]
>\starttext
>\section{The World}
>Hello world!
>\section{The confirm}
>OK
>\stoptext
>%%%
>_______________________________________________
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>
>  
>

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

* Re: setuphead
  2005-06-22  8:11 setuphead Wolfgang Zillig
@ 2005-06-22  9:19 ` Mikael Persson
  2005-06-22 11:23   ` setuphead Wolfgang Zillig
  2005-06-22 18:35 ` setuphead Hans Hagen
  1 sibling, 1 reply; 17+ messages in thread
From: Mikael Persson @ 2005-06-22  9:19 UTC (permalink / raw)


On 6/22/05, Wolfgang Zillig <wolfgang.zillig@student.kuleuven.be> wrote:
> Hello all,
> 
> I think the solution is quite simple but I don't know how to do it.
> I want to start a new page with each section, so I tried:
> 
>   \setuphead[section][style=\bfb,tolerance=verytolerant,page=yes]
> 
> but this does not work. What is is page=yes for?
> 
> Thanks
> 
> Wolfgang

Hello Wolfgang,

Your setup works on live.contextgarden.net, so there might be a
problem at your side. What it could be, I have no clue...
%%% file that works
\setuphead[section][style=\bfb,tolerance=verytolerant,page=yes]
\starttext
\section{The World}
Hello world!
\section{The confirm}
OK
\stoptext
%%%

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

* setuphead
@ 2005-06-22  8:11 Wolfgang Zillig
  2005-06-22  9:19 ` setuphead Mikael Persson
  2005-06-22 18:35 ` setuphead Hans Hagen
  0 siblings, 2 replies; 17+ messages in thread
From: Wolfgang Zillig @ 2005-06-22  8:11 UTC (permalink / raw)


Hello all,

I think the solution is quite simple but I don't know how to do it.
I want to start a new page with each section, so I tried:

  \setuphead[section][style=\bfb,tolerance=verytolerant,page=yes]
 
but this does not work. What is is page=yes for?

Thanks

Wolfgang

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

end of thread, other threads:[~2006-07-31 15:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27  8:59 setuphead Steffen Wolfrum
2006-07-27 13:25 ` setuphead Taco Hoekwater
2006-07-28 20:08   ` setuphead Steffen Wolfrum
2006-07-29  7:11     ` setuphead Taco Hoekwater
2006-07-30 20:17       ` setuphead Steffen Wolfrum
2006-07-30 22:02         ` setuphead Aditya Mahajan
2006-07-30 22:31         ` setuphead Hans Hagen
2006-07-30 22:51           ` setuphead Aditya Mahajan
2006-07-31  5:31             ` setuphead, setuplist Steffen Wolfrum
2006-07-31 11:46               ` Steffen Wolfrum
2006-07-31 15:12               ` Hans Hagen
2006-07-27 15:23 ` setuphead Hans Hagen
2006-07-28 20:09   ` setuphead Steffen Wolfrum
  -- strict thread matches above, loose matches on Subject: below --
2005-06-22  8:11 setuphead Wolfgang Zillig
2005-06-22  9:19 ` setuphead Mikael Persson
2005-06-22 11:23   ` setuphead Wolfgang Zillig
2005-06-22 18:35 ` setuphead 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).