MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: page numbers of cells with celltag

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27839] Re: page numbers of cells with celltag
  • From: "Rasmus Debitsch" <debitsch at zeiss.de>
  • Date: Mon, 19 Mar 2001 17:51:19 -0500 (EST)
  • References: <98veup$8cs@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

unfortunately I haven't found an elegant solution for the problem. When
generating an index for notebooks, I'm using additional tags for problems
like this. The code looks like this :

i = 1;
SetOptions[
 $FrontEnd,
 FindSettings -> {Wraparound -> False}
];
nb = EvaluationNotebook[];

(* Add addional tags *)
While[NotebookFind[nb, "A", Next, CellTags] =!= $Failed,
   SetOptions[NotebookSelection[nb],
    CellTags -> {"A", StringJoin["A-", ToString[i++]]}
   ]
];

(* Generate the index *)
SelectionMove[nb, Before, Notebook];
NotebookWrite[nb,
 Cell[
  TextData[
   Flatten[
    Table[{
     StringJoin["Cell ", ToString[j]], " : ",
     CounterBox["Page", StringJoin["A-", ToString[j]]], "\n"
     }, {j, 1, i - 1}
    ]
   ]
  ], "Text"
 ]
];

where "A" is the name of common cell tag.

Regards
--

        Rasmus Debitsch
        Carl Zeiss Lithos GmbH
        Carl Zeiss Strasse
        D-73447 Oberkochen

        eMail : debitsch at zeiss.de

"Martin Stockhammer" <martin.stockhammer at visualanalysis.com> schrieb im
Newsbeitrag news:98veup$8cs at smc.vnet.net...
> Hello,
>
> I have a little function that makes an index for my document
> by searching for special cell tags e.g. "Index`example"
> and inserting a CounterBox["Page", "Index`example"]
> for this tag into the index.
>
> But the problem is I get only the page of one cell with this cell tag.
>
> Is it possible to examine the page numbers of all cells in a notebook
> with a specific cell tag ?
>
> Bye
>
> Martin Stockhammer
>
> --
>
> Martin Stockhammer
> Visual Analysis AG
> http://www.visualanalysis.com
> email: martin.stockhammer at visualanalysis.com
>
>




  • Prev by Date: Re: Differential equations error with MathLink/JLink
  • Next by Date: Re: Custom Function's Rules Ignored in Simplify/FullSimplify?
  • Previous by thread: page numbers of cells with celltag
  • Next by thread: 4.1 Help Browser font size on W2k