ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Two Problems: Colored Chapter and Footnote positioning
@ 2006-04-17 22:38 Miguel Queiros
  2006-04-17 23:30 ` Mojca Miklavec
  2006-04-18  0:21 ` Mojca Miklavec
  0 siblings, 2 replies; 10+ messages in thread
From: Miguel Queiros @ 2006-04-17 22:38 UTC (permalink / raw)


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

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]\r 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
-----------------------------------------------------------

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: capitulo-cores.tex --]
[-- Type: text/x-tex; name=capitulo-cores.tex; charset=UTF-8, Size: 422 bytes --]

% Problema
% No caso da capitulo em azul a linha \setuphead[chapter][header=empty] é ignorada.

\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

[-- Attachment #3: footnote-posicao.tex --]
[-- Type: text/x-tex, Size: 591 bytes --]

% Dois problemas:
% - Dois numeros de pagina
% - Centrar o numero de pagina

\setuplayout[
% leftmargin=5.6cm,leftmargindistance=0.4cm,
                   rightmargin=5.6cm,rightmargindistance=1.0cm,
                   topspace=1.3cm,headerdistance=0.2cm,header=1.5cm,
                   footerdistance=0.2cm, footer=1.3cm,
                   height=middle, width=10.4cm]

\showframe

\setupfootertexts[][\setups{t_footer}]

\startsetups[t_footer]
  \setupbodyfont[10pt]
  \rightaligned{\pagenumber}
\stopsetups

\setuppagenumbering[location={footer}]

\starttext

\page
Teste.

\stoptext



[-- Attachment #4: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-17 22:38 Two Problems: Colored Chapter and Footnote positioning Miguel Queiros
@ 2006-04-17 23:30 ` Mojca Miklavec
  2006-04-18  0:51   ` Miguel Queiros
  2006-04-18  6:45   ` Hans Hagen
  2006-04-18  0:21 ` Mojca Miklavec
  1 sibling, 2 replies; 10+ messages in thread
From: Mojca Miklavec @ 2006-04-17 23:30 UTC (permalink / raw)


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

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-17 22:38 Two Problems: Colored Chapter and Footnote positioning Miguel Queiros
  2006-04-17 23:30 ` Mojca Miklavec
@ 2006-04-18  0:21 ` Mojca Miklavec
  2006-04-18 16:18   ` Miguel Queiros
  1 sibling, 1 reply; 10+ messages in thread
From: Mojca Miklavec @ 2006-04-18  0:21 UTC (permalink / raw)


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

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-17 23:30 ` Mojca Miklavec
@ 2006-04-18  0:51   ` Miguel Queiros
  2006-04-18  7:50     ` Hans Hagen
  2006-04-18  6:45   ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Miguel Queiros @ 2006-04-18  0:51 UTC (permalink / raw)



>     \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

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-17 23:30 ` Mojca Miklavec
  2006-04-18  0:51   ` Miguel Queiros
@ 2006-04-18  6:45   ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2006-04-18  6:45 UTC (permalink / raw)


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

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-18  0:51   ` Miguel Queiros
@ 2006-04-18  7:50     ` Hans Hagen
  2006-04-18 16:07       ` Miguel Queiros
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2006-04-18  7:50 UTC (permalink / raw)


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

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-18  7:50     ` Hans Hagen
@ 2006-04-18 16:07       ` Miguel Queiros
  0 siblings, 0 replies; 10+ messages in thread
From: Miguel Queiros @ 2006-04-18 16:07 UTC (permalink / raw)


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



_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-18  0:21 ` Mojca Miklavec
@ 2006-04-18 16:18   ` Miguel Queiros
  2006-04-18 19:55     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Miguel Queiros @ 2006-04-18 16:18 UTC (permalink / raw)



> 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


_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-18 16:18   ` Miguel Queiros
@ 2006-04-18 19:55     ` Hans Hagen
  2006-04-19 21:07       ` Miguel Queiros
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2006-04-18 19:55 UTC (permalink / raw)


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

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

* Re: Two Problems: Colored Chapter and Footnote positioning
  2006-04-18 19:55     ` Hans Hagen
@ 2006-04-19 21:07       ` Miguel Queiros
  0 siblings, 0 replies; 10+ messages in thread
From: Miguel Queiros @ 2006-04-19 21:07 UTC (permalink / raw)


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


_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

end of thread, other threads:[~2006-04-19 21:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-17 22:38 Two Problems: Colored Chapter and Footnote positioning Miguel Queiros
2006-04-17 23:30 ` Mojca Miklavec
2006-04-18  0:51   ` Miguel Queiros
2006-04-18  7:50     ` Hans Hagen
2006-04-18 16:07       ` Miguel Queiros
2006-04-18  6:45   ` Hans Hagen
2006-04-18  0:21 ` Mojca Miklavec
2006-04-18 16:18   ` Miguel Queiros
2006-04-18 19:55     ` Hans Hagen
2006-04-19 21:07       ` Miguel Queiros

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