Ticket #9252: trac9252.1.patch

File trac9252.1.patch, 18.6 KB (added by wjlaffin, 12 years ago)
  • doc/en/constructions/groups.rst

    # HG changeset patch
    # User William Laffin <wjlaffin@mtu.edu>
    # Date 1276816851 14400
    # Node ID 3dd0e973ea45971c933ee6586f35ad6eb23f0d3e
    # Parent  2cffe66bd64266c6a64d31ca37ad81d8d5390af8
    #9252: documentation errors in tutorial and others
    
    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/constructions/groups.rst
    a b  
    7171       (41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40) )"
    7272
    7373-  Place the file in the subdirectory
    74    ``$SAGE_ROOT/local/lib/python2.4/site-packages/sage`` of your Sage home
     74   ``\$SAGE_ROOT/local/lib/python2.4/site-packages/sage`` of your Sage home
    7575   directory.
    7676
    7777-  Read (i.e.,``{import``) it into Sage:
  • doc/en/developer/conventions.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/developer/conventions.rst
    a b  
    521521      to be typeset.  In Sage docstrings, unofficially you may use
    522522      dollar signs instead -- "unofficially" means that it ought to
    523523      work, but might be a little buggy.  Thus ```x^2 + y^2 = 1``` and
    524       ``$x^2 + y^2 = 1$`` should produce identical output, typeset in math
     524      ``\$x^2 + y^2 = 1\$`` should produce identical output, typeset in math
    525525      mode.
    526526
    527527      LaTeX style: typeset standard rings and fields like the integers
     
    556556      manual.  Other examples are "\\GF" and "\\Zmod", each of which
    557557      takes an argument: "\\GF{q}" is typeset as "\\Bold{F}_{q}" and
    558558      "\\Zmod{n}" is typeset as "\\Bold{Z}/n\\Bold{Z}".  See the
    559       file ``$SAGE_ROOT/devel/sage/sage/misc/latex_macros.py`` for a
     559      file ``\$SAGE_ROOT/devel/sage/sage/misc/latex_macros.py`` for a
    560560      full list and for details about how to add more macros.
    561561
    562562-  Liberally describe what the examples do. Note that there must be
  • doc/en/developer/trac.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/developer/trac.rst
    a b  
    247247
    248248- Do all doctests pass without errors? You can test the Sage
    249249  library with ``make test`` or ``make ptest`` (edit the number
    250   of threads in ``$SAGE_ROOT/makefile`` before using ``ptest``). See
     250  of threads in ``\$SAGE_ROOT/makefile`` before using ``ptest``). See
    251251  :ref:`chapter-doctesting` for more information on doctesting the
    252252  Sage library.
    253253
  • doc/en/installation/binary.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/installation/binary.rst
    a b  
    3434``/usr/local/bin/``, but then you have to edit the
    3535``SAGE_ROOT="....."`` line at the top of that file, replacing the dots
    3636with the path to the Sage directory ``sage-x.y.z-x86_64-Linux``.  As
    37 long as ``/usr/local/bin`` is in your ``$PATH``, you can then type
     37long as ``/usr/local/bin`` is in your ``\$PATH``, you can then type
    3838``sage`` from the command line to run Sage.  Another approach is to
    3939create a symbolic link from ``sage-x.y.z-x86_64-Linux`` to, say,
    4040``/usr/local/share/sage``::
    4141
    4242    ln -s /.../path_to/.../sage-x.y.z-x86_64-Linux /usr/local/share/sage
    4343
    44 Then put ``/usr/local/share/sage`` in your ``$PATH``.  If you do this,
     44Then put ``/usr/local/share/sage`` in your ``\$PATH``.  If you do this,
    4545you can type ``sage`` from the command line to run Sage.  Also, if you
    4646install a different version of Sage, you just have to delete the old
    4747link and create one from the new directory to
  • doc/en/installation/source.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/installation/source.rst
    a b  
    399399   corresponding program by a particular name: Mathematica is invoked
    400400   by calling ``math``, Maple by calling ``maple``, et cetera. The
    401401   easiest way to change this name or perform other customizations is
    402    to create a redirection script in ``$SAGE_ROOT/local/bin``. Sage
     402   to create a redirection script in ``\$SAGE_ROOT/local/bin``. Sage
    403403   inserts this directory at the front of your PATH, so your script
    404404   may need to use an absolute path to avoid calling itself; also,
    405    your script should use ``$*`` to pass along all of its arguments.
     405   your script should use ``\$*`` to pass along all of its arguments.
    406406   For example, a ``maple`` script might look like:
    407407
    408408   ::
     
    415415   easier:
    416416
    417417
    418    -  Copy ``$SAGE_ROOT/sage`` to a location in your ``PATH``. If you do
     418   -  Copy ``\$SAGE_ROOT/sage`` to a location in your ``PATH``. If you do
    419419      this, make sure you edit the line with the ``....``'s at the top of
    420420      the ``sage`` script.
    421421
     
    427427          konsole -T "sage" -e <SAGE_ROOT>/sage
    428428
    429429      which you make executable (``chmod a+x sage``) and put it somewhere in
    430       your path. (Note that you have to change ``$SAGE_ROOT`` above!) You
     430      your path. (Note that you have to change ``\$SAGE_ROOT`` above!) You
    431431      can also make a KDE desktop icon with this as the command (under
    432432      the Application tab of the Properties of the icon, which you get my
    433433      right clicking the mouse on the icon).
     
    446446      this and logging out and in again, typing ``sage`` at a shell prompt
    447447      should start Sage.
    448448
    449    - On Linux and OS X systems, you can make an alias to ``$SAGE_ROOT/sage``.
     449   - On Linux and OS X systems, you can make an alias to ``\$SAGE_ROOT/sage``.
    450450     For example, put something similar to the following line in your
    451451     ``.bashrc`` file:
    452452
     
    465465   a long time, and those that depend on optional packages and
    466466   software, e.g., Mathematica or Magma. Some (optional) examples will
    467467   likely fail because they assume that a database is installed.
    468    Alternatively, from within ``$SAGE_ROOT``, you can type
     468   Alternatively, from within ``\$SAGE_ROOT``, you can type
    469469   ``make test`` to run all the standard test code.  This can take
    470470   from 30 minutes to an hour or longer.
    471471
  • doc/en/numerical_sage/installation_osx.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/numerical_sage/installation_osx.rst
    a b  
    1010    cd $SAGE_ROOT/local/lib
    1111    rm libpng*.dylib
    1212
    13 where ``$SAGE_ROOT`` is the directory of your
     13where ``\$SAGE_ROOT`` is the directory of your
    1414Sage install. Next from within Sage,
    1515
    1616.. skip
  • doc/en/tutorial/interactive_shell.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/interactive_shell.rst
    a b  
    77using the ``sage`` command. This starts a customized version of the
    88IPython shell, and imports many functions and classes, so they are
    99ready to use from the command prompt. Further customization is
    10 possible by editing the ``$SAGE_ROOT/ipythonrc`` file. Upon starting
     10possible by editing the ``\$SAGE_ROOT/ipythonrc`` file. Upon starting
    1111Sage, you get output similar to the following:
    1212
    1313.. skip
    1414
    1515::
    16 
     16   
    1717    ----------------------------------------------------------------------
    1818    | SAGE Version 3.1.1, Release Date: 2008-05-24                       |
    1919    | Type notebook() for the GUI, and license() for information.        |
     
    2828.. skip
    2929
    3030::
    31 
     31   
     32    (Interactive Shell)
     33   
    3234    sage: quit
    3335    Exiting SAGE (CPU time 0m0.00s, Wall time 0m0.89s)
    3436
     
    3941(Avoid killing a Sage process with ``kill -9`` from a terminal,
    4042since Sage might not kill child processes, e.g.,
    4143Maple processes, or cleanup temporary files from
    42 ``$HOME/.sage/tmp``.)
     44``\$HOME/.sage/tmp``.)
    4345
    4446Your Sage Session
    4547=================
     
    5052notebook interface), then at any point you may type ``%hist`` to
    5153get a listing of all input lines typed so far. You can type ``?`` at
    5254the Sage prompt to find out more about IPython, e.g.,
    53 "IPython offers numbered prompts ... with input and output caching. All input is saved and can be retrieved as variables (besides the usual arrow key recall). The following GLOBAL variables always exist (so don't overwrite them!)":
     55"IPython offers numbered prompts ... with input and output caching.
     56All input is saved and can be retrieved as variables (besides the
     57usual arrow key recall). The following GLOBAL variables always exist
     58(so don't overwrite them!)":
    5459
    5560::
    56 
    57       _:  previous input (interactive shell and notebook)
    58       __: next previous input (interactive shell only)
    59       _oh : list of all inputs (interactive shell only)
     61   
     62    _:  previous input (interactive shell and notebook)
     63    __: next previous input (interactive shell only)
     64    _oh : list of all inputs (interactive shell only)
    6065
    6166Here is an example:
    6267
    6368.. skip
    6469
    6570::
    66 
     71   
     72    (Interactive Shell)
     73   
    6774    sage: factor(100)
    6875     _1 = 2^2 * 5^2
    6976    sage: kronecker_symbol(3,5)
     
    96103.. skip
    97104
    98105::
    99 
     106   
     107    (Interactive Shell)
     108   
    100109    sage: E = EllipticCurve([1,2,3,4,5])
    101110    sage: M = ModularSymbols(37)
    102111    sage: %hist
     
    105114    3: %hist
    106115    sage: %macro em 1-2
    107116    Macro `em` created. To execute, type its name (without quotes).
    108 
    109 
    110 .. skip
    111 
    112 ::
    113 
    114117    sage: E
    115118    Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over
    116119    Rational Field
     
    129132.. skip
    130133
    131134::
    132 
     135   
     136    (Interactive Shell)
     137   
    133138    sage: !ls
    134139    auto  example.sage glossary.tex  t  tmp  tut.log  tut.tex
    135140
     
    142147.. skip
    143148
    144149::
    145 
     150   
     151    (Interactive Shell)
     152   
    146153    sage: !gp
    147154    Reading GPRC: /etc/gprc ...Done.
    148155   
     
    169176.. skip
    170177
    171178::
    172 
    173     was@form:~$ sage
     179   
     180    was@form:~\$ sage
    174181    ----------------------------------------------------------------------
    175182    | SAGE Version 3.0.2, Release Date: 2008-05-24                       |
    176183    | Type notebook() for the GUI, and license() for information.        |
     
    189196    sage: G = E.gens()
    190197    sage:
    191198    Exiting SAGE (CPU time 0m0.61s, Wall time 0m50.39s).
    192     was@form:~$ sage
     199    was@form:~\$ sage
    193200    ----------------------------------------------------------------------
    194201    | SAGE Version 3.0.2, Release Date: 2008-05-24                       |
    195202    | Type notebook() for the GUI, and license() for information.        |
     
    228235.. skip
    229236
    230237::
    231 
     238   
     239    (Interactive Shell)
     240   
    232241    sage: 2^10
    233242    1024
    234243    sage: sage: sage: 2^10
     
    249258.. skip
    250259
    251260::
    252 
     261   
     262    (Interactive Shell)
     263   
    253264    sage: %time a = int(1938)^int(99484)
    254265    CPU times: user 0.66 s, sys: 0.00 s, total: 0.66 s
    255266    Wall time: 0.66
     
    265276.. skip
    266277
    267278::
    268 
     279   
     280    (Interactive Shell)
     281   
    269282    sage: %time a = 1938^99484
    270283    CPU times: user 0.04 s, sys: 0.00 s, total: 0.04 s
    271284    Wall time: 0.04
     
    275288.. skip
    276289
    277290::
    278 
     291   
     292    (Interactive Shell)
     293   
    279294    sage: %time a = pari(1938)^pari(99484)
    280295    CPU times: user 0.05 s, sys: 0.00 s, total: 0.05 s
    281296    Wall time: 0.05
     
    284299PARI built for Sage uses GMP for integer arithmetic).
    285300
    286301You can also time a block of commands using
    287 the ``cputime`` command, as illustrated below:
     302the ``cputime`` command, as illustrated below:S
    288303
    289304::
    290 
     305   
    291306    sage: t = cputime()
    292307    sage: a = int(1938)^int(99484)
    293308    sage: b = 1938^99484
     
    298313.. skip
    299314
    300315::
    301 
     316   
     317    (Interactive Shell)
     318   
    302319    sage: cputime?
    303320    ...
    304321        Return the time in CPU second since SAGE started, or with optional
     
    321338.. skip
    322339
    323340::
    324 
     341   
     342    (Interactive Shell)
     343   
    325344    sage: time 1938^99484;
    326345    CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s
    327346    Wall time: 0.01
     
    373392.. skip
    374393
    375394::
    376 
     395   
     396    (Interactive Shell)
     397   
    377398    sage: 3_2
    378399    ------------------------------------------------------------
    379400       File "<console>", line 1
     
    397418.. skip
    398419
    399420::
    400 
     421   
     422    (Interactive Shell)
     423   
    401424    sage: %pdb
    402425    Automatic pdb calling has been turned ON
    403426    sage: EllipticCurve([1,infinity])
     
    411434prompt:
    412435
    413436::
    414 
     437   
    415438    ipdb> ?
    416439   
    417440    Documented commands (type help <topic>):
     
    670693    [ 69  90 111]
    671694    sage: save(A, 'A')
    672695
     696(In the notebook, click on ``A.sobj`` to download the object.)
    673697You should now quit Sage and restart. Then you can get ``A`` back:
    674698
    675699.. skip
     
    702726
    703727::
    704728
    705     ~/tmp$ ls -l E.sobj
     729    ~/tmp\$ ls -l E.sobj
    706730    -rw-r--r--  1 was was 153500 2006-01-28 19:23 E.sobj
    707     ~/tmp$ sage [...]
     731    ~/tmp\$ sage [...]
    708732    sage: E = load('E')
    709733    sage: v = E.anlist(100000)              # instant!
    710734
     
    802826.. skip
    803827
    804828::
    805 
     829   
     830    (Interactive Shell)
     831   
    806832    sage: E = EllipticCurve('11a')
    807833    sage: M = ModularSymbols(37)
    808834    sage: a = 389
     
    815841.. skip
    816842
    817843::
    818 
     844   
     845    (Interactive Shell)
     846   
    819847    sage: save_session('misc')
    820848    Saving a
    821849    Saving M
    822850    Saving t
    823851    Saving E
    824852    sage: quit
    825     was@form:~/tmp$ ls -l misc.sobj
     853    was@form:~/tmp\$ ls -l misc.sobj
    826854    -rw-r--r--  1 was was 2979 2006-01-28 19:47 misc.sobj
    827855
    828856Finally we restart Sage, define an extra variable, and load our saved
     
    831859.. skip
    832860
    833861::
    834 
     862   
     863    (Interactive Shell)
     864   
    835865    sage: b = 19
    836866    sage: load_session('misc')
    837867    Loading a
     
    845875.. skip
    846876
    847877::
     878   
     879    (Interactive Shell)
    848880
    849881    sage: M
    850882    Full Modular Symbols space for Gamma_0(37) of weight 2 with sign 0
     
    869901.. skip
    870902
    871903::
     904   
     905    (Interactive Shell)
    872906
    873907    sage: notebook()
    874908
    875909on the command line of Sage. This starts the Sage notebook and
    876910opens your default web browser to view it. The server's state files
    877 are stored in ``$HOME/.sage/sage\_notebook``.
     911are stored in ``\$HOME/.sage/sage\_notebook``.
    878912
    879913Other options include:
    880914
    881915.. skip
    882916
    883917::
     918   
     919    (Interactive Shell)
    884920
    885921    sage: notebook("directory")
    886922
    887923which starts a new notebook server using files in the given
    888924directory, instead of the default directory
    889 ``$HOME/.sage/sage_notebook``. This can be useful if you want to
     925``\$HOME/.sage/sage_notebook``. This can be useful if you want to
    890926have a collection of worksheets associated with a specific project,
    891927or run several separate notebook servers at the same time.
    892928
    893929When you start the notebook, it first creates the following files
    894 in ``$HOME/.sage/sage_notebook``:
     930in ``\$HOME/.sage/sage_notebook``:
    895931
    896932::
    897933
  • doc/en/tutorial/interfaces.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/interfaces.rst
    a b  
    114114In PARI, to create an elliptic curve we enter
    115115``ellinit([1,2,3,4,5])``. Sage is similar, except that ``ellinit`` is a
    116116method that can be called on any PARI object, e.g., our
    117 ``t\_VEC v``.
     117``t_VEC v``.
    118118
    119119.. link
    120120
     
    188188for ``database\_gap-x.y.z``.
    189189Some non-GPL'd GAP packages may be installed by downloading them
    190190from the GAP web site [GAPkg]_,
    191 and unpacking them in ``$SAGE_ROOT/local/lib/gap-4.4.10/pkg``.
     191and unpacking them in ``\$SAGE_ROOT/local/lib/gap-4.4.10/pkg``.
    192192)
    193193
    194194Singular
  • doc/en/tutorial/introduction.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/introduction.rst
    a b  
    9393   will search.
    9494
    9595   The documentation for using SageTeX is located in
    96    ``$SAGE_ROOT/local/share/texmf/tex/generic/sagetex/``, where
    97    "``$SAGE_ROOT``" refers to the directory where you installed Sage --
    98    for example, ``/opt/sage-4.2.1``.
     96   ``\$SAGE_ROOT/local/share/texmf/tex/generic/sagetex/``, where
     97   "``\$SAGE_ROOT``" refers to the directory where you installed Sage --
     98   for example, ``/opt/sage-4.4.3``.
    9999
    100100Ways to Use Sage
    101101================
  • doc/en/tutorial/programming.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/programming.rst
    a b  
    100100loading Cython code is not supported with the notebook interface).
    101101The actual compilation is done "behind the scenes" without your
    102102having to do anything explicit. See
    103 ``$SAGE_ROOT/examples/programming/sagex/factorial.spyx`` for an
     103``\$SAGE_ROOT/examples/programming/sagex/factorial.spyx`` for an
    104104example of a compiled implementation of the factorial function that
    105105directly uses the GMP C library. To try this out for yourself, cd
    106 to ``$SAGE_ROOT/examples/programming/sagex/``, then do the
     106to ``\$SAGE_ROOT/examples/programming/sagex/``, then do the
    107107following:
    108108
    109109.. skip
    110110
    111111::
     112   
     113    (Interactive Shell)
    112114
    113115    sage: load "factorial.spyx"
    114116    ***************************************************
     
    125127
    126128Note that Sage will recompile ``factorial.spyx`` if you quit and restart Sage.
    127129The compiled shared object library is stored under
    128 ``$HOME/.sage/temp/hostname/pid/spyx``. These files are deleted
     130``\$HOME/.sage/temp/hostname/pid/spyx``. These files are deleted
    129131when you exit Sage.
    130132
    131133NO Sage preparsing is applied to spyx files, e.g., ``1/3`` will result in
     
    207209
    208210::
    209211
    210     bash $ ./factor 2006
     212    bash \$ ./factor 2006
    211213    2 * 17 * 59
    212     bash $ ./factor "32*x^5-1"
     214    bash \$ ./factor "32*x^5-1"
    213215    (2*x - 1) * (16*x^4 + 8*x^3 + 4*x^2 + 2*x + 1)
    214216
    215217Data Types
     
    752754version 1.0) matrix multiplication over finite fields, for example,
    753755do:
    754756
    755 ::
    756 
    757     sage: k,a = GF(2**8, 'a').objgen()
    758     sage: A = Matrix(k,10,10,[k.random_element() for _ in range(10*10)])
    759 
    760757.. skip
    761758
    762759::
    763760
     761    (Interactive Shell)
     762   
     763    sage: k,a = GF(2**8, 'a').objgen()
     764    sage: A = Matrix(k,10,10,[k.random_element() for _ in range(10*10)])
    764765    sage: %prun B = A*A
    765766           32893 function calls in 1.100 CPU seconds
    766767   
     
    798799
    799800::
    800801
     802    (Interactive Shell)
     803   
    801804    sage: %prun -r A*A
    802805    sage: stats = _
    803806    sage: stats?
     
    814817.. skip
    815818
    816819::
    817 
     820   
     821    (Interactive Shell)
     822   
    818823    sage: k,a = GF(2**8, 'a').objgen()
    819824    sage: A = Matrix(k,10,10,[k.random_element() for _ in range(10*10)])
    820825    sage: import hotshot
    821826    sage: filename = "pythongrind.prof"
    822827    sage: prof = hotshot.Profile(filename, lineevents=1)
    823 
    824 .. skip
    825 
    826 ::
    827 
    828828    sage: prof.run("A*A")
    829829    <hotshot.Profile instance at 0x414c11ec>
    830830    sage: prof.close()
  • doc/en/tutorial/tour_help.rst

    diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/tour_help.rst
    a b  
    114114
    115115    sage: def is_even(n):
    116116    ...       return n%2 == 0
    117     ...
    118117    sage: is_even(2)
    119118    True
    120119    sage: is_even(3)