MathGroup Archive 1999

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

Search the Archive

Re: CounterBox to different notebook

  • To: mathgroup at
  • Subject: [mg18296] Re: CounterBox to different notebook
  • From: "P.J. Hinton" <paulh at>
  • Date: Fri, 25 Jun 1999 15:05:35 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <7ktv6h$>
  • Sender: owner-wri-mathgroup at

On 24 Jun 1999, Henrik Weimer wrote:

> I would like to build a large document using Mathematica. Because
> I anticipate files to become very large very quickly, I decided the
> right thing to do is to break the document into smaller notebooks, one
> per chapter. The most nagging problem I am facing at this time is the
> following:
> How can I have cross references from one notebook to another? For
> example, inside a notebook, CounterBox can be used to create automatic
> numbering objects that reference tagged cells in the notebook, e.g.
> numbered equations or figures. Is there a way of having such cross
> references go to cell that reside in a different notebook?

There is a way to do this, but my tutorial on MathSource does not address
it.  I really should add that.  The structure of the CounterBox[] looks

CounterBox[<counter name>,  {<reference file>, <reference tag>}]

Suppose that you want to insert a counter of type "Theorem" that points to
a counter in a cell with tag "Pythagoras" that resides within a notebook
in the same directory named "RightTriangles.nb".  The syntax of the
counter would then look like:

     FrontEnd`FileName[{Directory[]}, "RightTriangles.nb"],

You an modify aspects of a counter using the Option Inspector dialog.

1) Click on the front end menu command sequence Input -> Create Automatic
Numbering Object...

2) On the resulting dialog box, set the counter type with the list box

3) Click on the radio button labeled "The first cell with the tag" and
enter some text in the combo box below it.

4) Click on OK to dismiss the dialog box.

5) Drag select the text representing the counter.

6) Click on the front end menu command sequence Format -> Option

7) Set the scope indicator on the Option Inspector dialog to "selection"
if it is not already set that way.

8) Enter the text "reference file" in the text field adjacent to the
Lookup button and click on the button.  This should expose the argument as
an option.

9) Enter the name of the file in the "reference file" text field in the
form of a FrontEnd`FileName[] object.

10) Close the Option Inspector dialog.

P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.

  • Prev by Date: Re: TOUGH Question
  • Next by Date: Re: O.D.E in Power Series
  • Previous by thread: CounterBox to different notebook
  • Next by thread: problems printing in Mathematica 3