Sharedsupport / 2014-11-25-sagetex / sagetex_example.sagetex.sage.pyOpen in CoCalc
Examples for support purposes...
## -*- encoding: utf-8 -*-
# This file was *autogenerated* from the file sagetex_example.sagetex.sage
from sage.all_cmdline import *   # import sage library
_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.
import sagetex
_st_ = sagetex.SageTeXProcessor('sagetex_example', version='2012/01/16 v2.3.3-69dcb0eb93de', version_check=True)
try:
 _st_.inline(_sage_const_0 , latex(factor(_sage_const_2015  + _sage_const_1 )))
except:
 _st_.goboom(_sage_const_11 )
_st_.blockbegin()
try:
 def foo(bar):
     """
     Hi
     """
     m = _sage_const_0 
     for n in range(_sage_const_10 ):
         # do something silly
         m += _sage_const_1 
except:
 _st_.goboom(_sage_const_22 )
_st_.blockend()
try:
 _st_.inline(_sage_const_1 , latex(foo(_sage_const_5 )))
except:
 _st_.goboom(_sage_const_24 )
try:
 _st_.inline(_sage_const_2 , latex(_sage_const_2 +_sage_const_3 ))
except:
 _st_.goboom(_sage_const_26 )
_st_.endofdoc()