This extension defines a directive 'sagecellserver' which allows to embedd sage cell inside sphinx doc. To learn more about sage cell server visit: http://aleph.sagemath.org/static/about.html
Installation
- Install this extension: 'python setup.py install --user'
- Move 'layout.html' to your '_templates' directory. Change sagecell paths if necessary
- Add 'icsecontrib.sagecellserver' to your extensions in 'conf.py'
How to use it
Example of usage::
.. sagecellserver::
sage: A = matrix([[1,1],[-1,1]])
sage: D = [vector([0,0]), vector([1,0])]
sage: @interact
sage: def f(A = matrix([[1,1],[-1,1]]), D = '[[0,0],[1,0]]', k=(3..17)):
... print "Det = ", A.det()
... D = matrix(eval(D)).rows()
... def Dn(k):
... ans = []
... for d in Tuples(D, k):
... s = sum(A^n*d[n] for n in range(k))
... ans.append(s)
... return ans
... G = points([v.list() for v in Dn(k)],size=50)
... show(G, frame=True, axes=False)
.. end of output
Options
The sage prompts can be removed by adding setting 'prompt_tag' option to False::
.. sagecellserver::
:prompt_tag: False
Setting 'prompt_tag' to True has same effect as removing ':prompt_tag:'.
During latex/pdf generation sagecell code can be displayed inside '\begin{verbatim}' and '\end{verbatim}' tags or as a single \textbf 'SAGE CELL' message. This message is a reminder of sage cell exsistence. For example later this text can be manually replaced by screenshoot of sagcell example (mostly @interact example).
This option is controlled using 'is_verbatim' option. Default is 'True'.::
.. sagecellserver::
:is_verbatim: True
Metadata
Release files for icsecontrib-sagecellserver 1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| icsecontrib-sagecellserver-1.3.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| icsecontrib_sagecellserver-1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / icsecontrib-sagecellserver-1.3.tar.gz
| Download URL | icsecontrib-sagecellserver-1.3.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64bd4f7cf2c47cbec05e5c8b2d3fb3df5ed072b9a243e81eb1a3c5c73be226e9
|
|
BLAKE2b-256 checksum How to use checksums |
40bbb7e42714b933a612005bdff36c711acda3f0b4f6e7c0abd453fbba72a5a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.6.9
|
Release files / icsecontrib_sagecellserver-1.3-py3-none-any.whl
| Download URL | icsecontrib_sagecellserver-1.3-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90ec98257c6b28f40d8b1d92aa842584c652fb06096f605433f682eae886fbe2
|
|
BLAKE2b-256 checksum How to use checksums |
bd1f9db7a943d30d5da93b9e842827095022d36c333cc9ad911d4dd0f4cc4039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.6.9
|