layers and papersize
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
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Tom Fossen