Ticket #11263: trac_11263-doctests_link_all-FOLDED-fh.patch

File trac_11263-doctests_link_all-FOLDED-fh.patch, 2.8 KB (added by hivert, 10 years ago)
  • doc/en/developer/conventions.rst

    # HG changeset patch
    # User Florent Hivert <Florent.Hivert@univ-rouen.fr>
    # Date 1304458887 -7200
    # Node ID 756555f726a7aacbe1485ae5bfcc79fb220f88f9
    # Parent  543896a601185d677e6040f704c33ca0e3368cfa
    #11263: add ``.. linkall`` for doctests and fix devguide.
    * * *
    #11263: reword the changes to the developer's guide
    also add an example of ".. linkall"
    
    diff --git a/doc/en/developer/conventions.rst b/doc/en/developer/conventions.rst
    a b and ``.sage`` files. 
    865865
    866866Of course in ReST files, one often inserts explanatory texts between
    867867different verbatim environments. To link together verbatim
    868 environments, use the ``.. link::`` comment. For example::
     868environments, use the ``.. link`` comment. For example::
    869869
    870870    ::
    871871
    environments, use the ``.. link::`` comm 
    874874
    875875    Next we add 1 to ``a``.
    876876
    877     .. link::
     877    .. link
    878878
    879879    ::
    880880
    881881            sage: 1 + a
    882882            2
    883883
    884 You can also put ``.. skip::`` right before a verbatim environment to
    885 have that example skipped when testing the file.  This goes right in
    886 the same place as the ``.. link::`` in the previous example.
     884If you want to link all the verbatim environments together, you can
     885put ``.. linkall`` anywhere in the file, on a line by itself.  (For
     886clarity, it might be best to put it near the top of the file.)  Then
     887``sage -t`` will act as if there were a ``.. link`` before each
     888verbatim environment.  The file
     889``SAGE_ROOT/devel/sage/doc/en/tutorial/interfaces.rst`` contains a
     890``.. linkall`` directive, for example.
     891
     892You can also put ``.. skip`` right before a verbatim environment to
     893have that example skipped when testing the file.  This goes in
     894the same place as the ``.. link`` in the previous example.
    887895
    888896See the files in ``SAGE_ROOT/devel/sage/doc/en/tutorial/`` for many
    889897examples of how to include automated testing in ReST documentation
  • doc/en/tutorial/interfaces.rst

    diff --git a/doc/en/tutorial/interfaces.rst b/doc/en/tutorial/interfaces.rst
    a b  
     1.. linkall
     2
    13**********
    24Interfaces
    35**********
    Every PARI object is of type ``py_pari.g 
    104106underlying object can be obtained using the ``type`` member
    105107function.
    106108
    107 .. link
    108 
    109109::
    110110
    111111    sage: v.type()
    In PARI, to create an elliptic curve we  
    116116method that can be called on any PARI object, e.g., our
    117117``t\_VEC v``.
    118118
    119 .. link
    120 
    121119::
    122120
    123121    sage: e = v.ellinit()
    method that can be called on any PARI ob 
    129127Now that we have an elliptic curve object, we can compute some
    130128things about it.
    131129
    132 .. link
    133 
    134130::
    135131
    136132    sage: e.elltors()
    Singular (do not type the ``...``): 
    216212
    217213Now that we have defined :math:`f`, we print it and factor.
    218214
    219 .. link
    220 
    221215::
    222216
    223217    sage: f