Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 51007fb

Browse files
committedJun 26, 2014
Inline animations in tables.
1 parent b8a3c7c commit 51007fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

Diff for: ‎src/sage/misc/table.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ def _html_table_row(self, row, header=False):
737737
<td><script type="math/tex">x</script></td>
738738
"""
739739
from sage.plot.all import Graphics
740+
from sage.plot.animate import Animation
740741
from latex import latex
741742
from html import math_parse
742743
import types
@@ -755,7 +756,7 @@ def _html_table_row(self, row, header=False):
755756

756757
# First entry of row:
757758
entry = row[0]
758-
if isinstance(entry, Graphics):
759+
if isinstance(entry, (Graphics, Animation)):
759760
print(first_column_tag % entry.show(linkmode = True))
760761
elif isinstance(entry, str):
761762
print(first_column_tag % math_parse(entry))
@@ -764,7 +765,7 @@ def _html_table_row(self, row, header=False):
764765

765766
# Other entries:
766767
for column in xrange(1,len(row)):
767-
if isinstance(row[column], Graphics):
768+
if isinstance(row[column], (Graphics, Animation)):
768769
print(column_tag % row[column].show(linkmode = True))
769770
elif isinstance(row[column], str):
770771
print(column_tag % math_parse(row[column]))

0 commit comments

Comments
 (0)