Sharedsupport / 2014-11-25-sagetex / sagetex_example.texOpen in CoCalc
Authors: Harald Schilly, ℏal Snyder, William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.
1
\documentclass{article}
2
\usepackage{sagetex}
3
\usepackage{amsmath}
4
\title{Title of Document}
5
\author{Name of Author}
6
7
\begin{document}
8
\maketitle
9
10
11
$\sage{factor(2015 + 1)}$
12
13
\begin{sageblock}
14
def foo(bar):
15
"""
16
Hi
17
"""
18
m = 0
19
for n in range(10):
20
# do something silly
21
m += 1
22
\end{sageblock}
23
24
\sage{foo(5)}
25
26
\sage{2+3}
27
28
\end{document}
29
30
%sagemathcloud={"latex_command":"pdflatex -synctex=1 -interact=nonstopmode sagetex_example.tex"}
31
32
33