... Thanks again.
On Tue, 15 Jan 2013 11:09:48 +0100, Wolfgang Schuster
\setupbodyfont[30pt]
\starttext
A
\definelayer [beforetext][width=\overlaywidth,height=\overlayheight] \defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}]
\startsetups[beforetext] \setlayer[beforetext][preset=righttop]{\framed[width=2in]{BEFORE}} \stopsetups
\startTEXpage[background={foreground,beforetext}] \externalfigure[cow][width=30cm] \stopTEXpage
Z
\stoptext
A similar example is also on the wiki: http://wiki.contextgarden.net/Layers#Place_labels_on_pictures
Yes, I started altering it... But I wans't sure abou relation layers vs. overlays vs. setups. I'd need also to add some dynamically generated content, something like \pagenumber in the wiki example, but to be generated by Lua. So I extended your example: ---- \setupbodyfont[30pt] \starttext A \definelayer [beforetext][width=\overlaywidth,height=\overlayheight] \defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}] \startsetups[beforetext] \setlayer[beforetext][preset=righttop]{\framed[width=2in]{\directlua{context(userdata.LPr.text)}}} \stopsetups \startTEXpage[background={foreground,beforetext}] \startluacode userdata = userdata or {} userdata.LPr = userdata.LPr or {} userdata.LPr.text = "BEF" context.externalfigure({"cow"},{width="30cm"}) \stopluacode \stopTEXpage Z \stoptext ---- I believe I used a proper way; if not so, please correct "bad places". (Finally: I'd like to achieve a Lua function which will copy all pages of a .pdf file, keeping size of each page, and adding a customizable string with page-in-the-pdf number (with default value "<page-i>/<n-pages>"), being placed to the right top corner of the i-th page. All to be provided by Lua.) Thanks again. Best regards, Lukas
Wolfgang
-- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038