From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: wrong positioning of MP graphic in layer
Date: Mon, 7 Oct 2013 19:16:45 +0200 [thread overview]
Message-ID: <CAG5iGsAiuMc3VSscka_n4rP0yQZnQ4L_0ZHCcrDXPn7gmNUCWw@mail.gmail.com> (raw)
In-Reply-To: <5252D9A7.7090201@gmx.es>
[-- Attachment #1.1: Type: text/plain, Size: 1932 bytes --]
On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez <oinos@gmx.es> wrote:
> Dear list,
>
> I have the following sample:
>
> \definelayer[wrongpositioned][x=0mm, y=0mm, hoffset=0mm,
> voffset=48mm, state=start]
> \setuplayer[wrongpositioned]{\startMPcode draw
> (0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
> \setupbackgrounds[page][background={wrongpositioned}]
> \starttext
> \input knuth
> \stoptext
>
> No matter what x, y, hoffset, voffset, location or corner, the MP
> graphic is located where the page margins start.
>
> Sorry for the so basic question, but what is wrong there?
>
> Besides that, I don’t understand how positioning in layers work. I have
> read the wiki, but I don’t get it (geometry isn’t my strength).
>
> x, y, hoffset and voffset are fine. But location and corner are
> mysterious to me. Changing them gave me no clue of what they are.
>
> The four mentioned options set a point in the paper. The corner could be
> the point of the graphic or text that would be set in the previously
> defined point in the paper.
>
> Well, if this isn’t wrong, what can location be?
>
> Sorry, I know it‘s my lack of geometrical knowledge.
>
> Could anyone be so kind to explain me what location and corner mean in
> layers?
>
> Many thanks for your help,
>
>
You can start from here
\setuppapersize[A4][A3]
\setuplayout[location=middle]
\showframe %showlayout
\definelayer[Page]
\setuplayer[Page][width=\paperwidth,height=\paperheight]
\setlayer[Page]{\startMPcode
draw (0mm,0mm)--(PaperWidth,PaperHeight) withpen pencircle scaled 2pt
withcolor red;
draw (0mm,PaperHeight)--(PaperWidth,0mm) withpen pencircle scaled 2pt
withcolor blue;
\stopMPcode}
\setupbackgrounds[page][background={Page}]
\starttext
\input knuth
\stoptext
See also
http://wiki.contextgarden.net/Layers
--
luigi
[-- Attachment #1.2: Type: text/html, Size: 2571 bytes --]
[-- Attachment #2: 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
___________________________________________________________________________________
next prev parent reply other threads:[~2013-10-07 17:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 15:56 Pablo Rodríguez
2013-10-07 17:16 ` luigi scarso [this message]
2013-10-07 20:04 ` Pablo Rodríguez
2013-10-07 20:48 ` Hans Hagen
2013-10-08 15:21 ` Pablo Rodríguez
2013-10-07 21:01 ` luigi scarso
2013-10-08 15:29 ` Pablo Rodríguez
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=CAG5iGsAiuMc3VSscka_n4rP0yQZnQ4L_0ZHCcrDXPn7gmNUCWw@mail.gmail.com \
--to=luigi.scarso@gmail.com \
--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).