On Sun, Nov 2, 2008 at 9:15 PM, Rob Beezer <[EMAIL PROTECTED]> wrote:
>
> I have a question about hyperlinks between worksheets.
>
> I use extensive hyperlinks to reference between definitions, theorems
> and proofs.  Within a worksheet (one section in the book) these work
> fine.  I've done some experiments, making minor edits by hand to
> convert to worksheets.  But no matter what I try, when a link points
> to a different worksheet and is clicked on, the new worksheet gets
> loaded but the page does not position itself at the target location in
> the new worksheet.
>
> I have been able hack up a pair of small demonstration worksheets, and
> make linking work properly with HTML tags (using name="" for the
> target).  In the XHTML/jsMath pages produced by tex4ht, the targets
> are specified with id="", and it seems that the use of name="" is no
> longer acceptable in XHTML (and doesn't seem to work anyway).

It seemed like nobody answered your question, and the thread got off topic.
In the Sage notebook using name="" works fine to solve exactly your
problem, so I don't know why you say it "doesn't seem to work
anyway".   If I create one worksheet and put the following in it (as text):

<a name="two">Two Theorem</a>

then if that worksheet is number 4 (say), i.e., the url is like this:

 http://localhost:8000/home/admin/4

Then I can jump to the part that says "Two Theorem" from
any other worksheet by making a link:

<a target="_new" href="../4#two">Go to Two Theorem</a>

I like using target="_new" so that the link pops up a new tab,
since otherwise people tend to use the back button, which is
very bad in the notebook, unfortunately (that the back button
causes confusion in the notebook is itself a separate thing that
needs to be fixed).

>
> I'd appreciate any advice, hints or pointers on how to accomplish this
> type of cross-worksheet linking with XHTML in the worksheets.

Why is XHTML relevant?  If you just do the standard thing above in
a worksheet it works fine.

> Examples of the types of pages I'm planning to convert can be found
> starting at http://linear.ups.edu/jsmath/latest/fcla-jsmath-latest.html
> The links all have filenames in them which will need to be converted
> as well, but they should be easy to parse with sed or a script.  In my
> experiments, I've edited those out by hand and basically replaced with
> them with worksheet numbers.
>
> Thanks,
> Rob
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to