From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31364 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: Fielstack and Layers for Presentation Date: Fri, 13 Oct 2006 15:38:42 +0200 Message-ID: <452F96E2.5050306@gmx.net> References: <452E823F.6040503@nibua-r.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160746741 14383 80.91.229.2 (13 Oct 2006 13:39:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2006 13:39:01 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 13 15:38:58 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GYNFZ-0005Mb-0m for gctc-ntg-context-518@m.gmane.org; Fri, 13 Oct 2006 15:38:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6E10D1FEA0; Fri, 13 Oct 2006 15:38:56 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08186-04; Fri, 13 Oct 2006 15:38:47 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 65C1C1FE24; Fri, 13 Oct 2006 15:38:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE5BC1FE24 for ; Fri, 13 Oct 2006 15:38:41 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04001-07-3 for ; Fri, 13 Oct 2006 15:38:34 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id 97AF51FDEC for ; Fri, 13 Oct 2006 15:38:33 +0200 (CEST) Original-Received: (qmail invoked by alias); 13 Oct 2006 13:38:33 -0000 Original-Received: from i577B939C.versanet.de (EHLO [192.168.1.3]) [87.123.147.156] by mail.gmx.net (mp029) with SMTP; 13 Oct 2006 15:38:33 +0200 X-Authenticated: #24293357 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: mailing list for ConTeXt users In-Reply-To: <452E823F.6040503@nibua-r.org> X-Enigmail-Version: 0.94.0.0 X-Y-GMX-Trusted: 0 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:31364 Archived-At: Hi Renaud, Renaud AUBIN wrote: > Hi all, > > I would use fieldstack with \getbuffer and overlays... Why the following > code doesn't work ? Is there another way to do that ? > \setlayer is breaking the fields here, so that they become normal, inactive content (dunno why). If you remove it, the fields appear... but the positioning is now the problem. For testing I defined the symbols only to be equal to one buffer at a time (not a combination of them). Without this restriction you get really funny positions for them. HTH, Peter > TIA > > > Renaud > > %%%%%%% stack.tex > > \setupcolors[state=start] > \usemodule[pre-original] > > \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] > \defineframedtext[FunnyText][frame=off,background=FunnyFrame] > \def\StartFrame{\startFunnyText} > \def\StopFrame {\stopFunnyText } > \def\FrameTitle#1% > {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} > \setMPtext{FunnyFrame}{} % initialize the text variable > \startuseMPgraphic{FunnyFrame} > picture p ; numeric o ; path a, b ; pair c ; > p := textext.rt(\MPstring{FunnyFrame}) ; > a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ; > o := BodyFontSize ; > p := p shifted (2o,OverlayHeight-ypart center p) ; > drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; > b := a randomized (o/2) ; > fill b withcolor .85white ; draw b ; > c := center p ; > c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ; > p := p shifted (c-center p) ; > b := (boundingbox p) randomized (o/8) ; > fill b withcolor .85white ; draw b ; > draw p withcolor black; > setbounds currentpicture to a ; > \stopuseMPgraphic > > \definelayer[bglayer][position=yes] > \setupbackgrounds[text][background=bglayer] > \setuplayer[bglayer][position=no,corner=bottom,height=\paperheight] > > > \starttext > > \startbuffer[first] > \setlayer[bglayer][x=.55\textwidth,y=.9\textheight,location=b]{ > \FrameTitle{Knuth} > \StartFrame[width=.75\textwidth] > \input knuth > \StopFrame > } > \stopbuffer > > \startbuffer[second] > \setlayer[bglayer][x=.625\textwidth,y=.8\textheight,location=b]{ > \FrameTitle{Zapf} > \StartFrame[width=.75\textwidth] > \input zapf > \StopFrame > } > \stopbuffer > > \startbuffer[third] > \setlayer[bglayer][x=.70\textwidth,y=.7\textheight,location=b]{ > \FrameTitle{Tufte} > \StartFrame[width=.75\textwidth] > \input tufte > \StopFrame > } > \stopbuffer > > \definesymbol[empty][] > \definesymbol[one][{\getbuffer[first]}] > \definesymbol[two][{\getbuffer[first,second]}] > \definesymbol[three][{\getbuffer[first,second,third]}] > > > \Topic{Stacks \& Layers} > > {\setupbodyfont[12pt] > > \definefieldstack[sequence] > [one,two,three] > [frame=off, > offset=none, > clickin=JS(Walk_Field{sequence})] > > {\fieldstack[sequence]} > > \goto{next}[JS(Walk_Field{sequence})] > } > > \stoptext > > > ------------------------------------------------------------------------ > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context