Dear all, somehow the following won't produce any PDF output: --- \definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm] \starttext \setlayer[mylayer][preset=middle]{Hello world!} \stoptext --- Any ideas? Oliver
On Tue, Jul 8, 2008 at 2:17 PM, Oliver Buerschaper
Dear all,
somehow the following won't produce any PDF output:
--- \definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm]
\starttext
\setlayer[mylayer][preset=middle]{Hello world!}
\stoptext ---
Any ideas?
\flushlayer{mylayer} or \setupbackgrounds[text|page|...][background=mylayer] Wolfgang
On Tue, Jul 8, 2008 at 2:24 PM, Wolfgang Schuster
On Tue, Jul 8, 2008 at 2:17 PM, Oliver Buerschaper
wrote: Dear all,
somehow the following won't produce any PDF output:
--- \definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm]
\starttext
\setlayer[mylayer][preset=middle]{Hello world!}
\stoptext ---
Any ideas?
\flushlayer{mylayer}
\flushlayer[mylayer]
or
\setupbackgrounds[text|page|...][background=mylayer]
Wolfgang
On Tue, Jul 8, 2008 at 2:54 PM, Oliver Buerschaper
\flushlayer[mylayer]
Yes, that's it! Thanks a lot …
Do you perhaps also know how to draw a frame around the layer boundary? The command \setlayerframed only seems to encapsulate the actual content with a frame …
Can you be more concrete, what do you mean by boundry oround the layer. Wolfgang
Do you perhaps also know how to draw a frame around the layer boundary? The command \setlayerframed only seems to encapsulate the actual content with a frame …
Can you be more concrete, what do you mean by boundry oround the layer.
I'm thinking of a frame that visualizes the actual drawable rectangle of the layer … that is, for \definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm] I would like a frame to be drawn around the box whose dimensions and location on the page are specified by x, y, height and width. I'd also be fine if this area could be shaded with some background colour. With \setlayerframed I seem to only get a frame which fits the actual content snugly, e.g. if I draw the text "Hello world" into the layer then a small frame will be drawn around this text only and not around the entire layer box … See what I mean? Oliver
On Tue, Jul 8, 2008 at 3:19 PM, Oliver Buerschaper
Do you perhaps also know how to draw a frame around the layer boundary? The command \setlayerframed only seems to encapsulate the actual content with a frame …
Can you be more concrete, what do you mean by boundry oround the layer.
I'm thinking of a frame that visualizes the actual drawable rectangle of the layer … that is, for
\definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm]
I would like a frame to be drawn around the box whose dimensions and location on the page are specified by x, y, height and width. I'd also be fine if this area could be shaded with some background colour.
With \setlayerframed I seem to only get a frame which fits the actual content snugly, e.g. if I draw the text "Hello world" into the layer then a small frame will be drawn around this text only and not around the entire layer box …
Set the values with \setlayer and not with \definelayer.
See what I mean?
\definelayer [mylayer] \starttext \setlayerframed [mylayer] [x=78mm, y=3mm, height=43.5mm, width=68mm] {framed layer} \flushlayer[mylayer] \stoptext Wolfgang
Hello, Am Dienstag, 8. Juli 2008 schrieb Wolfgang Schuster:
Set the values with \setlayer and not with \definelayer.
But then you can't use 'preset=middle' cause this relies on the actual dimensions of the layer. So if you wanna use placements relative to the right or bottom side of the layer you have to provide the position and dimensions with \definelayer. Regards Uwe
On Tue, Jul 8, 2008 at 2:17 PM, Oliver Buerschaper
Dear all,
somehow the following won't produce any PDF output:
--- \definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm]
\starttext
\setlayer[mylayer][preset=middle]{Hello world!}
\stoptext ---
Any ideas?
Oliver
You have to invoke the OTR. You could use \startstandardmakeup \stopstandardmakeup or \page[empty] or \dontleavehmode or \null or ... Wolfgang
Hello, Am Dienstag, 8. Juli 2008 schrieb Wolfgang Schuster:
On Tue, Jul 8, 2008 at 2:17 PM, Oliver Buerschaper
--- \definelayer [mylayer] [x=78mm, y=3mm, height=43.5mm, width=128mm]
\starttext
\setlayer[mylayer][preset=middle]{Hello world!}
\stoptext ---
The layer is now only defined and has some content, but is not related to any page element. So you has to define it as the background of some pageelement: \setupbackgrounds[page][background=mylayer] or you have to "flush" it (but I don't know what this is supposed to do, maybe it's just another way of calling the OTR -- see below) \flushlayer[mylayer]
You have to invoke the OTR.
OTR = Output Routine Without invoking the OTR nothing is generated. (but you can leave out \starttext \stoptext -- why?)
You could use
\startstandardmakeup \stopstandardmakeup
or
\page[empty]
Both of these produce an empty page (without pagenumber) and the layer at the intended position.
or
\dontleavehmode
or
\null
or
These two variants produce pages with the standard layout (in this easy setup this consists only of the page number at the top). The last alternative I know of: instead of defining the layer as background for the page, you can just call \flushlayer[mylayer] But this positions the layer relative to the textarea (and not the pagearea) and produces a standard layout with pagenumber, too, if you don't use standardmakeup. This has helped, to make some concepts regarding layers clear to me;-) Regards Uwe
participants (3)
-
Oliver Buerschaper
-
Uwe Koloska
-
Wolfgang Schuster