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
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
On 7/1/07, Aditya Mahajan
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?
On Mon, 2 Jul 2007, Peter I. Hansen wrote:
On 7/1/07, Aditya Mahajan
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
On 7/2/07, Aditya Mahajan
On Mon, 2 Jul 2007, Peter I. Hansen wrote:
On 7/1/07, Aditya Mahajan
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?
2007/7/2, Peter I. Hansen
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
On Mon, 2 Jul 2007, Wolfgang Schuster wrote:
2007/7/2, Peter I. Hansen
: 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
On 7/2/07, Wolfgang Schuster
2007/7/2, Peter I. Hansen
: 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.
2007/7/2, Peter I. Hansen
On 7/2/07, Wolfgang Schuster
wrote: 2007/7/2, Peter I. Hansen
: 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
On 7/2/07, Wolfgang Schuster
2007/7/2, Peter I. Hansen
: On 7/2/07, Wolfgang Schuster
wrote: 2007/7/2, Peter I. Hansen
: 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
2007/7/2, Peter I. Hansen
\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
On 7/2/07, Peter I. Hansen
2007/7/2, Peter I. Hansen
: On 7/2/07, Wolfgang Schuster
wrote: 2007/7/2, Peter I. Hansen
: Thanks, this works for me. One thing though, I would like to turn
On 7/2/07, Wolfgang Schuster
wrote: 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.
2007/7/2, Peter I. Hansen
On 7/2/07, Wolfgang Schuster
wrote: 2007/7/2, Peter I. Hansen
: On 7/2/07, 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
On 7/2/07, Peter I. Hansen
wrote: 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
2007/7/1, Peter I. Hansen
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
participants (3)
-
Aditya Mahajan
-
Peter I. Hansen
-
Wolfgang Schuster