* layers and papersize
@ 2005-01-10 15:45 Tom Fossen
2005-01-10 18:11 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Tom Fossen @ 2005-01-10 15:45 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: layers and papersize
2005-01-10 15:45 layers and papersize Tom Fossen
@ 2005-01-10 18:11 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2005-01-10 18:11 UTC (permalink / raw)
Tom Fossen wrote:
> 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]
this is the problem: the last run the pages are reshuffled and the
graphics/twopassdata no longer matches
texexec --arrange --pdf thatfile.tex
may work, else do the page imposition in a separate run (can be doen with texexec)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-10 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 15:45 layers and papersize Tom Fossen
2005-01-10 18:11 ` Hans Hagen
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).