From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14151 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Absolute positioning Date: Tue, 02 Dec 2003 17:27:35 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <6.0.0.22.2.20031202172137.0204c490@server-1> References: <20031201181922793324.GyazMail.Gilles.Perez@univ-montp3.fr> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1070384325 2974 80.91.224.253 (2 Dec 2003 16:58:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2003 16:58:45 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Tue Dec 02 17:58:42 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARDrF-0006zn-00 for ; Tue, 02 Dec 2003 17:58:42 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id D835510B1C; Tue, 2 Dec 2003 17:58:37 +0100 (MET) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id 4ED1910ACC for ; Tue, 2 Dec 2003 17:50:30 +0100 (MET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id hB2GoNn05104 for ; Tue, 2 Dec 2003 17:50:23 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 3C4F71A4C0; Tue, 2 Dec 2003 17:50:28 +0100 (CET) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 6B96117BC7 for ; Tue, 2 Dec 2003 16:50:27 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Original-To: ntg-context@ntg.nl In-Reply-To: <20031201181922793324.GyazMail.Gilles.Perez@univ-montp3.fr> Original-References: <20031201181922793324.GyazMail.Gilles.Perez@univ-montp3.fr> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14151 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14151 At 18:19 01/12/2003, you wrote: >Hello, > >I didn't find a way to put text at specific locations on the page. It >must be something obvious! :-) > >I try to design a screen document where every notes are, say, typeset >on the lower half of the page and appear only when clicking on their >number in the text (with layers I think). > >Thnaks in advance, > >Gilles. > >PS for Hans: I didn't forget the note problem we've discussed in M=E2con. >I'll build a test file. % interface=3Den \setuppapersize[S6][S6] \startJSpreamble {Notes} used now var lastNote =3D "" ; function Show_Note ( Name ) { if (Name !=3D lastNote) { Hide_Note () ; var v =3D this.getField(Name) ; if (v) { console.println("Show Note: " + Name) ; v.display =3D display.visible ; v.readonly =3D false ; this.dirty =3D false ; lastNote =3D Name } } } function Hide_Note ( ) { if (lastNote !=3D "") { var v =3D this.getField(lastNote) ; if (v) { console.println("Hide Note: " + lastNote) ; v.display =3D display.hidden ; v.readonly =3D true ; this.dirty =3D false } } lastNote =3D "" } \stopJSpreamble \newcounter\AnotherNote \def\SomeNote#1#2% {\hbox {\doglobal\increment\AnotherNote \definesymbol[note:\AnotherNote:on][\WhatANote{#2}]% \setupfield[notes][offset=3Doverlay,frame=3Doff,option=3D{readonly,hi= dden}] % this confuses acrobat, probably some interference bug, I spent too=20 much time on that %=20 \setupfield[notes][offset=3Doverlay,frame=3Doff,option=3D{readonly,hidden},c= lickin=3DJS(Hide_Note)] = \definefield[note:\AnotherNote][check][notes][note:\AnotherNote:on][note:\A= notherNote:on]% \doifreferencefoundelse{note:\AnotherNote} = {\setlayer[notes][page=3D\currentrealreference]{\fitfield[note:\AnotherNote= ]}} {\setlayer[notes]{\fitfield[note:\AnotherNote]}}% = \pagereference[note:\AnotherNote]\goto{#1}[JS(Show_Note{note:\AnotherNote})= ]}} \setupinteraction [state=3Dstart, openpageaction=3DJS(Hide_Note), closepageaction=3DJS(Hide_Note)] \definereference[CloseNote][JS(Hide_Note)] \setupfootertexts[{\goto{Close Note}[CloseNote]}][] \setupcolors [state=3Dstart] \definecolor [notebackgroundcolor] [s=3D.85] \defineframedtext [WhatANote] [background=3Dcolor, backgroundcolor=3Dnotebackgroundcolor, width=3D.4\textwidth, height=3Dfit, align=3Dnormal] \definelayer [notes] [width=3D\paperwidth, height=3D\paperheight, preset=3Drightbottom, offset=3D1cm] \setupbackgrounds [page] [background=3Dnotes] \starttext \startbuffer \input ward \SomeNote{[[ward]]} {\input ward \relax} \input ward = \blank \input knuth \SomeNote{[[knuth]]} {\input knuth \relax} \input knuth = \blank \input tufte \SomeNote{[[tufte]]} {\input tufte \relax} \input tufte = \blank \input bryson \SomeNote{[[bryson]]}{\input bryson\relax} \input bryson= \blank \stopbuffer \dorecurse{10}{\getbuffer} \stoptext=20