Re: [NTG-context] overlay page background missing
On 11/2/06, Paul Jones wrote:
You gave me hope, but it was dashed upon further experimentation.
If everything else fails, here's another idea about what you can do in such cases (or better: what I do when I have no better idea how to tell to TeX where exactly to place things): % "draw \sometxt{forever} withcolor red" is broken at the moment, % but used to/should(?) work otherwise \startuniqueMPgraphic{forever} draw \sometxt{\color[red]{forever}} scaled 15 rotated 30 shifted (-1cm,8cm); setbounds currentpicture to unitsquare xyscaled (OverlayWidth,OverlayHeight); \stopuniqueMPgraphic \defineoverlay[overlay forever][{\uniqueMPgraphic{forever}}] \setupbackgrounds[page][background=overlay forever] Hope that helps, Mojca
So it looks like the problem boils down to this:
The overlay with a layer inside it displays fine when used in the
framed background.
\framed[height=\textheight,
width=\textwidth,background={WatermarkOverlay}, frame=on]{overlay
frame}
But it does not display anything when used in the setupbackgrounds background.
\setupbackgrounds[page][background={WatermarkOverlay}]
Any ideas why?
paul
On 11/2/06, Mojca Miklavec
% "draw \sometxt{forever} withcolor red" is broken at the moment, % but used to/should(?) work otherwise
Thanks for the hint. I don't know anything about mp. Is there a replacement for the broken draw \sometxt? Thanks again. paul
On Thu, 2 Nov 2006, Paul Jones wrote:
On 11/2/06, Mojca Miklavec
wrote: % "draw \sometxt{forever} withcolor red" is broken at the moment, % but used to/should(?) work otherwise
Thanks for the hint. I don't know anything about mp. Is there a replacement for the broken draw \sometxt?
draw \sometxt{\red{forever}} ; should work. Now on a question of my own, is it possible to redefine \sometxt so that \sometxt{abc} is equivalent to \sometxt{\mymacro{abc}} I find myself writing a lot of code like this label.top(\sometxt{\parbox{A long label}}, z1 ) ; This is really low priority, but something like this will be nice to have. Aditya
On 11/3/06, Aditya Mahajan wrote:
On Thu, 2 Nov 2006, Paul Jones wrote:
On 11/2/06, Mojca Miklavec wrote:
% "draw \sometxt{forever} withcolor red" is broken at the moment, % but used to/should(?) work otherwise
Thanks for the hint. I don't know anything about mp. Is there a replacement for the broken draw \sometxt?
Well ... I meant "broken" in the sense that "draw \sometxt{this} withcolor red" is black instead of being red, but it should work unless your ConTeXt distribution is too old.
draw \sometxt{\red{forever}} ;
should work.
True.
Now on a question of my own, is it possible to redefine \sometxt so that
\sometxt{abc}
is equivalent to
\sometxt{\mymacro{abc}}
I find myself writing a lot of code like this
label.top(\sometxt{\parbox{A long label}}, z1 ) ;
This is really low priority, but something like this will be nice to have.
Here's my vote as well. I would also like to have a mechanism which would enable easier definition of commands to be processed with \sometxt at the end. (I used some very dirty macros which redefined \sometxt temporary for that purpose, but that's far from ideal.) Mojca
Mojca Miklavec wrote:
On 11/3/06, Aditya Mahajan wrote:
On Thu, 2 Nov 2006, Paul Jones wrote:
On 11/2/06, Mojca Miklavec wrote:
% "draw \sometxt{forever} withcolor red" is broken at the moment, % but used to/should(?) work otherwise
Thanks for the hint. I don't know anything about mp. Is there a replacement for the broken draw \sometxt?
Well ... I meant "broken" in the sense that "draw \sometxt{this} withcolor red" is black instead of being red, but it should work unless your ConTeXt distribution is too old.
draw \sometxt{\red{forever}} ;
should work.
True.
Now on a question of my own, is it possible to redefine \sometxt so that
\sometxt{abc}
is equivalent to
\sometxt{\mymacro{abc}}
I find myself writing a lot of code like this
label.top(\sometxt{\parbox{A long label}}, z1 ) ;
This is really low priority, but something like this will be nice to have.
Here's my vote as well. I would also like to have a mechanism which would enable easier definition of commands to be processed with \sometxt at the end. (I used some very dirty macros which redefined \sometxt temporary for that purpose, but that's far from ideal.)
hm, always hungry for new features ... i assume that one of you then writes a nice myway about \sometxt cum suis as well as a wiki entry next beta: % \definetextext[framed]{\framed} % % \startMPcode % draw \sometxt[framed]{black} rotated 45 ; % \stopMPcode 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 -----------------------------------------------------------------
Paul Jones wrote:
So it looks like the problem boils down to this:
The overlay with a layer inside it displays fine when used in the framed background.
\framed[height=\textheight, width=\textwidth,background={WatermarkOverlay}, frame=on]{overlay frame}
But it does not display anything when used in the setupbackgrounds background.
\setupbackgrounds[page][background={WatermarkOverlay}]
Any ideas why?
hm, backgrounds should work ok; and page backgrounds are recalculated for each page 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 -----------------------------------------------------------------
The overlay with a layer inside it displays fine when used in the framed background.
\framed[height=\textheight, width=\textwidth,background={WatermarkOverlay}, frame=on]{overlay frame}
But it does not display anything when used in the setupbackgrounds background.
\setupbackgrounds[page][background={WatermarkOverlay}]
Any ideas why?
hm, backgrounds should work ok; and page backgrounds are recalculated for each page
Can you see any reason why it would not be working? In the example above, the overlay is displayed as the background of the frame, but not as the background for the entire document? Can you give any directions on where to look for further documentation/ideas? I basically just need to be able to position a watermark on the back of every page, possibley different ones for left and right pages. Thank you, paul
Paul Jones wrote:
The overlay with a layer inside it displays fine when used in the framed background.
\framed[height=\textheight, width=\textwidth,background={WatermarkOverlay}, frame=on]{overlay frame}
But it does not display anything when used in the setupbackgrounds background.
\setupbackgrounds[page][background={WatermarkOverlay}]
Any ideas why?
hm, backgrounds should work ok; and page backgrounds are recalculated for each page
Can you see any reason why it would not be working? In the example above, the overlay is displayed as the background of the frame, but not as the background for the entire document? Can you give any directions on where to look for further documentation/ideas? I basically just need to be able to position a watermark on the back of every page, possibley different ones for left and right pages.
can you send small test file? 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 -----------------------------------------------------------------
Paul Jones wrote:
can you send small test file?
Here you go...
In case the mail server strips attachments, the contents of the attached file are also in the original post of this thread. \setuppagenumbering [alternative=doublesided]
\setupcolors [state=start] \setupbackgrounds [leftpage] [background=Watermark-Left] \setupbackgrounds [rightpage] [background=Watermark-Right] \definelayer [Watermark-Left] [repeat=yes, width=\paperwidth, height=\paperheight] \definelayer [Watermark-Right] [repeat=yes, width=\paperwidth, height=\paperheight] \setlayerframed [Watermark-Left] [preset=middle] [foregroundcolor=red] {\scale[sx=12,sy=12]{\rotate[rotation=20.0]{forever}}} \setlayerframed [Watermark-Right] [preset=middle] [foregroundcolor=red] {\scale[sx=12,sy=12]{\rotate[rotation=-20.0]{together}}} \starttext \chapter{first} \dorecurse{30}{\input tufte } \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Thank you so much. This is exactly what I needed. I will add this to the wiki.
Thank you,
paul
On 11/5/06, Hans Hagen
Paul Jones wrote:
can you send small test file?
Here you go...
In case the mail server strips attachments, the contents of the attached file are also in the original post of this thread. \setuppagenumbering [alternative=doublesided]
\setupcolors [state=start]
\setupbackgrounds [leftpage] [background=Watermark-Left]
\setupbackgrounds [rightpage] [background=Watermark-Right]
\definelayer [Watermark-Left] [repeat=yes, width=\paperwidth, height=\paperheight]
\definelayer [Watermark-Right] [repeat=yes, width=\paperwidth, height=\paperheight]
\setlayerframed [Watermark-Left] [preset=middle] [foregroundcolor=red] {\scale[sx=12,sy=12]{\rotate[rotation=20.0]{forever}}}
\setlayerframed [Watermark-Right] [preset=middle] [foregroundcolor=red] {\scale[sx=12,sy=12]{\rotate[rotation=-20.0]{together}}}
\starttext \chapter{first} \dorecurse{30}{\input tufte } \stoptext
----------------------------------------------------------------- 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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec
-
Paul Jones