Ask Your Question

Revision history [back]

In rst files, you need to link different code blocks together, if you want them to be treated as a single block (e.g., if you want variables, etc., defined in one block to still be defined in the second one). For example, from tour_advanced.rst in the tutorial:

::

    sage: F = EllipticCurve_from_j(110592/37)
    sage: F.conductor()
    37

However, the twist of :math:`F` by 2 gives an isomorphic curve.

.. link

::

    sage: G = F.quadratic_twist(2); G
    Elliptic Curve defined by y^2 = x^3 - 4*x + 2 over Rational Field
    sage: G.conductor()
    2368
    sage: G.j_invariant()
    110592/37

Alternatively, you can put .. linkall at the top of the file, and then all code blocks in the file will be linked. See the developer's guide.