* Placing text in the margin of a header or the top right corner of a page @ 2011-11-23 4:01 Matthias Weber 2011-11-23 4:30 ` Christian 0 siblings, 1 reply; 5+ messages in thread From: Matthias Weber @ 2011-11-23 4:01 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Placing text in the margin of a header or the top right corner of a page 2011-11-23 4:01 Placing text in the margin of a header or the top right corner of a page Matthias Weber @ 2011-11-23 4:30 ` Christian 2011-11-23 4:54 ` Matthias Weber 0 siblings, 1 reply; 5+ messages in thread From: Christian @ 2011-11-23 4:30 UTC (permalink / raw) To: 'mailing list for ConTeXt users' > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Placing text in the margin of a header or the top right corner of a page 2011-11-23 4:30 ` Christian @ 2011-11-23 4:54 ` Matthias Weber 2011-11-23 5:11 ` Christian 0 siblings, 1 reply; 5+ messages in thread From: Matthias Weber @ 2011-11-23 4:54 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Placing text in the margin of a header or the top right corner of a page 2011-11-23 4:54 ` Matthias Weber @ 2011-11-23 5:11 ` Christian 2011-11-23 9:29 ` Andreas Harder 0 siblings, 1 reply; 5+ messages in thread From: Christian @ 2011-11-23 5:11 UTC (permalink / raw) To: 'mailing list for ConTeXt users' 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-bounces@ntg.nl [mailto:ntg-context-bounces@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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Placing text in the margin of a header or the top right corner of a page 2011-11-23 5:11 ` Christian @ 2011-11-23 9:29 ` Andreas Harder 0 siblings, 0 replies; 5+ messages in thread From: Andreas Harder @ 2011-11-23 9:29 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 306 bytes --] 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. [-- Attachment #2: layerpresets.tex --] [-- Type: application/octet-stream, Size: 1640 bytes --] % \setuppapersize[A4][A4,oversized] \showframe[text] \setuplayout [location=middle,width=middle,height=middle, header=0cm,footer=0cm, backspace=5cm,topspace=3cm] \definelayer [frame] [width=\paperwidth,height=\paperheight,repeat=yes] \setupframed [width=\backspace,height=\topspace, background=color,backgroundcolor=gray:2,foregroundstyle=mono] %% top \setlayerframed [frame] [preset=lefttop] [align={right,top}] {preset=lefttop\par \type{align={right,top}}} \setlayerframed [frame] [preset=middletop] [align={middle,top}] {preset=middletop\par \type{align={middle,top}}} \setlayerframed [frame] [preset=righttop] [align={middle,left}] {preset=righttop\par \type{align={middle,left}}} %% middle \setlayerframed [frame] [preset=middleleft] [align={right,middle}] {preset=middleleft\par \type{align={right,middle}}} \setlayerframed [frame] [preset=middle] [align={middle,middle}] {preset=middle\par \type{align={middle,middle}}} \setlayerframed [frame] [preset=middleright] [align={left,middle}] {preset=middleright\par \type{align={left,middle}}} %% bottom \setlayerframed [frame] [preset=leftbottom] [align={right,low}] {preset=leftbottom\par \type{align={right,low}}} \setlayerframed [frame] [preset=middlebottom] [align={middle,low}] {preset=middlebottom\par \type{align={middle,low}}} \setlayerframed [frame] [preset=rightbottom] [align={left,low}] {preset=rightbottom\par \type{align={left,low}}} \setupbackgrounds[page][background=frame] \starttext % \page[emtpy] first page \page second page \stoptext %%% Local Variables: %%% mode: context %%% TeX-master: t %%% End: [-- Attachment #3: Type: text/plain, Size: 22 bytes --] Best wishes Andreas [-- Attachment #4: Type: text/plain, Size: 485 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-23 9:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-11-23 4:01 Placing text in the margin of a header or the top right corner of a page Matthias Weber 2011-11-23 4:30 ` Christian 2011-11-23 4:54 ` Matthias Weber 2011-11-23 5:11 ` Christian 2011-11-23 9:29 ` Andreas Harder
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).