From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34292 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: Re: using of field failed when arrange subpages Date: Mon, 16 Apr 2007 23:20:14 +0800 Message-ID: <769ba7780704160820s7b1c1386hb15b5435cea9d31a@mail.gmail.com> References: <769ba7780704151953k5b5b9c10pb67c6dc47b942984@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1997988330==" X-Trace: sea.gmane.org 1176736857 16697 80.91.229.12 (16 Apr 2007 15:20:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2007 15:20:57 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 16 17:20:49 2007 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 lo.gmane.org with esmtp (Exim 4.50) id 1HdT0I-0005De-Rl for gctc-ntg-context-518@m.gmane.org; Mon, 16 Apr 2007 17:20:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4EEFB201AE; Mon, 16 Apr 2007 17:20:30 +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 11486-02; Mon, 16 Apr 2007 17:20:24 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CE2242019B; Mon, 16 Apr 2007 17:20:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 32F122019B for ; Mon, 16 Apr 2007 17:20:22 +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 11496-01-2 for ; Mon, 16 Apr 2007 17:20:16 +0200 (CEST) Original-Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.230]) by ronja.ntg.nl (Postfix) with ESMTP id 406A82018B for ; Mon, 16 Apr 2007 17:20:16 +0200 (CEST) Original-Received: by nz-out-0506.google.com with SMTP id n1so1179006nzf for ; Mon, 16 Apr 2007 08:20:15 -0700 (PDT) Original-Received: by 10.115.78.1 with SMTP id f1mr1944583wal.1176736814281; Mon, 16 Apr 2007 08:20:14 -0700 (PDT) Original-Received: by 10.114.103.11 with HTTP; Mon, 16 Apr 2007 08:20:14 -0700 (PDT) In-Reply-To: <769ba7780704151953k5b5b9c10pb67c6dc47b942984@mail.gmail.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:34292 Archived-At: --===============1997988330== Content-Type: multipart/alternative; boundary="----=_Part_47436_12328459.1176736814213" ------=_Part_47436_12328459.1176736814213 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi everybody, I figured out that it is not because the fields are not treated nor they are overlapped by other materials. Only the JavaScript failed to excute the " Toggle_Hide" function. When I deleted hidden from \setupfield [HelpSetup] [width=1.2em,height=fit,frame=off,option={readonly,hidden}] the fields are shown and fail to hide now. I think it can be a bug. I'm still looking for a solution but I'm new to ConTeXt. I hope you can help me with it. Any suggestion will be OK. On 4/16/07, Zhichu Chen wrote: > > Hi, > > I've tried Hans' example introduced at mwidget-p.pdf, it's perfect. But > when I was trying some subpage arrangements, it just failed. How could it > happen? I guess either shiping out subpages forget the fields or something > has covered over them. Here's a small example (by the way, I don't actually > know the meanings of the arguments of \dosetuparrangement, I'm very > appreciated if someone could explain the macro to me.): > > ========================================================= > > \setupinteraction [state=start] > > \installpagearrangement TEMP > {\dosetuparrangement{1}{1}{1}{0}{0}% > \pusharrangedpageTEMP\poparrangedpagesAonly\relax} > > \def\pusharrangedpageTEMP#1% > {\doglobal\increment\arrangedpageN > \reportarrangedpage\arrangedpageN > \ifcase\arrangedpageN > \or \handlearrangedpageXandY{#1}0{11}0\arrangedpageA > \or \handlearrangedpageXandY{#1}0{9}0\arrangedpageA > \or \handlearrangedpageXandY{#1}0{7}0\arrangedpageA > \or \handlearrangedpageXandY{#1}0{5}0\arrangedpageA > \or \handlearrangedpageXandY{#1}0{3}0\arrangedpageA > \or \handlearrangedpageXandY{#1}0{1}0\arrangedpageA > \poparrangedpages > \fi} > > \def\poparrangedpagesAonly > {\ifnum\arrangedpageN>\zerocount > \dontcomplain > \paperwidth\arrangedpageX\paperwidth > \paperheight\arrangedpageY\paperheight > \outputarrangedbox\arrangedpageA > \doglobal\newcounter\arrangedpageN > \fi} > > \definepapersize > [Column] > [width=40pt, > height=400pt, > offset=0pt] > > \definepapersize > [Scroll] > [width=540pt, > height=400pt, > offset=0pt] > > > \setuppapersize [Column][Scroll] > \setuparranging [TEMP,background] > \setuplayout > [margin=0pt, > width=fit, > height=middle, > leftmargin=0pt, > rightmargin=0pt, > leftedge=0pt, > rightedge=0pt, > header=0pt, > footer=0pt, > bottom=0pt, > top=0pt, > backspace=0pt, > topspace=0pt, > bottomspace=0pt, > horoffset=0pt, > veroffset=0pt, > headerdistance=0pt, > footerdistance=0pt, > topdistance=0pt, > bottomdistance=0pt] > > \pdfoptionpdfminorversion=6 > > \title{What?} > > \starttext > > \newcounter\abc > \doglobal\increment\abc > > \setupfields > [reset] > \setupfield > [HelpSetup] > [width=1.2em,height=fit,frame=off,option={readonly,hidden}] > > \def\currenthelp{Help::\abc} > > \definefield [\currenthelp] [check] [HelpSetup] [helpinfo\abc] > [helpinfo\abc] > > \definesymbol [helpinfo\abc] [\SomeHelpText] > \def\SomeHelpText% > {\framed > [width=1.2em,height=fit,align=middle,style=small, > frame=on,background=color,backgroundcolor=white,framecolor=red] > {Some texts}} > > \inright{\fitfield[\currenthelp]} Click > \goto{here}[JS(Toggle_Hide{\currenthelp})] to see. > > \dorecurse{10}{\input knuth\endgraf} > > \stoptext > ========================================================= > > -- > Sincerely yours, > Chen > ---------------------------------------------------------------- > > Zhi-chu Chen | Shanghai Synchrotron Radiation Facility > No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China > tel: 086 21 5955 3405 | zhichu.chen.googlepages.com > | www.sinap.ac.cn > ---------------------------------------------------------------- > -- Sincerely yours, Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ---------------------------------------------------------------- ------=_Part_47436_12328459.1176736814213 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi everybody,
 
I figured out that it is not because the fields are not treated nor they are overlapped by other materials. Only the JavaScript failed to excute the "Toggle_Hide" function. When I deleted hidden from
\setupfield
[HelpSetup]
[width=1.2em,height=fit,frame=off,option={readonly,hidden}]

the fields are shown and fail to hide now. I think it can be a bug.
 
I'm still looking for a solution but I'm new to ConTeXt. I hope you can help me with it. Any suggestion will be OK.
 

 
On 4/16/07, Zhichu Chen <zhichu.chen@gmail.com> wrote:
Hi,
 
I've tried Hans' example introduced at mwidget-p.pdf, it's perfect. But when I was trying some subpage arrangements, it just failed. How could it happen? I guess either shiping out subpages forget the fields or something has covered over them. Here's a small example (by the way, I don't actually know the meanings of the arguments of \dosetuparrangement, I'm very appreciated if someone could explain the macro to me.):
 
=========================================================

\setupinteraction  [state=start]

\installpagearrangement TEMP
  {\dosetuparrangement{1}{1}{1}{0}{0}%
     \pusharrangedpageTEMP\poparrangedpagesAonly\relax}

\def\pusharrangedpageTEMP#1%
  {\doglobal\increment\arrangedpageN
   \reportarrangedpage\arrangedpageN
   \ifcase\arrangedpageN
   \or \handlearrangedpageXandY{#1}0{11}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{9}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{7}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{5}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{3}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{1}0\arrangedpageA
     \poparrangedpages
   \fi}

\def\poparrangedpagesAonly
  {\ifnum\arrangedpageN>\zerocount
     \dontcomplain
     \paperwidth\arrangedpageX\paperwidth
     \paperheight\arrangedpageY\paperheight
     \outputarrangedbox\arrangedpageA
     \doglobal\newcounter\arrangedpageN
   \fi}

\definepapersize
  [Column]
  [width=40pt,
   height=400pt,
   offset=0pt]

\definepapersize
  [Scroll]
  [width=540pt,
   height=400pt,
   offset=0pt]


\setuppapersize    [Column][Scroll]
\setuparranging    [TEMP,background]
\setuplayout
  [margin=0pt,
   width=fit,
   height=middle,
   leftmargin=0pt,
   rightmargin=0pt,
   leftedge=0pt,
   rightedge=0pt,
   header=0pt,
   footer=0pt,
   bottom=0pt,
   top=0pt,
   backspace=0pt,
   topspace=0pt,
   bottomspace=0pt,
   horoffset=0pt,
   veroffset=0pt,
   headerdistance=0pt,
   footerdistance=0pt,
   topdistance=0pt,
   bottomdistance=0pt]

\pdfoptionpdfminorversion=6

\title{What?}

\starttext

\newcounter\abc
\doglobal\increment\abc

\setupfields
[reset]
\setupfield
[HelpSetup]
[width=1.2em,height=fit,frame=off,option={readonly,hidden}]

\def\currenthelp{Help::\abc}

\definefield [\currenthelp] [check] [HelpSetup] [helpinfo\abc] [helpinfo\abc]

\definesymbol [helpinfo\abc] [\SomeHelpText]
\def\SomeHelpText%
{\framed
[width=1.2em,height=fit,align=middle,style=small,
frame=on,background=color,backgroundcolor=white,framecolor=red]
{Some texts}}

\inright{\fitfield[\currenthelp]} Click \goto{here}[JS(Toggle_Hide{\currenthelp})] to see.

\dorecurse{10}{\input knuth\endgraf}

\stoptext

=========================================================

--
Sincerely yours,
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
----------------------------------------------------------------



--
Sincerely yours,
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
---------------------------------------------------------------- ------=_Part_47436_12328459.1176736814213-- --===============1997988330== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============1997988330==--