ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Zhichu Chen" <zhichu.chen@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: using of field failed when arrange subpages
Date: Mon, 16 Apr 2007 10:53:40 +0800	[thread overview]
Message-ID: <769ba7780704151953k5b5b9c10pb67c6dc47b942984@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3119 bytes --]

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
----------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 5532 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

             reply	other threads:[~2007-04-16  2:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16  2:53 Zhichu Chen [this message]
2007-04-16 15:20 ` Zhichu Chen
2007-04-17 11:18 ` Hans Hagen
2007-04-17 12:10   ` Zhichu Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=769ba7780704151953k5b5b9c10pb67c6dc47b942984@mail.gmail.com \
    --to=zhichu.chen@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).