From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34288 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: using of field failed when arrange subpages Date: Mon, 16 Apr 2007 10:53:40 +0800 Message-ID: <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="===============1526060502==" X-Trace: sea.gmane.org 1176692054 5343 80.91.229.12 (16 Apr 2007 02:54:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2007 02:54:14 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 16 04:54:06 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 1HdHLy-0001OQ-1T for gctc-ntg-context-518@m.gmane.org; Mon, 16 Apr 2007 04:54:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3FA70201FB; Mon, 16 Apr 2007 04:54:02 +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 00655-05; Mon, 16 Apr 2007 04:53:53 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1BA38201E3; Mon, 16 Apr 2007 04:53:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 20D96201E3 for ; Mon, 16 Apr 2007 04:53:51 +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 01008-01-6 for ; Mon, 16 Apr 2007 04:53:44 +0200 (CEST) Original-Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by ronja.ntg.nl (Postfix) with ESMTP id 15EE0201DE for ; Mon, 16 Apr 2007 04:53:43 +0200 (CEST) Original-Received: by wr-out-0506.google.com with SMTP id 36so1453858wra for ; Sun, 15 Apr 2007 19:53:41 -0700 (PDT) Original-Received: by 10.114.110.1 with SMTP id i1mr1724931wac.1176692020187; Sun, 15 Apr 2007 19:53:40 -0700 (PDT) Original-Received: by 10.114.103.11 with HTTP; Sun, 15 Apr 2007 19:53:40 -0700 (PDT) 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:34288 Archived-At: --===============1526060502== Content-Type: multipart/alternative; boundary="----=_Part_35993_6969413.1176692020136" ------=_Part_35993_6969413.1176692020136 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ---------------------------------------------------------------- ------=_Part_35993_6969413.1176692020136 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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
----------------------------------------------------------------
------=_Part_35993_6969413.1176692020136-- --===============1526060502== 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 --===============1526060502==--