Two Problems: Colored Chapter and Footnote positioning
Hello, I'm facing two problems. The first one has to do with the fact that if I use \color[darkblue]{\chapter{Capitulo 1}} the line with \setuphead[chapter][header=empty] seems to be ignored because the chapter page gets the header too. I'v attached an example in the file "capitulo-cores.tex". The second problem has to do with the fact that in the attached file "footnote-posicao.tex" I changed the layout of the page, so that I could have a bigger right margin. The problem is that I would like to have the page number centered on "the page" and note on the new dimensions of the text area (don't know if I' been clear but I think you will understand if you look at the attached file). In fact I have a third problem that is the fact that the page number is repeated. I don't want to remove the line \setupfootertexts[][\setups{t_footer}] because I want the footer in 10pt. Thank you! Miguel Queirós ----------------------------------------------------------- \setupcolors[state=start] \setuphead[chapter][header=empty] \setupheadertexts[][chapter] \starttext \completecontent \color[darkblue]{\chapter{Capitulo 1}} % \chapter{\color[darkblue]{Capitulo 1}} \page Nada. \chapter{Capitulo 2} \page Nada. \chapter{Capitulo 3} \page Nada. \stoptext -----------------------------------------------------------
On 4/18/06, Miguel Queiros wrote:
Hello,
I'm facing two problems. The first one has to do with the fact that if I use \color[darkblue]{\chapter{Capitulo 1}} the line with \setuphead[chapter][header=empty] seems to be ignored because the chapter page gets the header too. I'v attached an example in the file "capitulo-cores.tex".
Use \bgroup \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \egroup or \start \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \stop instead. Mojca
\bgroup \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \egroup
or
\start \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \stop
I'v tried both you solutions but I still get an header on each chapter page. I even tested it with \setuphead[chapter][header=empty] inside \bgroup ... \egroup or \start ... \stop with no luck. I tested it with the following file... ------------------------------------------------ \setupcolors[state=start] \setuphead[chapter][header=empty] \setupheadertexts[][chapter] \starttext \completecontent % \bgroup % \setuphead[chapter][color=darkblue] % \setuphead[chapter][header=empty] % \setuphead[chapter][color=darkblue] % \chapter{Aumento de produtividade com macros} %\egroup \start \setuphead[chapter][color=darkblue] % \setuphead[chapter][header=empty] \setupheadertexts[][chapter] \chapter{Capitulo 1} \stop \page teste \chapter{Capitulo 2} \page teste \stoptext
Miguel Queiros wrote:
\bgroup \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \egroup
or
\start \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \stop
I'v tried both you solutions but I still get an header on each chapter page. I even tested it with \setuphead[chapter][header=empty] inside \bgroup ... \egroup or \start ... \stop with no luck.
I tested it with the following file... ------------------------------------------------ \setupcolors[state=start]
\setuphead[chapter][header=empty] \setupheadertexts[][chapter]
\starttext
\completecontent
% \bgroup % \setuphead[chapter][color=darkblue] % \setuphead[chapter][header=empty] % \setuphead[chapter][color=darkblue] % \chapter{Aumento de produtividade com macros} %\egroup
\start \setuphead[chapter][color=darkblue] % \setuphead[chapter][header=empty] \setupheadertexts[][chapter] \chapter{Capitulo 1} \stop
this is because the setupheadertext is forgotten by the time that the page is built, remove the \start/stop and it will work 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 -----------------------------------------------------------------
this is because the setupheadertext is forgotten by the time that the page is built, remove the \start/stop and it will work
Thanks! It worked. As a reminder I will try to recall that as you said before on the mailing lists many commands have color options. I'v added a small example to the wiki. Miguel Queirós
Mojca Miklavec wrote:
On 4/18/06, Miguel Queiros wrote:
Hello,
I'm facing two problems. The first one has to do with the fact that if I use \color[darkblue]{\chapter{Capitulo 1}} the line with \setuphead[chapter][header=empty] seems to be ignored because the chapter page gets the header too. I'v attached an example in the file "capitulo-cores.tex".
Use
\bgroup \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \egroup
or
\start \setuphead[chapter][color=darkblue] \chapter{Capitulo 1} \stop
or \definehead[alternativechapter][chapter] \setuphead[alternativechapter][color=darkblue] .... \alternativechapter{Capitulo N} ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 4/18/06, Miguel Queiros wrote:
The second problem has to do with the fact that in the attached file "footnote-posicao.tex" I changed the layout of the page, so that I could have a bigger right margin. The problem is that I would like to have the page number centered on "the page" and note on the new dimensions of the text area (don't know if I' been clear but I think you will understand if you look at the attached file). In fact I have a third problem that is the fact that the page number is repeated. I don't want to remove the line \setupfootertexts[][\setups{t_footer}] because I want the footer in 10pt.
This doesn't answer your original question, but why not \setuppagenumbering[location={footer,right},style=\tfx] instead of lengthy setups? (Btw: you should better use \switchtobodyfont rather than \setupbodyfont in case you need to change font size.) The following solution might not be the most elegant one, but I use similar approach for exact positioning: \setuppagenumbering[location=] \definelayer [mypagenumber] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=mypagenumber] \setlayerframed [mypagenumber] [voffset=\dimexpr(\paperheight-\makeupheight-\footerheight), preset=leftbottom] [width=\paperwidth,frame=off] {\tfx\pagenumber} Mojca
This doesn't answer your original question, but why not \setuppagenumbering[location={footer,right},style=\tfx] instead of lengthy setups?
I will take a look at your sugestion. Thanks. As far as I recall page numbering isn't working with setups because I get two page numbers on every page.
(Btw: you should better use \switchtobodyfont rather than \setupbodyfont in case you need to change font size.)
Ok!
The following solution might not be the most elegant one, but I use similar approach for exact positioning:
\setuppagenumbering[location=] \definelayer [mypagenumber] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=mypagenumber] \setlayerframed [mypagenumber] [voffset=\dimexpr(\paperheight-\makeupheight-\footerheight), preset=leftbottom] [width=\paperwidth,frame=off] {\tfx\pagenumber}
I'v tried it and I get a page number but only on one page, not all the document. Should I be taking a look at anything else to make it work an every page ? Sorry for my "newbie" questions... Thanks! Miguel Queirós
Miguel Queiros wrote:
This doesn't answer your original question, but why not \setuppagenumbering[location={footer,right},style=\tfx] instead of lengthy setups?
I will take a look at your sugestion. Thanks. As far as I recall page numbering isn't working with setups because I get two page numbers on every page.
(Btw: you should better use \switchtobodyfont rather than \setupbodyfont in case you need to change font size.)
Ok!
The following solution might not be the most elegant one, but I use similar approach for exact positioning:
\setuppagenumbering[location=] \definelayer [mypagenumber] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=mypagenumber] \setlayerframed [mypagenumber] [voffset=\dimexpr(\paperheight-\makeupheight-\footerheight), preset=leftbottom] [width=\paperwidth,frame=off] {\tfx\pagenumber}
I'v tried it and I get a page number but only on one page, not all the document. Should I be taking a look at anything else to make it work an every page ? Sorry for my "newbie" questions...
you need to set the layer each page \setuppagenumbering[location=] \definelayer [mypagenumber] [width=\paperwidth, height=\paperheight] \defineoverlay [mypagenumber] [\setups{mypagenumber}] \setupbackgrounds [page] [background=mypagenumber] \startsetups mypagenumber \setlayerframed [mypagenumber] [voffset=\dimexpr\paperheight-\makeupheight-\footerheight\relax, preset=leftbottom] [width=\paperwidth,frame=off] {\tfx\pagenumber} \tightlayer[mypagenumber] \stopsetups \starttext \dorecurse{4}{test \page} \stoptext -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
I'v tried it and I get a page number but only on one page, not all the document. Should I be taking a look at anything else to make it work an every page ? Sorry for my "newbie" questions...
you need to set the layer each page
[...] It works great. Thanks. I will be adding it to the wiki, as soon as I have the time. Miguel Queirós
participants (3)
-
Hans Hagen
-
Miguel Queiros
-
Mojca Miklavec