| Hosted by CoCalc | Download
1
## -*- encoding: utf-8 -*-
2
# This file was *autogenerated* from the file sagetex_example.sagetex.sage
3
from sage.all_cmdline import * # import sage library
4
_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_2015 = Integer(2015); _sage_const_0 = Integer(0); _sage_const_5 = Integer(5); _sage_const_1 = Integer(1); _sage_const_11 = Integer(11); _sage_const_10 = Integer(10); _sage_const_22 = Integer(22); _sage_const_26 = Integer(26); _sage_const_24 = Integer(24)## This file (sagetex_example.sagetex.sage) was *autogenerated* from sagetex_example.tex with sagetex.sty version 2012/01/16 v2.3.3-69dcb0eb93de.
5
import sagetex
6
_st_ = sagetex.SageTeXProcessor('sagetex_example', version='2012/01/16 v2.3.3-69dcb0eb93de', version_check=True)
7
try:
8
_st_.inline(_sage_const_0 , latex(factor(_sage_const_2015 + _sage_const_1 )))
9
except:
10
_st_.goboom(_sage_const_11 )
11
_st_.blockbegin()
12
try:
13
def foo(bar):
14
"""
15
Hi
16
"""
17
m = _sage_const_0
18
for n in range(_sage_const_10 ):
19
# do something silly
20
m += _sage_const_1
21
except:
22
_st_.goboom(_sage_const_22 )
23
_st_.blockend()
24
try:
25
_st_.inline(_sage_const_1 , latex(foo(_sage_const_5 )))
26
except:
27
_st_.goboom(_sage_const_24 )
28
try:
29
_st_.inline(_sage_const_2 , latex(_sage_const_2 +_sage_const_3 ))
30
except:
31
_st_.goboom(_sage_const_26 )
32
_st_.endofdoc()
33
34