ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Andreas Harder <aharder@uni-koblenz.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Placing text in the margin of a header or the	top	right corner of a page
Date: Wed, 23 Nov 2011 10:29:16 +0100	[thread overview]
Message-ID: <E6209F5C-E20C-4F4F-BFE0-44A90AB42965@uni-koblenz.de> (raw)
In-Reply-To: <004d01cca99e$5f22b9e0$1d682da0$@gmx.de>

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

      reply	other threads:[~2011-11-23  9:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  4:01 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E6209F5C-E20C-4F4F-BFE0-44A90AB42965@uni-koblenz.de \
    --to=aharder@uni-koblenz.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).