CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/features/sage.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Layout } from "antd";
7
8
import { Icon } from "@cocalc/frontend/components/icon";
9
import Content from "components/landing/content";
10
import Footer from "components/landing/footer";
11
import Head from "components/landing/head";
12
import Header from "components/landing/header";
13
import Info from "components/landing/info";
14
import LaTeX from "components/landing/latex";
15
import Pitch from "components/landing/pitch";
16
import SignIn from "components/landing/sign-in";
17
import Snapshots from "components/landing/snapshots";
18
import { Paragraph, Text, Title } from "components/misc";
19
import A from "components/misc/A";
20
import { Customize } from "lib/customize";
21
import withCustomize from "lib/with-customize";
22
23
import SiteName from "components/share/site-name";
24
import sagetexScreenshot from "public/features/cocalc-sagemath-sagetex.png";
25
import sageLogo from "public/features/sage-circular-v2.svg";
26
import sageNbgrader from "public/features/sage-nbgrader.png";
27
import sageScreenshot from "public/features/sage-worksheet.png";
28
import juypterScreenshot from "public/features/sagemath-jupyter.png";
29
30
const component = "SageMath";
31
const title = `Use SageMath Online`;
32
33
export default function Sage({ customize }) {
34
return (
35
<Customize value={customize}>
36
<Head title={title} />
37
<Layout>
38
<Header page="features" subPage="sage" runnableTag="sage" />
39
<Layout.Content>
40
<Content
41
landing
42
startup={component}
43
body={sageLogo}
44
title={
45
<>
46
Use <A href="https://www.sagemath.org/">SageMath</A> Online
47
</>
48
}
49
subtitle={
50
<>
51
The goal of <A href="https://www.sagemath.org/">SageMath</A> is
52
to create a viable free open source alternative to Magma, Maple,
53
Mathematica and Matlab by building on top of many existing
54
open-source packages, including NumPy, SciPy, matplotlib, SymPy,
55
Maxima, GAP, FLINT, and{" "}
56
<A href="/features/r-statistical-software">R</A>.
57
</>
58
}
59
subtitleBelow={true}
60
image={juypterScreenshot}
61
alt={"Using Sage in a Worksheet"}
62
/>
63
64
<Pitch
65
col1={
66
<>
67
<Title level={2}>
68
<Icon name="sagemath" /> Start using{" "}
69
<A href="https://sagemath.org/">SageMath</A> on <SiteName />
70
</Title>
71
<Paragraph>
72
<ol>
73
<li>
74
Start by <A href="/auth/sign-up">signing up</A> for a free{" "}
75
<SiteName /> account.
76
</li>
77
<li>
78
Read the{" "}
79
<A href="https://doc.cocalc.com/getting-started.html">
80
getting started guide
81
</A>{" "}
82
to orient yourself and create your first project.
83
</li>
84
</ol>
85
After creating your first project, go ahead and create
86
<ul>
87
<li>
88
a{" "}
89
<A href="/features/jupyter-notebook">Jupyter Notebooks</A>{" "}
90
file,
91
</li>
92
<li>a Sage Worksheet,</li>
93
<li>
94
a <LaTeX /> document, or
95
</li>
96
<li>
97
a plaintext <Text code>*.sage</Text> file and run sage in
98
a <A href="/features/terminal">Linux Terminal</A>.
99
</li>
100
</ul>
101
</Paragraph>
102
</>
103
}
104
col2={
105
<>
106
<Title level={2}>
107
<Icon name="smile" /> Benefits of SageMath on <SiteName />
108
</Title>
109
<Paragraph>
110
<ul>
111
<li>
112
You no longer have to{" "}
113
<strong>
114
<A href="https://www.sagemath.org/download.html">
115
install and maintain
116
</A>
117
</strong>{" "}
118
SageMath, which can be challenging since Sage is large.
119
When you're{" "}
120
<A href="/features/teaching">teaching a class</A>,
121
students just have to sign in to CoCalc to get started!
122
</li>
123
<li>
124
You can easily{" "}
125
<A href="https://github.com/sagemathinc/cocalc-howto/blob/main/build-sage.md">
126
build Sage from source and run it on extremely powerful
127
computers
128
</A>{" "}
129
for only a few cents.
130
</li>
131
<li>
132
You can still easily run <b>older versions of Sage</b>{" "}
133
since many are all preinstalled in every CoCalc project.
134
</li>
135
<li>
136
All your files are private, stored persistently,
137
snapshotted and backed up; moreover, you can <b>rsync</b>{" "}
138
them to your computer or push them to <b>GitHub</b>.
139
</li>
140
<li>
141
You can invite <strong>collaborators</strong> to your
142
project to simultaneously edit the same notebooks or code
143
files.
144
</li>
145
<li>
146
Everything runs remotely, which means you do not have to
147
worry about messing up your own computer.{" "}
148
</li>
149
</ul>
150
<iframe
151
width="560"
152
height="315"
153
src="https://www.youtube.com/embed/b8e8qq-KWbA?si=620SEO8C1JBYXpJL"
154
title="YouTube video player"
155
frameBorder="0"
156
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
157
allowFullScreen
158
></iframe>
159
</Paragraph>
160
</>
161
}
162
/>
163
164
<SignIn startup={component} />
165
166
<Info.Heading
167
description={
168
<>There are many ways to use {component} online via CoCalc.</>
169
}
170
>
171
Feature Overview
172
</Info.Heading>
173
174
<Info
175
title={"SageMath Worksheets"}
176
image={sageScreenshot}
177
alt={"Using SageMath in a Worksheet"}
178
anchor="sagews"
179
icon="sagemath"
180
wide
181
>
182
<Paragraph>
183
CoCalc's{" "}
184
<A href="https://doc.cocalc.com/sagews.html">
185
SageMath Worksheets
186
</A>{" "}
187
are a single document experience that can be more friendly than
188
the Jupyter notebook "multiple cells" approach.
189
</Paragraph>
190
<Paragraph>
191
They are a great way to teach SageMath, since you can easily
192
include text, code, and output in a single document.
193
</Paragraph>
194
</Info>
195
196
<Info
197
title={
198
<>
199
SageMath in <LaTeX /> documents
200
</>
201
}
202
image={sagetexScreenshot}
203
alt={"Using SageMath in a LaTeX document"}
204
anchor="latex"
205
wide
206
>
207
<Paragraph>
208
You can also embed SageMath code in your{" "}
209
<A href="/features/latex-editor">
210
<LaTeX /> documents
211
</A>
212
.
213
</Paragraph>
214
<Paragraph>
215
This means you no longer have to manually copy and paste output
216
from SageMath worksheets into your LaTeX documents.
217
</Paragraph>
218
<Paragraph>
219
Learn more about{" "}
220
<A href={"https://ctan.org/pkg/sagetex?lang=en"}>SageTeX</A> and{" "}
221
<A href={"https://doc.cocalc.com/latex.html#sage"}>
222
how to use it in CoCalc
223
</A>
224
.
225
</Paragraph>
226
</Info>
227
228
<Info
229
title={"SageMath in Jupyter Notebooks"}
230
image={juypterScreenshot}
231
alt={"Using SageMath in a Jupyter Notebook"}
232
anchor="jupyter"
233
icon="jupyter"
234
wide
235
>
236
<Paragraph>
237
You can also use SageMath in{" "}
238
<A href="/features/jupyter-notebook">Jupyter Notebooks</A>.
239
</Paragraph>
240
<Paragraph>
241
This is a great way to teach SageMath, since you can easily
242
include text, code, and output in a single document.
243
</Paragraph>
244
<Paragraph>
245
Learn more about{" "}
246
<A href="https://doc.cocalc.com/jupyter.html">
247
how to use SageMath in Jupyter Notebooks
248
</A>
249
.
250
</Paragraph>
251
</Info>
252
253
<Info
254
title={"Teach using SageMath and Nbgrader"}
255
image={sageNbgrader}
256
alt={"A screenshot using nbgrader with SageMath."}
257
anchor="nbgrader"
258
icon="graduation-cap"
259
wide
260
>
261
<Paragraph>
262
CoCalc's{" "}
263
<A href="/features/teaching">
264
integrated course management system
265
</A>{" "}
266
fully supports{" "}
267
<A href="https://doc.cocalc.com/teaching-nbgrader.html">
268
using nbgrader together with SageMath
269
</A>{" "}
270
Jupyter Notebooks.
271
</Paragraph>
272
<Paragraph>
273
We provide custom Python templates for all the nbgrader cell
274
types.
275
</Paragraph>
276
<Paragraph>
277
Tests run in the student's project by default, so malicious code
278
won't impact anybody except the student.
279
</Paragraph>
280
</Info>
281
282
<Snapshots />
283
284
<SignIn startup={component} />
285
</Layout.Content>
286
<Footer />
287
</Layout>
288
</Customize>
289
);
290
}
291
292
export async function getServerSideProps(context) {
293
return await withCustomize({ context });
294
}
295
296