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>
<script src="http://sagecell.sagemath.org/static/embedded_sagecell.js"></script>
<link rel="stylesheet" type="text/css" href="http://sagecell.sagemath.org/static/sagecell_embed.css">
<!-- 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>
<!-- put this in the footer, or at the bottom of the page. -->
<script>sagecell.makeSagecell({"inputLocation": ".sage"});</script>
@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