Sharedlatex-tests / sagetex.texOpen in CoCalc
Author: Harald Schilly
1
\documentclass{article}
2
3
% set font encoding for PDFLaTeX, XeLaTeX, or LuaTeX
4
\usepackage{ifxetex,ifluatex}
5
\newif\ifxetexorluatex
6
\ifxetex
7
\xetexorluatextrue
8
\else
9
\ifluatex
10
\xetexorluatextrue
11
\else
12
\xetexorluatexfalse
13
\fi
14
\fi
15
16
\ifxetexorluatex
17
\usepackage{fontspec}
18
\else
19
\usepackage[T1]{fontenc}
20
\usepackage[utf8]{inputenc}
21
\usepackage{lmodern}
22
\fi
23
24
\usepackage{hyperref}
25
26
\usepackage{sagetex}
27
28
\begin{document}
29
30
1+4 = $\sage{1+4}$
31
32
\sagestr{"k " * 100}
33
34
\end{document}
35