Skip to main content

Sphinx sagecellserver extension

Project description

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

  1. Install this extension: 'python setup.py install --user'
  2. Move 'layout.html' to your '_templates' directory. Change sagecell paths if necessary
  3. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

icsecontrib-sagecellserver-1.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distributions

icsecontrib_sagecellserver-1.2-py3.6.egg (5.0 kB view details)

Uploaded Source

icsecontrib_sagecellserver-1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file icsecontrib-sagecellserver-1.2.tar.gz.

File metadata

  • Download URL: icsecontrib-sagecellserver-1.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for icsecontrib-sagecellserver-1.2.tar.gz
Algorithm Hash digest
SHA256 42f4193a0ffaf8cff0447087044ede5ee93ffa866ba59f7a4d0570c8b1ef47a9
MD5 aac2ff2a84be002133e42861dae79b2c
BLAKE2b-256 3d340598025b724a68e7b6172998bd90201a07cf014d5ad7e20c1ecf6f769f6a

See more details on using hashes here.

File details

Details for the file icsecontrib_sagecellserver-1.2-py3.6.egg.

File metadata

  • Download URL: icsecontrib_sagecellserver-1.2-py3.6.egg
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for icsecontrib_sagecellserver-1.2-py3.6.egg
Algorithm Hash digest
SHA256 030fe5c70b0f52b944f04fa5cd1b743997ab9a604e3baf240eca2f3e34e56485
MD5 5f0cbdc567bc7668f5b2d7196c041661
BLAKE2b-256 b8d38f4b393cb473075f4f776acb69a2434ecd8283db3be73817a4e7bb5d40da

See more details on using hashes here.

File details

Details for the file icsecontrib_sagecellserver-1.2-py3-none-any.whl.

File metadata

  • Download URL: icsecontrib_sagecellserver-1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for icsecontrib_sagecellserver-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 533f56effaaa7a0a7b928540b280b9c69f77413c368f30c19f8071f8c5966cc5
MD5 48a520b5b8c7433afea3180a57ccb9d9
BLAKE2b-256 d52cdc0070bd5ff0e223a6d015a0820cdc3199135eb8678feb03fe2701f93291

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page