Sharedsupport / 2014-11-25-sagetex / sagetex_example.sagetex.sageOpen in CoCalc
Authors: Harald Schilly, ℏal Snyder, William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.
1
## -*- encoding: utf-8 -*-
2
## This file (sagetex_example.sagetex.sage) was *autogenerated* from sagetex_example.tex with sagetex.sty version 2012/01/16 v2.3.3-69dcb0eb93de.
3
import sagetex
4
_st_ = sagetex.SageTeXProcessor('sagetex_example', version='2012/01/16 v2.3.3-69dcb0eb93de', version_check=True)
5
try:
6
_st_.inline(0, latex(factor(2015 + 1)))
7
except:
8
_st_.goboom(11)
9
_st_.blockbegin()
10
try:
11
def foo(bar):
12
"""
13
Hi
14
"""
15
m = 0
16
for n in range(10):
17
# do something silly
18
m += 1
19
except:
20
_st_.goboom(22)
21
_st_.blockend()
22
try:
23
_st_.inline(1, latex(foo(5)))
24
except:
25
_st_.goboom(24)
26
try:
27
_st_.inline(2, latex(2+3))
28
except:
29
_st_.goboom(26)
30
_st_.endofdoc()
31