CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / 2014-11-06-internal-links.sagewsOpen in CoCalc

Examples for support purposes...

Table of Contents in a Sage worksheet.

It is possible to define a table of contents with links to sections in a large Sage worksheet. Just use the 100% bog standard old fashioned HTML approach to this problem, and it works. You could also use markdown or wiki to do the same.
%html(hide=0)

<h2>
    Click on one of the links below:
</h2>
<ul>
    <li>
    <a href="#section1">Section 1</a>
    </li>
    <li>
    <a href="#section2">Section 2</a>
    </li>
</ul>

Click on one of the links below:

for i in range(30): i, sqrt(i)
(0, 0) (1, 1) (2, sqrt(2)) (3, sqrt(3)) (4, 2) (5, sqrt(5)) (6, sqrt(6)) (7, sqrt(7)) (8, 2*sqrt(2)) (9, 3) (10, sqrt(10)) (11, sqrt(11)) (12, 2*sqrt(3)) (13, sqrt(13)) (14, sqrt(14)) (15, sqrt(15)) (16, 4) (17, sqrt(17)) (18, 3*sqrt(2)) (19, sqrt(19)) (20, 2*sqrt(5)) (21, sqrt(21)) (22, sqrt(22)) (23, sqrt(23)) (24, 2*sqrt(6)) (25, 5) (26, sqrt(26)) (27, 3*sqrt(3)) (28, 2*sqrt(7)) (29, sqrt(29))
%html(hide=0)
<h2 id="section1">
    Section 1
</h2>

Section 1

for i in range(30): i, i^3
(0, 0) (1, 1) (2, 8) (3, 27) (4, 64) (5, 125) (6, 216) (7, 343) (8, 512) (9, 729) (10, 1000) (11, 1331) (12, 1728) (13, 2197) (14, 2744) (15, 3375) (16, 4096) (17, 4913) (18, 5832) (19, 6859) (20, 8000) (21, 9261) (22, 10648) (23, 12167) (24, 13824) (25, 15625) (26, 17576) (27, 19683) (28, 21952) (29, 24389)

%html(hide=0)
<h2 id="section2">
    Section 2
</h2>

Section 2


for i in range(100): i, i^2
(0, 0) (1, 1) (2, 4) (3, 9) (4, 16) (5, 25) (6, 36) (7, 49) (8, 64) (9, 81) (10, 100) (11, 121) (12, 144) (13, 169) (14, 196) (15, 225) (16, 256) (17, 289) (18, 324) (19, 361) (20, 400) (21, 441) (22, 484) (23, 529) (24, 576) (25, 625) (26, 676) (27, 729) (28, 784) (29, 841) (30, 900) (31, 961) (32, 1024) (33, 1089) (34, 1156) (35, 1225) (36, 1296) (37, 1369) (38, 1444) (39, 1521) (40, 1600) (41, 1681) (42, 1764) (43, 1849) (44, 1936) (45, 2025) (46, 2116) (47, 2209) (48, 2304) (49, 2401) (50, 2500) (51, 2601) (52, 2704) (53, 2809) (54, 2916) (55, 3025) (56, 3136) (57, 3249) (58, 3364) (59, 3481) (60, 3600) (61, 3721) (62, 3844) (63, 3969) (64, 4096) (65, 4225) (66, 4356) (67, 4489) (68, 4624) (69, 4761) (70, 4900) (71, 5041) (72, 5184) (73, 5329) (74, 5476) (75, 5625) (76, 5776) (77, 5929) (78, 6084) (79, 6241) (80, 6400) (81, 6561) (82, 6724) (83, 6889) (84, 7056) (85, 7225) (86, 7396) (87, 7569) (88, 7744) (89, 7921) (90, 8100) (91, 8281) (92, 8464) (93, 8649) (94, 8836) (95, 9025) (96, 9216) (97, 9409) (98, 9604) (99, 9801)