Linking Sage cells in a wiki

19 views
Skip to first unread message

Thomas Judson

unread,
Jul 17, 2017, 8:04:38 AM7/17/17
to sage...@googlegroups.com, sage-s...@googlegroups.com
I am trying to link two Sage cells in a wikidot webpage.  The following code successfully executes

[[html]]
<script>sagecell.makeSagecell({"inputLocation": ".sage"});</script>
<div class="sage">
  <script type="text/x-sage">
a = 10
Z8 = Integers(8)
Z8</script>
</div>
[[/html]]

I would like to add a second linked cell that executes the command

Z8.list()

If possible, I would like to include text between the cells.

So far I haven’t had any luck.  Any ideas would be appreciated.

Tom Judson

=========
Thomas W. Judson, Associate Professor
Department of Mathematics and Statistics
Stephen F. Austin State University
P.O. Box 13040-3040 SFA Station
Nacogdoches, TX  75962

OFFICE: 316 Math




Emmanuel Charpentier

unread,
Jul 17, 2017, 2:13:54 PM7/17/17
to sage-support, sage...@googlegroups.com
Wjat's wrong with

a = 10
Z8 = Integers(8)
print Z8
print "Some text I'd like to display."
Z8.list()


?

--
Emmanuel Charpentier

Tom Judson

unread,
Jul 19, 2017, 3:15:43 AM7/19/17
to sage-support, sage...@googlegroups.com
Actually, the problem is not this specific computation but being able to link Sage cells in a wiki in general.  However, the following works.
<script>sagecell.makeSagecell({"inputLocation": ".sage", linked: true});</script>
<div class="sage">
<script type="text/x-sage">
Z8 = Integers(8)
Z8</script>
</div>
<div>
<p>this is some text</p>
</div>
<div class="sage">
<script type="text/x-sage">
Z8.list()
</script>
</div>
<div class="sage">
<script type="text/x-sage">
a = Z8.an_element(); a
</script>
</div>
<div class="sage">
<script type="text/x-sage">
a.parent()
</script>
</div>
[[/html]]
Reply all
Reply to author
Forward
0 new messages