Re: Dynamic referencing AND hyperlinking for numbered equations
- To: mathgroup at smc.vnet.net
- Subject: [mg34151] Re: Dynamic referencing AND hyperlinking for numbered equations
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 7 May 2002 03:53:43 -0400 (EDT)
- References: <Pine.SUN.3.91.1020503154105.2155C-100000@hi>
- Sender: owner-wri-mathgroup at wolfram.com
At 3:55 PM -0300 3/5/02, Alexandre Costa wrote:
>I am afraid I was not so much clear. Let me try to explain again my problem:
>For example, I have the following set of Mathematica cells:
>
>Cell 1:
>Cell[BoxData["\[IndentingNewLine]"], "NumberedEquation"]
>Cell 2:
>Cell[BoxData["\[IndentingNewLine]"], "NumberedEquation",
> CellTags->"Eqtwo"]
>
>Cell 3:
>Cell[TextData[{
> "See (",
>
> CounterBox["NumberedEquation", "Eqtwo"],
> ")\n"
>}], "Text"]
My first point was that if you click on the CounterBox in Cell 3
you'll see that it is a hyperlink to the cell with CellTag "Eqtwo".
("Eqtwo" is displayed in the status bar and clicking on the
CounterBox jumps to this equation).
>Cell 4:
>Cell[TextData[{
> "See ",
> ButtonBox["(0)",
> ButtonData:>"Eqtwo",
> ButtonStyle->"Hyperlink"],
> "\n"
>}], "Text"]
>
>My problem is shown on Cell 4. I got this cell when I try to hyperlink
>the dynamic referenced equation given in Cell 3. In doing so, I use the
>following steps:
>- selected the equation number (i.e the string "(2)" in the cell 3)
>- Used the commands Input/Create hyperlink- Cell with tag: Eqtwo
>Instead of having a hyperlinked number "(2)" (what I really want), I got a
>hyperlinked "(0)".
If you really want, replace Cell 4 with
Cell[TextData[{
"See (",
ButtonBox[CounterBox["NumberedEquation", "Eqtwo"],
ButtonData:>"Eqtwo",
ButtonStyle->"Hyperlink"],
")\n"
}], "Text"]
But, as I mentioned above, there is no need to do this as Cell 3 is
already a hyperlink. Alternatively, you can select the CounterBox in
Cell 3 and change its style to be a standard hyperlink, if you want:
Cell[TextData[{
"See (",
StyleBox[
CounterBox["NumberedEquation", "Eqtwo"], "Hyperlink"],
")\n"
}], "Text"]
I've attached a Notebook with these examples.
[contact Paul to get the Notebook - moderator]
Cheers,
Paul