# 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
#9252: documentation errors in tutorial and others

diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/constructions/groups.rst```
 a (41,43,48,46)(42,45,47,44)(14,22,30,38)(15,23,31,39)(16,24,32,40) )" -  Place the file in the subdirectory ``\$SAGE_ROOT/local/lib/python2.4/site-packages/sage`` of your Sage home ``\\$SAGE_ROOT/local/lib/python2.4/site-packages/sage`` of your Sage home directory. -  Read (i.e.,``{import``) it into Sage:
• ## doc/en/developer/conventions.rst

`diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/developer/conventions.rst`
 a to be typeset.  In Sage docstrings, unofficially you may use dollar signs instead -- "unofficially" means that it ought to work, but might be a little buggy.  Thus ```x^2 + y^2 = 1``` and ``\$x^2 + y^2 = 1\$`` should produce identical output, typeset in math ``\\$x^2 + y^2 = 1\\$`` should produce identical output, typeset in math mode. LaTeX style: typeset standard rings and fields like the integers manual.  Other examples are "\\GF" and "\\Zmod", each of which takes an argument: "\\GF{q}" is typeset as "\\Bold{F}_{q}" and "\\Zmod{n}" is typeset as "\\Bold{Z}/n\\Bold{Z}".  See the file ``\$SAGE_ROOT/devel/sage/sage/misc/latex_macros.py`` for a file ``\\$SAGE_ROOT/devel/sage/sage/misc/latex_macros.py`` for a full list and for details about how to add more macros. -  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 - Do all doctests pass without errors? You can test the Sage library with ``make test`` or ``make ptest`` (edit the number of threads in ``\$SAGE_ROOT/makefile`` before using ``ptest``). See of threads in ``\\$SAGE_ROOT/makefile`` before using ``ptest``). See :ref:`chapter-doctesting` for more information on doctesting the Sage library.
• ## doc/en/installation/binary.rst

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

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

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

`diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/interactive_shell.rst`
• ## doc/en/tutorial/interfaces.rst

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

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

`diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/programming.rst`
 a loading Cython code is not supported with the notebook interface). The actual compilation is done "behind the scenes" without your having to do anything explicit. See ``\$SAGE_ROOT/examples/programming/sagex/factorial.spyx`` for an ``\\$SAGE_ROOT/examples/programming/sagex/factorial.spyx`` for an example of a compiled implementation of the factorial function that directly uses the GMP C library. To try this out for yourself, cd to ``\$SAGE_ROOT/examples/programming/sagex/``, then do the to ``\\$SAGE_ROOT/examples/programming/sagex/``, then do the following: .. skip :: (Interactive Shell) sage: load "factorial.spyx" *************************************************** Note that Sage will recompile ``factorial.spyx`` if you quit and restart Sage. The compiled shared object library is stored under ``\$HOME/.sage/temp/hostname/pid/spyx``. These files are deleted ``\\$HOME/.sage/temp/hostname/pid/spyx``. These files are deleted when you exit Sage. NO Sage preparsing is applied to spyx files, e.g., ``1/3`` will result in :: bash \$ ./factor 2006 bash \\$ ./factor 2006 2 * 17 * 59 bash \$ ./factor "32*x^5-1" bash \\$ ./factor "32*x^5-1" (2*x - 1) * (16*x^4 + 8*x^3 + 4*x^2 + 2*x + 1) Data Types version 1.0) matrix multiplication over finite fields, for example, do: :: sage: k,a = GF(2**8, 'a').objgen() sage: A = Matrix(k,10,10,[k.random_element() for _ in range(10*10)]) .. skip :: (Interactive Shell) sage: k,a = GF(2**8, 'a').objgen() sage: A = Matrix(k,10,10,[k.random_element() for _ in range(10*10)]) sage: %prun B = A*A 32893 function calls in 1.100 CPU seconds :: (Interactive Shell) sage: %prun -r A*A sage: stats = _ sage: stats? .. skip :: (Interactive Shell) sage: k,a = GF(2**8, 'a').objgen() sage: A = Matrix(k,10,10,[k.random_element() for _ in range(10*10)]) sage: import hotshot sage: filename = "pythongrind.prof" sage: prof = hotshot.Profile(filename, lineevents=1) .. skip :: sage: prof.run("A*A") sage: prof.close()
• ## doc/en/tutorial/tour_help.rst

`diff -r 2cffe66bd642 -r 3dd0e973ea45 doc/en/tutorial/tour_help.rst`
 a sage: def is_even(n): ...       return n%2 == 0 ... sage: is_even(2) True sage: is_even(3)