ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* fancyhdr equivalent
@ 2007-07-01 21:16 Peter I. Hansen
  2007-07-01 21:43 ` Aditya Mahajan
  2007-07-02 11:18 ` Wolfgang Schuster
  0 siblings, 2 replies; 14+ messages in thread
From: Peter I. Hansen @ 2007-07-01 21:16 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 400 bytes --]

Hello

Just getting started with ConTeXt, and liking it so far :)

However, I would like to use something similar to the LaTeX 'fancyhdr'
package. I've been poking around trying to find such a thing and the closest
I could get is:

http://osdir.com/ml/tex.context/2001-10/msg00094.html

I can't find it in the manual, so if it is built in maybe one of you guys
can tell how to use it?

Thanks, Peter

[-- Attachment #1.2: Type: text/html, Size: 520 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: fancyhdr equivalent
  2007-07-01 21:16 fancyhdr equivalent Peter I. Hansen
@ 2007-07-01 21:43 ` Aditya Mahajan
  2007-07-01 22:58   ` Peter I. Hansen
  2007-07-02 11:18 ` Wolfgang Schuster
  1 sibling, 1 reply; 14+ messages in thread
From: Aditya Mahajan @ 2007-07-01 21:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 1 Jul 2007, Peter I. Hansen wrote:

> Hello
>
> Just getting started with ConTeXt, and liking it so far :)
>
> However, I would like to use something similar to the LaTeX 'fancyhdr'
> package. I've been poking around trying to find such a thing and the closest
> I could get is:
>
> http://osdir.com/ml/tex.context/2001-10/msg00094.html
>
> I can't find it in the manual, so if it is built in maybe one of you guys
> can tell how to use it?

Look at Section 4.17 of ConTeXt manual 
<http://www.pragma-ade.com/general/manuals/cont-enp.pdf>

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-01 21:43 ` Aditya Mahajan
@ 2007-07-01 22:58   ` Peter I. Hansen
  2007-07-01 23:24     ` Aditya Mahajan
  0 siblings, 1 reply; 14+ messages in thread
From: Peter I. Hansen @ 2007-07-01 22:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 902 bytes --]

On 7/1/07, Aditya Mahajan <adityam@umich.edu> wrote:
>
> On Sun, 1 Jul 2007, Peter I. Hansen wrote:
>
> > Hello
> >
> > Just getting started with ConTeXt, and liking it so far :)
> >
> > However, I would like to use something similar to the LaTeX 'fancyhdr'
> > package. I've been poking around trying to find such a thing and the
> closest
> > I could get is:
> >
> > http://osdir.com/ml/tex.context/2001-10/msg00094.html
> >
> > I can't find it in the manual, so if it is built in maybe one of you
> guys
> > can tell how to use it?
>
> Look at Section 4.17 of ConTeXt manual
> <http://www.pragma-ade.com/general/manuals/cont-enp.pdf>


What I would like to do is for example to frame the headertext, and I tried
with eg.

\setupheadertexts  [chapter][pagenumber]
\setupheader         [style=\inframed]

But this creates a framed chapter text and a framed pagenumber. How do I put
both in one frame?

[-- Attachment #1.2: Type: text/html, Size: 1466 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: fancyhdr equivalent
  2007-07-01 22:58   ` Peter I. Hansen
@ 2007-07-01 23:24     ` Aditya Mahajan
  2007-07-02  9:43       ` Peter I. Hansen
  0 siblings, 1 reply; 14+ messages in thread
From: Aditya Mahajan @ 2007-07-01 23:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 2 Jul 2007, Peter I. Hansen wrote:

> On 7/1/07, Aditya Mahajan <adityam@umich.edu> wrote:
>> 
>> On Sun, 1 Jul 2007, Peter I. Hansen wrote:
>> 
>> > Hello
>> >
>> > Just getting started with ConTeXt, and liking it so far :)
>> >
>> > However, I would like to use something similar to the LaTeX 'fancyhdr'
>> > package. I've been poking around trying to find such a thing and the
>> closest
>> > I could get is:
>> >
>> > http://osdir.com/ml/tex.context/2001-10/msg00094.html
>> >
>> > I can't find it in the manual, so if it is built in maybe one of you
>> guys
>> > can tell how to use it?
>> 
>> Look at Section 4.17 of ConTeXt manual
>> <http://www.pragma-ade.com/general/manuals/cont-enp.pdf>
>
>
> What I would like to do is for example to frame the headertext, and I tried
> with eg.
>
> \setupheadertexts  [chapter][pagenumber]
> \setupheader         [style=\inframed]
>
> But this creates a framed chapter text and a framed pagenumber. How do I put
> both in one frame?
>

\setupbackgrounds  [header][text][frame=on]

To get a decent visual effect, you need to set the header height to be 
something reasonable, for example

\setuplayout[header=2\lineheight]

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-01 23:24     ` Aditya Mahajan
@ 2007-07-02  9:43       ` Peter I. Hansen
  2007-07-02 11:04         ` Wolfgang Schuster
  0 siblings, 1 reply; 14+ messages in thread
From: Peter I. Hansen @ 2007-07-02  9:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1589 bytes --]

On 7/2/07, Aditya Mahajan <adityam@umich.edu> wrote:
>
> On Mon, 2 Jul 2007, Peter I. Hansen wrote:
>
> > On 7/1/07, Aditya Mahajan <adityam@umich.edu> wrote:
> >>
> >> On Sun, 1 Jul 2007, Peter I. Hansen wrote:
> >>
> >> > Hello
> >> >
> >> > Just getting started with ConTeXt, and liking it so far :)
> >> >
> >> > However, I would like to use something similar to the LaTeX
> 'fancyhdr'
> >> > package. I've been poking around trying to find such a thing and the
> >> closest
> >> > I could get is:
> >> >
> >> > http://osdir.com/ml/tex.context/2001-10/msg00094.html
> >> >
> >> > I can't find it in the manual, so if it is built in maybe one of you
> >> guys
> >> > can tell how to use it?
> >>
> >> Look at Section 4.17 of ConTeXt manual
> >> <http://www.pragma-ade.com/general/manuals/cont-enp.pdf>
> >
> >
> > What I would like to do is for example to frame the headertext, and I
> tried
> > with eg.
> >
> > \setupheadertexts  [chapter][pagenumber]
> > \setupheader         [style=\inframed]
> >
> > But this creates a framed chapter text and a framed pagenumber. How do I
> put
> > both in one frame?
> >
>
> \setupbackgrounds  [header][text][frame=on]
>
> To get a decent visual effect, you need to set the header height to be
> something reasonable, for example
>
> \setuplayout[header=2\lineheight]


Thanks, this works for me. One thing though, I would like to turn the
framing off on pages where a chapter begins. I tried
\setuphead[chapter][header=empty], but this just gives me an empty frame.
Is there a way to selectively turn of backgounds on for example chapter
pages?

[-- Attachment #1.2: Type: text/html, Size: 2377 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: fancyhdr equivalent
  2007-07-02  9:43       ` Peter I. Hansen
@ 2007-07-02 11:04         ` Wolfgang Schuster
  2007-07-02 11:18           ` Aditya Mahajan
  2007-07-02 12:10           ` Peter I. Hansen
  0 siblings, 2 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2007-07-02 11:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> Thanks, this works for me. One thing though, I would like to turn the
> framing off on pages where a chapter begins. I tried
> \setuphead[chapter][header=empty], but this just gives me
> an empty frame.
>  Is there a way to selectively turn of backgounds on for example chapter
> pages?

\setuphead
  [chapter]
  [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
   header=high]

\setupbackgrounds[header][text][frame=on]

\starttext

\dorecurse{4}
  {\chapter{Knuth}
   \dorecurse{12}
     {\input knuth\par}}

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-02 11:04         ` Wolfgang Schuster
@ 2007-07-02 11:18           ` Aditya Mahajan
  2007-07-02 12:10           ` Peter I. Hansen
  1 sibling, 0 replies; 14+ messages in thread
From: Aditya Mahajan @ 2007-07-02 11:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 2 Jul 2007, Wolfgang Schuster wrote:

> 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
>> Thanks, this works for me. One thing though, I would like to turn the
>> framing off on pages where a chapter begins. I tried
>> \setuphead[chapter][header=empty], but this just gives me
>> an empty frame.
>>  Is there a way to selectively turn of backgounds on for example chapter
>> pages?
>
> \setuphead
>  [chapter]
>  [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
>   header=high]
>
And incase you only want to get rid of the frame:

\setupbackgrounds[state=repeat]
\setupbackgrounds[header][text][background=whatever]
\defineoverlay[whatever][{\framed[width=\overlaywidth,height=\overlayheight]{}}]
\couplepage[chapter][before={\defineoverlay[whatever][]}]
\setuphead[chapter][before={\pagetype[chapter]}]
\starttext
  \chapter{First} \page test \chapter{second} \page test

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-01 21:16 fancyhdr equivalent Peter I. Hansen
  2007-07-01 21:43 ` Aditya Mahajan
@ 2007-07-02 11:18 ` Wolfgang Schuster
  1 sibling, 0 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2007-07-02 11:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

2007/7/1, Peter I. Hansen <peterih@gmail.com>:
> Hello
>
> Just getting started with ConTeXt, and liking it so far :)
>
> However, I would like to use something similar to the LaTeX 'fancyhdr'
> package. I've been poking around trying to find such a thing and the closest
> I could get is:
>
> http://osdir.com/ml/tex.context/2001-10/msg00094.html
>
> I can't find it in the manual, so if it is built in maybe one of you guys
> can tell how to use it?
>
> Thanks, Peter

Hi Peter,

you can use my module wolf-txt to come closer to the LaTeX.

It provides left, middle and right keys for the headertexts.

Wolfgang

[-- Attachment #2: wolf-txt.tex --]
[-- Type: application/x-tex, Size: 7244 bytes --]

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: fancyhdr equivalent
  2007-07-02 11:04         ` Wolfgang Schuster
  2007-07-02 11:18           ` Aditya Mahajan
@ 2007-07-02 12:10           ` Peter I. Hansen
  2007-07-02 12:31             ` Wolfgang Schuster
  1 sibling, 1 reply; 14+ messages in thread
From: Peter I. Hansen @ 2007-07-02 12:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 829 bytes --]

On 7/2/07, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>
> 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> > Thanks, this works for me. One thing though, I would like to turn the
> > framing off on pages where a chapter begins. I tried
> > \setuphead[chapter][header=empty], but this just gives me
> > an empty frame.
> >  Is there a way to selectively turn of backgounds on for example chapter
> > pages?
>
> \setuphead
>   [chapter]
>   [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
>    header=high]
>
> \setupbackgrounds[header][text][frame=on]
>
> \starttext
>
> \dorecurse{4}
>   {\chapter{Knuth}
>    \dorecurse{12}
>      {\input knuth\par}}
>
> \stoptext


Beautifull. One problem arise, if you put a \placecontent after \starttext
the first chapter will stil have the frame on.

[-- Attachment #1.2: Type: text/html, Size: 1300 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: fancyhdr equivalent
  2007-07-02 12:10           ` Peter I. Hansen
@ 2007-07-02 12:31             ` Wolfgang Schuster
  2007-07-02 13:24               ` Peter I. Hansen
  0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Schuster @ 2007-07-02 12:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> On 7/2/07, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
>
> > 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> > > Thanks, this works for me. One thing though, I would like to turn the
> > > framing off on pages where a chapter begins. I tried
> > > \setuphead[chapter][header=empty], but this just gives
> me
> > > an empty frame.
> > >  Is there a way to selectively turn of backgounds on for example chapter
> > > pages?
> >
> > \setuphead
> >   [chapter]
> >
> [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
> >    header=high]
> >
> > \setupbackgrounds[header][text][frame=on]
> >
> > \starttext
> >
> > \dorecurse{4}
> >   {\chapter{Knuth}
> >    \dorecurse{12}
> >      {\input knuth\par}}
> >
> > \stoptext
>
> Beautifull. One problem arise, if you put a \placecontent after \starttext
> the first chapter will stil have the frame on.

do you mean

\starttext
\placecontent
\chapter{Knuth}
\stoptext

I see only a frame on the first page with the table of contents and
this normal because there is no chapter on this page.

use \completecontent and not \placecontent

if this is not what you mean send a example

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-02 12:31             ` Wolfgang Schuster
@ 2007-07-02 13:24               ` Peter I. Hansen
  2007-07-02 13:40                 ` Wolfgang Schuster
  2007-07-02 13:40                 ` Peter I. Hansen
  0 siblings, 2 replies; 14+ messages in thread
From: Peter I. Hansen @ 2007-07-02 13:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 7/2/07, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
> 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> > On 7/2/07, Wolfgang Schuster
> > <schuster.wolfgang@googlemail.com> wrote:
> >
> > > 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> > > > Thanks, this works for me. One thing though, I would like to turn the
> > > > framing off on pages where a chapter begins. I tried
> > > > \setuphead[chapter][header=empty], but this just gives
> > me
> > > > an empty frame.
> > > >  Is there a way to selectively turn of backgounds on for example chapter
> > > > pages?
> > >
> > > \setuphead
> > >   [chapter]
> > >
> > [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
> > >    header=high]
> > >
> > > \setupbackgrounds[header][text][frame=on]
> > >
> > > \starttext
> > >
> > > \dorecurse{4}
> > >   {\chapter{Knuth}
> > >    \dorecurse{12}
> > >      {\input knuth\par}}
> > >
> > > \stoptext
> >
> > Beautifull. One problem arise, if you put a \placecontent after \starttext
> > the first chapter will stil have the frame on.
>
> do you mean
>
> \starttext
> \placecontent
> \chapter{Knuth}
> \stoptext
>
> I see only a frame on the first page with the table of contents and
> this normal because there is no chapter on this page.
>
> use \completecontent and not \placecontent
>
> if this is not what you mean send a example

\completecontent seems to solve my problem so far... To see  what my
problem was  try out the following example:

\setuplayout                [location=middle,
                                     header=\lineheight,
                                     headerdistance=\lineheight]

\setuppagenumbering [alternative=doublesided,location=]

\setupheadertexts       [section][pagenumber]
                                    [pagenumber][chapter]

\setuphead
 [chapter]
 [%before={\talkingk[force,\dimexpr\headerheight+\headerdistance\relax]},
  header=high]

\setupbackgrounds   [header][text][frame=off,bottomframe=on]

\starttext

\placecontent
%\completecontent

\dorecurse{3}
        {\chapter{Test}
                \dorecurse{250}{talking talking talking }
        }

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-02 13:24               ` Peter I. Hansen
@ 2007-07-02 13:40                 ` Wolfgang Schuster
  2007-07-02 13:40                 ` Peter I. Hansen
  1 sibling, 0 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2007-07-02 13:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/7/2, Peter I. Hansen <peterih@gmail.com>:
>
> \completecontent seems to solve my problem so far... To see  what my
> problem was  try out the following example:
>
> \setuplayout                [location=middle,
>                                      header=\lineheight,
>                                      headerdistance=\lineheight]
>
> \setuppagenumbering [alternative=doublesided,location=]
>
> \setupheadertexts       [section][pagenumber]
>                                     [pagenumber][chapter]
>
> \setuphead
>  [chapter]
>  [%before={\talkingk[force,\dimexpr\headerheight+\headerdistance\relax]},
>   header=high]
>
> \setupbackgrounds   [header][text][frame=off,bottomframe=on]
>
> \starttext
>
> \placecontent
> %\completecontent
>
> \dorecurse{3}
>         {\chapter{Test}
>                 \dorecurse{250}{talking talking talking }
>         }
>
> \stoptext
>

I see a rule on page 1, 2, 4, 6 and 8, no rules are on page 3, 5 and 7.

All of them are correct and what I expect from your setups.
I am correct you don't want the rule on the first page.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: fancyhdr equivalent
  2007-07-02 13:24               ` Peter I. Hansen
  2007-07-02 13:40                 ` Wolfgang Schuster
@ 2007-07-02 13:40                 ` Peter I. Hansen
  2007-07-02 14:12                   ` Wolfgang Schuster
  1 sibling, 1 reply; 14+ messages in thread
From: Peter I. Hansen @ 2007-07-02 13:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2512 bytes --]

On 7/2/07, Peter I. Hansen <peterih@gmail.com> wrote:
>
> On 7/2/07, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
> > 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> > > On 7/2/07, Wolfgang Schuster
> > > <schuster.wolfgang@googlemail.com> wrote:
> > >
> > > > 2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> > > > > Thanks, this works for me. One thing though, I would like to turn
> the
> > > > > framing off on pages where a chapter begins. I tried
> > > > > \setuphead[chapter][header=empty], but this just gives
> > > me
> > > > > an empty frame.
> > > > >  Is there a way to selectively turn of backgounds on for example
> chapter
> > > > > pages?
> > > >
> > > > \setuphead
> > > >   [chapter]
> > > >
> > > [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
> > > >    header=high]
> > > >
> > > > \setupbackgrounds[header][text][frame=on]
> > > >
> > > > \starttext
> > > >
> > > > \dorecurse{4}
> > > >   {\chapter{Knuth}
> > > >    \dorecurse{12}
> > > >      {\input knuth\par}}
> > > >
> > > > \stoptext
> > >
> > > Beautifull. One problem arise, if you put a \placecontent after
> \starttext
> > > the first chapter will stil have the frame on.
> >
> > do you mean
> >
> > \starttext
> > \placecontent
> > \chapter{Knuth}
> > \stoptext
> >
> > I see only a frame on the first page with the table of contents and
> > this normal because there is no chapter on this page.
> >
> > use \completecontent and not \placecontent
> >
> > if this is not what you mean send a example
>
> \completecontent seems to solve my problem so far... To see  what my
> problem was  try out the following example:
>
> \setuplayout                [location=middle,
>                                      header=\lineheight,
>                                      headerdistance=\lineheight]
>
> \setuppagenumbering [alternative=doublesided,location=]
>
> \setupheadertexts       [section][pagenumber]
>                                     [pagenumber][chapter]
>
> \setuphead
> [chapter]
> [%before={\talkingk[force,\dimexpr\headerheight+\headerdistance\relax]},
>   header=high]
>
> \setupbackgrounds   [header][text][frame=off,bottomframe=on]
>
> \starttext
>
> \placecontent
> %\completecontent
>
> \dorecurse{3}
>         {\chapter{Test}
>                 \dorecurse{250}{talking talking talking }
>         }
>
> \stoptext
>

Actually, if I add something before the content, eg.
\subject{Preface}\page[yes] then things go bad again... There is something
about this I can't grasp.

[-- Attachment #1.2: Type: text/html, Size: 4356 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: fancyhdr equivalent
  2007-07-02 13:40                 ` Peter I. Hansen
@ 2007-07-02 14:12                   ` Wolfgang Schuster
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Schuster @ 2007-07-02 14:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/7/2, Peter I. Hansen <peterih@gmail.com>:
> On 7/2/07, Peter I. Hansen <peterih@gmail.com> wrote:
> > On 7/2/07, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
> > > 2007/7/2, Peter I. Hansen <peterih@gmail.com >:
> > > > On 7/2/07, Wolfgang Schuster
> > > > <schuster.wolfgang@googlemail.com> wrote:
> > > >
> > > > > 2007/7/2, Peter I. Hansen < peterih@gmail.com>:
> > > > > > Thanks, this works for me. One thing though, I would like to turn
> the
> > > > > > framing off on pages where a chapter begins. I tried
> > > > > > \setuphead[chapter][header=empty], but this just
> gives
> > > > me
> > > > > > an empty frame.
> > > > > >  Is there a way to selectively turn of backgounds on for example
> chapter
> > > > > > pages?
> > > > >
> > > > > \setuphead
> > > > >   [chapter]
> > > > >
> > > >
> [%before={\blank[force,\dimexpr\headerheight+\headerdistance\relax]},
> > > > >    header=high]
> > > > >
> > > > > \setupbackgrounds[header][text][frame=on]
> > > > >
> > > > > \starttext
> > > > >
> > > > > \dorecurse{4}
> > > > >   {\chapter{Knuth}
> > > > >    \dorecurse{12}
> > > > >      {\input knuth\par}}
> > > > >
> > > > > \stoptext
> > > >
> > > > Beautifull. One problem arise, if you put a \placecontent after
> \starttext
> > > > the first chapter will stil have the frame on.
> > >
> > > do you mean
> > >
> > > \starttext
> > > \placecontent
> > > \chapter{Knuth}
> > > \stoptext
> > >
> > > I see only a frame on the first page with the table of contents and
> > > this normal because there is no chapter on this page.
> > >
> > > use \completecontent and not \placecontent
> > >
> > > if this is not what you mean send a example
> >
> > \completecontent seems to solve my problem so far... To see  what my
> > problem was  try out the following example:
> >
> > \setuplayout                [location=middle,
> >                                      header=\lineheight,
> >
> headerdistance=\lineheight]
> >
> > \setuppagenumbering [alternative=doublesided,location=]
> >
> > \setupheadertexts       [section][pagenumber]
> >                                     [pagenumber][chapter]
> >
> > \setuphead
> > [chapter]
> >
> [%before={\talkingk[force,\dimexpr\headerheight+\headerdistance\relax]},
> >   header=high]
> >
> > \setupbackgrounds
> [header][text][frame=off,bottomframe=on]
> >
> > \starttext
> >
> > \placecontent
> > %\completecontent
> >
> > \dorecurse{3}
> >         {\chapter{Test}
> >                 \dorecurse{250}{talking talking talking }
> >         }
> >
> > \stoptext
> >
>
> Actually, if I add something before the content, eg.
> \subject{Preface}\page[yes] then things go bad again... There is something
> about this I can't grasp.

Can you send the pdf file and explain what is wrong in the output

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2007-07-02 14:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-01 21:16 fancyhdr equivalent Peter I. Hansen
2007-07-01 21:43 ` Aditya Mahajan
2007-07-01 22:58   ` Peter I. Hansen
2007-07-01 23:24     ` Aditya Mahajan
2007-07-02  9:43       ` Peter I. Hansen
2007-07-02 11:04         ` Wolfgang Schuster
2007-07-02 11:18           ` Aditya Mahajan
2007-07-02 12:10           ` Peter I. Hansen
2007-07-02 12:31             ` Wolfgang Schuster
2007-07-02 13:24               ` Peter I. Hansen
2007-07-02 13:40                 ` Wolfgang Schuster
2007-07-02 13:40                 ` Peter I. Hansen
2007-07-02 14:12                   ` Wolfgang Schuster
2007-07-02 11:18 ` Wolfgang Schuster

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