Re: [NTG-context] Placing text in the margin of a header or the top right corner of a page

2011-11-23 Thread Andreas Harder

On 23.11.2011, at 06:11, Christian wrote:

> I think I see what you mean. It disappeared after I tossed the box 1mm to the 
> right with adjusting the x position:
> change
> x=180mm
> to
> x=181mm
> 
> Is that it?

Hi,

there are already presets and \setlayerframed. See my attached example.



layerpresets.tex
Description: Binary data


Best wishes
Andreas___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Christian
I think I see what you mean. It disappeared after I tossed the box 1mm to the 
right with adjusting the x position:
change
x=180mm
to
x=181mm

Is that it?

> -Ursprüngliche Nachricht-
> Von: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] Im
> Auftrag von Matthias Weber
> Gesendet: Mittwoch, 23. November 2011 05:55
> An: mailing list for ConTeXt users
> Betreff: Re: [NTG-context] Placing text in the margin of a header or the top
> right corner of a page
> 
> Fascinating. Thanks a lot. That is more than I hoped for, and was easy to
> adapt to what I wanted.
> 
> One small issue: There is a tiny gap between the black layer box and the right
> margin (in white) that doesn't even disappear when I increase hoffset.
> Any chance to make that disappear, too?
> 
> Thanks again -
> 
> Matthias
> 
> 
> On Nov 22, 2011, at 11:30 PM, Christian wrote:
> 
> >> Dear All,
> >>
> >> I am trying to place a framed text in the top right corner of each
> >> page of a screen document and it looks like (cont-eni)  some
> >> invocation of \setupheadertexts might do the job. Unfortunately, I
> >> have only been able to place my text in the margin of the body of the
> page, using \margintext.
> >> Ideally, I would like to have the framed text box flush with the top
> >> and right edge of a page, but any approximate solution or a pointer
> >> to some document to read (that could educate me) will be much
> appreciated.
> >
> > Smells like Layers to me. Try this, for starters:
> >
> > \definelayer[mybg][x=180mm, y=0mm,width=3cm,
> height=3cm,repeat=yes]
> > \setlayer[mybg][hoffset=0cm, voffset=0cm]{\framed[frame=on,
> width=3cm,
> >
> height=2cm,background=color,backgroundcolor=black,foregroundcolor=whit
> > e]{LAYER}} \setupbackgrounds[page][background=mybg]
> > \starttext
> > Test
> > \page
> > Test1
> > \page
> > Test2
> > \stoptext
> >
> > More info here:
> > http://wiki.contextgarden.net/layers
> >
> > Hope that helps :)
> >
> >
> __
> 
> > _ 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  :
> > http://foundry.supelec.fr/projects/contextrev/
> > wiki : http://contextgarden.net
> >
> __
> 
> > _
> 
> __
> _
> 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  :
> http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> __
> _

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Matthias Weber
Fascinating. Thanks a lot. That is more than I hoped for, and was easy to adapt 
to what I wanted. 

One small issue: There is a tiny gap between the black layer box and the right 
margin (in white) that doesn't even disappear when I increase hoffset.
Any chance to make that disappear, too?

Thanks again -

Matthias


On Nov 22, 2011, at 11:30 PM, Christian wrote:

>> Dear All,
>> 
>> I am trying to place a framed text in the top right corner of each page of a
>> screen document and it looks like (cont-eni)  some invocation of
>> \setupheadertexts might do the job. Unfortunately, I have only been able to
>> place my text in the margin of the body of the page, using \margintext.
>> Ideally, I would like to have the framed text box flush with the top and 
>> right
>> edge of a page, but any approximate solution or a pointer to some document
>> to read (that could educate me) will be much appreciated.
> 
> Smells like Layers to me. Try this, for starters:
> 
> \definelayer[mybg][x=180mm, y=0mm,width=3cm, height=3cm,repeat=yes]
> \setlayer[mybg][hoffset=0cm, voffset=0cm]{\framed[frame=on, width=3cm, 
> height=2cm,background=color,backgroundcolor=black,foregroundcolor=white]{LAYER}}
> \setupbackgrounds[page][background=mybg]
> \starttext
> Test
> \page
> Test1
> \page
> Test2
> \stoptext
> 
> More info here:
> http://wiki.contextgarden.net/layers
> 
> Hope that helps :)
> 
> ___
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Christian
> Dear All,
> 
> I am trying to place a framed text in the top right corner of each page of a
> screen document and it looks like (cont-eni)  some invocation of
> \setupheadertexts might do the job. Unfortunately, I have only been able to
> place my text in the margin of the body of the page, using \margintext.
> Ideally, I would like to have the framed text box flush with the top and right
> edge of a page, but any approximate solution or a pointer to some document
> to read (that could educate me) will be much appreciated.

Smells like Layers to me. Try this, for starters:

\definelayer[mybg][x=180mm, y=0mm,width=3cm, height=3cm,repeat=yes]
\setlayer[mybg][hoffset=0cm, voffset=0cm]{\framed[frame=on, width=3cm, 
height=2cm,background=color,backgroundcolor=black,foregroundcolor=white]{LAYER}}
\setupbackgrounds[page][background=mybg]
\starttext
Test
\page
Test1
\page
Test2
\stoptext

More info here:
http://wiki.contextgarden.net/layers

Hope that helps :)

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Placing text in the margin of a header or the top right corner of a page

2011-11-22 Thread Matthias Weber
Dear All,

I am trying to place a framed text in the top right corner of each page of a 
screen document and it looks like (cont-eni)  some
invocation of \setupheadertexts might do the job. Unfortunately, I have only 
been able to place my text in the margin of the body of the page,
using \margintext. Ideally, I would like to have the framed text box flush with 
the top and right edge of a page, but any approximate solution or a pointer
to some document to read (that could educate me) will be much appreciated.

Thanks,

Matthias



___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___