From: Tom Fossen <tom.fossen@xs4all.nl>
Subject: layers and papersize
Date: Mon, 10 Jan 2005 16:45:48 +0100 [thread overview]
Message-ID: <200501101645.48033.tom.fossen@xs4all.nl> (raw)
This is probably a beginners question. While trying to understand the
layer-mechanism I made a drawing which is meant as a background for a
schedule in a magazine. I add the information within this drawing using the
'register' option I found on page 263 of the Metafun manual.
Here is the example in a minimal form:
\starttext
\definelayer[rooster]
\startuseMPgraphic{list}
path p, s ;
p := unitsquare scaled 3cm superellipsed 0.84 ;
s := flex ((2.5cm,3.0cm), (10.0cm,3.0cm), (6.5cm,-0.5cm)) ;
draw p withpen pencircle scaled 5pt withcolor .625white ;
draw s withpen pencircle scaled 3pt withcolor .625white ;
register ("da",2.4cm,2.4cm,(.3cm,2.8cm)) ;
register ("name",5.6cm,0.6cm,(5.4cm,3.5cm)) ;
register ("who",6cm,3cm,(3.4cm,2.8cm)) ;
register("color",1.5cm,0.5cm,(7.6cm,-0.6cm)) ;
\stopuseMPgraphic
\setMPlayer[rooster][da]{\framed
[width=\MPlayerwidth,height=\MPlayerheight,align=right] {pos 1}}
\setPlayer[rooster][name]{\framed
[ [width=\MPlayerwidth,height=\MPlayerheight] {pos 2}}
\setMPlayer[rooster][who]{\framed
[width=\MPlayerwidth,height=\MPlayerheight,align=right] {pos 3}}
\setMPlayer[rooster][color]{\framed
[width=\MPlayerwidth,height=\MPlayerheight] {pos 4}}
\getMPlayer[rooster] {\useMPgraphic{list}}
\stoptext
This works for the standard papersize. But I want this to work in a magazine
on A5. So I add:
\setuppapersize [A5][A4]
\setuparranging [2UP,rotated,doublesided]
\setuppagenumbering[alternative=doublesided]
\setuplayout[margin=0pt,width=middle]
followed by the fragment above.
But now all of the texts ("pos x") end up somewhere in the left corner of the
page. Only the drawing is on its right place. I tried to experiment with
adding 'position= on' or 'off' to the 'definelayer' command. No difference.
Where are the misunderstandings on my side?
tom fossen
next reply other threads:[~2005-01-10 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-10 15:45 Tom Fossen [this message]
2005-01-10 18:11 ` Hans Hagen
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=200501101645.48033.tom.fossen@xs4all.nl \
--to=tom.fossen@xs4all.nl \
--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).