Sharedsupport / 2014-11-25-sagetex / sagetex_example.texOpen in CoCalc
Examples for support purposes...
\documentclass{article}
\usepackage{sagetex}
\usepackage{amsmath}
\title{Title of Document}
\author{Name of Author}

\begin{document}
\maketitle


$\sage{factor(2015 + 1)}$

\begin{sageblock}
def foo(bar):
    """
    Hi
    """
    m = 0
    for n in range(10):
        # do something silly
        m += 1
\end{sageblock}

\sage{foo(5)}

\sage{2+3}

\end{document}

%sagemathcloud={"latex_command":"pdflatex -synctex=1 -interact=nonstopmode sagetex_example.tex"}