Sharedsupport / 2014-11-25-sagetex / sagetex_example.sagetex.sageOpen in CoCalc
Examples for support purposes...
## -*- encoding: utf-8 -*-
## 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(0, latex(factor(2015 + 1)))
except:
 _st_.goboom(11)
_st_.blockbegin()
try:
 def foo(bar):
     """
     Hi
     """
     m = 0
     for n in range(10):
         # do something silly
         m += 1
except:
 _st_.goboom(22)
_st_.blockend()
try:
 _st_.inline(1, latex(foo(5)))
except:
 _st_.goboom(24)
try:
 _st_.inline(2, latex(2+3))
except:
 _st_.goboom(26)
_st_.endofdoc()