Skip to content

Instantly share code, notes, and snippets.

@theronhitchman
Last active June 4, 2018 13:02
Show Gist options
  • Save theronhitchman/4968722 to your computer and use it in GitHub Desktop.
Save theronhitchman/4968722 to your computer and use it in GitHub Desktop.
Sage Cell code for a web page
<!-- put this in the header-->
<script src='http://sagecell.sagemath.org/static/jquery.min.js'/>
<script src='http://sagecell.sagemath.org/static/embedded_sagecell.js'/>
<link href='http://sagecell.sagemath.org/static/sagecell_embed.css' rel='stylesheet' type='text/css'/>
<style>
.CodeMirror-scroll {height: auto; overflow-y: auto; overflow-x: auto; max-height: 60ex;}
</style>
<script>$(function () { sagecell.makeSagecell({&quot;inputLocation&quot;: &quot;.sage&quot;}) });</script>
<!-- put this in the body where you want a cell. adjust your inputs, of course. -->
<div class="sage">
<script type="text/x-sage">
1+2
</script></div>
@theronhitchman
Copy link
Author

I have adjusted this to follow Jason Grout's suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment