ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 25 May 2018 14:20:42 -0500Good(new 2017+) Book/Tutorialhttp://ask.sagemath.org/question/40502/goodnew-2017-booktutorial/Is there a good and new Book or Tutorial for Sagemath? thethaSat, 06 Jan 2018 09:49:56 -0600http://ask.sagemath.org/question/40502/Offline docset for SageMathhttp://ask.sagemath.org/question/42435/offline-docset-for-sagemath/There are plenty of offline documentation tools like [Zeal](https://zealdocs.org/) (Linux, MacOS, Windows), [Dash](https://kapeli.com/dash) (MacOS) and [dasht](https://github.com/sunaku/dasht) (for terminal and with [Vim integration](https://github.com/sunaku/vim-dasht)). Most of them support Dash format of offline docs. There are hundreds of [pre-generated](https://kapeli.com/dash#docsets) docsets (including Python) and [even more](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets) but Sage docset is missing.
There is a tool for [generating python docset](https://kapeli.com/docsets#python): [doc2dash](https://pypi.org/project/doc2dash/). It supports two doc formats: Sphinx and pydoctor. Unfortunately I'm not familiar with either of them neither with Sage docs.
So my question is: how to create SageMath docset with doc2dash? My goal is to have Sage offline documentation with editor integration.petRUShkaFri, 25 May 2018 14:20:42 -0500http://ask.sagemath.org/question/42435/sagemath-8.1 windowshttp://ask.sagemath.org/question/42120/sagemath-81-windows/ In sagemath-8.1 windows native installation . Help files are poorly formatted, particularly in the Reference Documentation. They appear to not be accessing a .css file.
Do I have a faulty installation file, and if so how can I get a copy a non-faulty one?NormekSat, 21 Apr 2018 22:50:45 -0500http://ask.sagemath.org/question/42120/Commands that changed expressionhttp://ask.sagemath.org/question/41258/commands-that-changed-expression/Hello!
Following a recent question about the new expressions for "find_minimum/maximum_on_interval", I have a more general concern: are commands that changed name across versions documented and collected in some form? So that old documentation and books aren't rendered irremediably obsolete by Sage's evolution.isaia.ismaeleSun, 25 Feb 2018 07:35:22 -0600http://ask.sagemath.org/question/41258/Name of this project: Sage or Sagemath?http://ask.sagemath.org/question/39831/name-of-this-project-sage-or-sagemath/ Wikipedia writes
> SageMath (previously Sage or SAGE, "System for Algebra and Geometry Experimentation"[2]) is a mathematical software with features covering many aspects of mathematics...
However, I see that the names "Sage" and "Sagemath" are both used in the documentation files, without an apparent logic. Moreover, a few Google searches fail to return information on this name change.
Should I call this software "Sage" or "Sagemath"? Is one of the two names deprecated? Should we correct it when we see it used on the internet or on the documentation, or are both acceptable? Is there official information from the development team about this renaming?
FedericoTue, 28 Nov 2017 13:07:39 -0600http://ask.sagemath.org/question/39831/Unable to Use Array without Issue(s) bar turing redhttp://ask.sagemath.org/question/37715/unable-to-use-array-without-issues-bar-turing-red/
In my Sage/CoCalc article (Sage has recently merged with CoCalc), I am unable to create an Array without a red issue bar popping up. Morover, I am unable to cross out element in my array. The issue(s) is `PackageArrayError; illegal pream-token (1): PackageArrayError; illegal pream-token (2)`: ...... and so on.
The whole Document is below.
\documentclass{article}
% set font encoding for PDFLaTeX or XeLaTeX
\usepackage{ifxetex}
\ifxetex
\usepackage{fontspec}
\else
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\fi
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{graphicx}
\usepackage{breqn}
\usepackage{fixltx2e}
\usepackage{hyperref}
\usepackage{titlesec}
\usepackage{amsopn}
\usepackage{array}
\newcommand{\dd}[1]{\mathrm{d}#1}
% used in maketitle
\title{Regarding Your Version of Natural Density to Rationals}
\author{Aiyappan Nair}
\begin{document}
\maketitle
Your version of asymptotic density to rationals differs from my own version. It is not a simplification but rather a change in definition. And although it is much more simple there are flaws that I would like to mention.
\subsection{Counter-Example}
As mentioned earlier, if sets $T_1,T_2,T_p$ are subsets of $\mathbb{Q}$, a density $D$ should have the following qualities.
(1) If $T_1=T_2$ then $D(T_1)=D(T_2)$
(2) If $T_1\subset{T_2}$ then $D(T_1)\le D(T_2)$
In your new version of the density
$$D=\lim_{r\to\infty}\frac{\left|T_1\cap V(r)\right|}{|V(r)|}$$
Where
$$V(r)=\left\{\left.\frac{m}{n}\right|1<m<r,1<n<r,\gcd(m,n)=1\right\}$$
and $m,n,r\in\mathbb{Z}$
If we set $T_1=\left\{\left.\frac{m}{2n+1}\right|m,n\in\mathbb{Z}\right\}$ and $T_2=\left\{\left.\frac{m}{4n+2}\right|m,n\in\mathbb{Z}\right\}$, I found that $D(T_1)>D(T_2)$ even though $T_1\subset T_2$. Which breaks requirment (2).
\subsection{Proof of Counter Example}
Imagine $V(r)$ as an array of values, restricted by $r$. The numerator is from listed as columns each labelled from $[1,r]$ and the denominator is listed as row labelled from $[1,r]$.
\begin{array}{|l|col1 col2 col3 col4 col5 col6 col7 col8}
& 1 & 2 & 3 & 4 & 5 & .. & r\\
\hline
1 & 1/1 & 2/1 & 3/1 & 4/1 & 5/1 & ..& r/1\\
2 & 1/2 & \st{2/2} & 3/2 & 4/2 & 5/2 & ..& r/2\\
3 & 1/3 & 2/3 & 3/3 & 4/3 & 5/3 & ..& r/3\\
4 & 1/4 & 2/4 & 3/4 & 4/4 & 5/4 & ..& r/4\\
5 & 1/5 & 2/5 & 3/5 & 4/5 & 5/5 & ..& r/5\\
..& .. & .. & .. & .. & .. & ..& .. \\
r & 1/r & 2/r & 3/r & 4/r & 5/r & .. & r/r\\
\end{array}
\end{document}
I have never had this problem with SageMath before it merged with CoCalc. Please help.Krishnan ArbujaFri, 26 May 2017 20:26:21 -0500http://ask.sagemath.org/question/37715/how can i contribute to sage documentation v7.5?I have found a few glitches in documentationhttp://ask.sagemath.org/question/36649/how-can-i-contribute-to-sage-documentation-v75i-have-found-a-few-glitches-in-documentation/ I want to fix a few typos in the sage documentation v7.5. I would love to know where to make the changes.asutosh7hotaFri, 17 Feb 2017 06:35:43 -0600http://ask.sagemath.org/question/36649/Sage HTML Documentation LaTeX formattinghttp://ask.sagemath.org/question/32709/sage-html-documentation-latex-formatting/ When I view Sage's documentation pages online, all latex equations have a vertical bar | at the end of them. Has this happened for others? Why is it happening and how can it be fixed?
I'm using google chrome with some latex extensions. I tried deactivating/reactivating them, and nothing seemed to help.
Thanks for the helpmyje02@gmail.comThu, 03 Mar 2016 20:32:49 -0600http://ask.sagemath.org/question/32709/Documentation within a single filehttp://ask.sagemath.org/question/31076/documentation-within-a-single-file/ Sage documentation is segmented in [multiple pdf files](http://doc.sagemath.org/). Does the docs provide a single big file we can search in as it was the case some years ago? If not, is it possible to get all the doc files by downloading a single zip file in order to merge the various files with ad hoc pdf tools?candideThu, 26 Nov 2015 02:14:25 -0600http://ask.sagemath.org/question/31076/Sage 6.6 link to compressed docs file brokenhttp://ask.sagemath.org/question/26832/sage-66-link-to-compressed-docs-file-broken/Is there some other place to download the entire compressed archive of Sage 6.6 documentation?
The usual link "You can download the entire standard documentation as a compressed file: download." at http://www.sagemath.org/help.html#SageStandardDoc
is broken: that link just takes you to the page http://doc.sagemath.org/#download with all the individual file download links.murrayeThu, 14 May 2015 13:56:30 -0500http://ask.sagemath.org/question/26832/how to report typos in the documentation?http://ask.sagemath.org/question/26467/how-to-report-typos-in-the-documentation/Now and then I spot typos in the documentation. What is the appropriate way to report such typos?
E.g. in "Linear Codes -- Sage Reference Manual v6.2: Coding Theory" in the function
"redunadancy_matrix(C)"
instead of (in TeX)
$kimes(n-k)$ matrix
it should be
$k\times(n-k)$ matrix
best ThomasThRWed, 08 Apr 2015 11:48:29 -0500http://ask.sagemath.org/question/26467/single PDF of Sage Reference manual?http://ask.sagemath.org/question/26063/single-pdf-of-sage-reference-manual/Is there a PDF of the entire [Sage Reference Manual](http://www.sagemath.org/doc/reference/index.html), all in one PDF (not split up as [here](http://www.sagemath.org/pdf/en/reference/reference.pdf))?GeremiaSat, 07 Mar 2015 10:55:17 -0600http://ask.sagemath.org/question/26063/How to find the full argument list of a built-in function?http://ask.sagemath.org/question/25609/how-to-find-the-full-argument-list-of-a-built-in-function/My first use of Sage is utilizing its fantastic 3D plotting capabilities with Jmol. I am visualizing 3D curves from data points via line3d() and than using the show() method on the graphics objects. line3d? and show? give a short list of arguments such as color, thickness, radius for line3d, and frame for show. I know there are many more arguments, for example corner_cutoff for smoothing, but I only stumble upon them while browsing the Sage documentation. So far, I haven't found a source to list all the arguments for line3d or similar functions. I understand that these are Python wrappers and I tried things like dir() but I could not find more information than that given by line3d? Where am I going wrong? I am quite sure there are arguments controlling background color, the way frames and axes are labeled, etc. How can I find them? -Thanks.ikolMon, 26 Jan 2015 19:39:20 -0600http://ask.sagemath.org/question/25609/Unable to build documentation (ValueError: unknown locale: UTF-8)http://ask.sagemath.org/question/25089/unable-to-build-documentation-valueerror-unknown-locale-utf-8/ When I try to build the sage documentation I get an error. What am I doing wrong? The same error appears when I try
make doc-clean && make
Here is a transcript:
amri@as154:~/sage$ sage -docbuild
Traceback (most recent call last):
File "/home/amri/sage/src/doc/common/builder.py", line 16, in <module>
import sphinx.cmdline
File "/home/amri/sage/local/lib/python2.7/site-packages/Sphinx-1.2.2-py2.7.egg/sphinx/cmdline.py", line 18, in <module>
from docutils.utils import SystemMessage
File "/home/amri/sage/local/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
import docutils.io
File "/home/amri/sage/local/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/home/amri/sage/local/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/home/amri/sage/local/lib/python/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/home/amri/sage/local/lib/python/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8AmriWed, 03 Dec 2014 01:13:52 -0600http://ask.sagemath.org/question/25089/some links cannot back Sage Reference Manualhttp://ask.sagemath.org/question/24641/some-links-cannot-back-sage-reference-manual/1
https://sage.epsevg.upc.edu:8000/doc/live/reference/plane_curves/sage/schemes/elliptic_curves/jacobian.html
when link below,no button to back to Sage Reference Manual
REFERENCES:
[WpJacobianVariety] http://en.wikipedia.org/wiki/Jacobian_variety
2
https://sage.epsevg.upc.edu:8000/doc/live/reference/plane_curves/sage/schemes/elliptic_curves/constructor.html
when link below,no button to back to Sage Reference Manual,it link to http://trac.sagemath.org/13100,but blank page...
there are more links like above troubles at other places in Sage Reference Manual,I meet several times
cjshMon, 27 Oct 2014 03:41:03 -0500http://ask.sagemath.org/question/24641/Trouble building documentation with the development version of Sagehttp://ask.sagemath.org/question/23827/trouble-building-documentation-with-the-development-version-of-sage/When I run
sage -docbuild reference/groups html
I get
Deleting empty directory /home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/static
Deleting empty directory /home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/en/reference/graphs/static
Deleting empty directory /home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/en/reference/graphs/templates
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv'
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/modfrm_hecketriangle/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/modfrm_hecketriangle/objects.inv'
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/repl/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/repl/objects.inv'
[groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/quivers/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/quivers/objects.inv'
Error building the documentation.
Note: incremental documentation builds sometimes cause spurious
error messages. To be certain that these are real errors, run
"make doc-clean" first and try again.
Traceback (most recent call last):
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/builder.py", line 1490, in <module>
getattr(get_builder(name), type)()
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/builder.py", line 714, in _wrapper
getattr(DocBuilder, build_type)(self, *args, **kwds)
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/builder.py", line 109, in f
execfile(sys.argv[0])
File "/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/common/custom-sphinx-build.py", line 210, in <module>
raise OSError(ERROR_MESSAGE)
OSError: [groups ] WARNING: intersphinx inventory '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/amri/myfiles/myfiles/sage-6.0-i686-Linux/src/doc/output/html/en/reference/game_theory/objects.inv'
When I try
make doc-clean
I get
make: *** No rule to make target `doc-clean'. Stop.
Can someone explain what the problem is, and how to get around it? This was on a clean installation of 6.4.beta0
AmriTue, 19 Aug 2014 00:00:53 -0500http://ask.sagemath.org/question/23827/influence order of entries in function documentationhttp://ask.sagemath.org/question/23568/influence-order-of-entries-in-function-documentation/ The documentation output from Sphinx for my source code has the functions ordered alphabetically large caps first. I would like to have it alphabetically mixed caps in my file. How can I achieve this?
(It appears there is a Sphinx config option named autodoc_member_order that changes it for the whole project but maybe I'm missing something that was added by Sage)
**Update**: I tried to work around it by naming the lowercase function with initial cap, and making an alias to that but now the function docs are duplicated! Needless to say, I find the limited options in Sphinx very disappointing.rwsThu, 24 Jul 2014 08:59:35 -0500http://ask.sagemath.org/question/23568/the same function appears twice in the documentationhttp://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/The functions base_field()/constant_base_field()/constant_field()/vector_space()/maximal_order()/random_element appear twice in the following document:
http://sagemath.org/doc/reference/function_fields/sage/rings/function_field/function_field.html
and what different with RationalFunctionField() and FunctionField()?cjshWed, 19 Feb 2014 17:16:02 -0600http://ask.sagemath.org/question/11056/Using live tutorial from local copy of Sagehttp://ask.sagemath.org/question/11066/using-live-tutorial-from-local-copy-of-sage/I'm trying to view the live (interactive) tutorial from my downloaded copy of Sage, but when I go to the help section and view the tutorial, the website isn't found. The address for this site is `http://localhost:8000/doc/live/tutorial/index.html`. When I replace `live` with `static`, however, I can view the non-interactive tutorial. Any ideas on how to view the interactive tutorial on a local copy of Sage? Thanks.bittenfigThu, 20 Feb 2014 15:30:27 -0600http://ask.sagemath.org/question/11066/build sage without documentationhttp://ask.sagemath.org/question/10993/build-sage-without-documentation/I see that sometimes when building sage with the commands
git pull
make
the majority of time is employed in building the documentation. Actually I'm not interested in building the documentation on my machine (I usually have an internet connection and I usually browse the documentation online).
Is it possible to ignore the documentation when building sage? How can I do that?
MicheleWed, 05 Feb 2014 00:02:57 -0600http://ask.sagemath.org/question/10993/Documentation for show involving ymin and ymaxhttp://ask.sagemath.org/question/10733/documentation-for-show-involving-ymin-and-ymax/I was reading the documentation on 2d plotting again and I noticed something that I find strange. In the [plot documentation](http://www.sagemath.org/doc/reference/plotting/sage/plot/plot.html#sage.plot.plot.plot), there is the following phrase:
>If you want to limit the plot along the horizontal axis in the final rendered figure, then pass the xmin and xmax keywords to the show() method. To limit the plot along the vertical axis, ymin and ymax keywords can be provided to either this plot command or to the show command.
Ok, so this feels pretty obvious and all is well and good. But then you get [other questions](http://ask.sagemath.org/question/1242/add-plots-with-different-ymin-ymax-parameters) that show that ymin and ymax don't behave naively, nor are they associated directly with plot. Instead, that [answer](http://ask.sagemath.org/question/1242/add-plots-with-different-ymin-ymax-parameters?answer=1957#1957) says that ymin and ymax are really just always passed to show, and so should be thought of as show arguments.
Hmm, so it's not so obvious. So we might go to the [show documentation](http://www.sagemath.org/doc/reference/plotting/sage/plot/graphics.html#sage.plot.graphics.Graphics.show) to better understand what is going on. Unfortunately, show does not mention anything about ymin or ymax, or what happens when they're added together.
As far as I can tell, there is nothing in any show documentation that mentions ymin or ymax. Is that correct? If so, is that by design?mixedmathWed, 13 Nov 2013 16:48:47 -0600http://ask.sagemath.org/question/10733/Searching local HTML Docs with Chrome browser doesn't find anything, everhttp://ask.sagemath.org/question/10118/searching-local-html-docs-with-chrome-browser-doesnt-find-anything-ever/Using locally generated documentation ("make doc" in install dir), the Chrome browser search feature doesn't ever find anything. It used to work, but I don't know when it broke.
My local browser URLs:
file:///usr/local/src/sage/sage-5.9/devel/sage/doc/output/html/en/reference/search.html?q=lfsr
file:///usr/local/src/sage/sage-5.9/devel/sage-main/doc/output/html/en/reference/search.html?q=lfsr
... only show `Searching ...` forever.
This URL returns with doc references quickly.
http://www.sagemath.org/doc/reference/search.html?q=lfsr
What could be blocking my local doc searches?
Where can I look to start debugging?
Interestingly, Firefox works fine.
Chrome's javascript console reports:
Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin. file:///usr/local/src/sage/sage-5.10/devel/sage-main/doc/output/html/en/reference/searchindex.js
XMLHttpRequest cannot load file:///usr/local/src/sage/sage-5.10/devel/sage-main/doc/output/html/en/reference/searchindex.js. Origin null is not allowed by Access-Control-Allow-Origin.rickhg12hsTue, 14 May 2013 03:01:54 -0500http://ask.sagemath.org/question/10118/How to see the documentation for a Sage functionhttp://ask.sagemath.org/question/10228/how-to-see-the-documentation-for-a-sage-function/I am looking for the documentation (i.e., the source code) of `invariant_degree()` in the [Weyl Character Rings](http://www.sagemath.org/doc/reference/combinat/sage/combinat/root_system/weyl_characters.html?highlight=invariant_degree)
module. I have looked through that website pretty extensively, but I think I am looking in the wrong place?JoshIzzardMon, 17 Jun 2013 09:02:36 -0500http://ask.sagemath.org/question/10228/Can I build the sage documentation in parallel?http://ask.sagemath.org/question/7885/can-i-build-the-sage-documentation-in-parallel/I think this must have appeared on one of the sage mailing lists, but I can't find it. Is there something like the `-tp` or `ptest` flags for building documentation?nilesWed, 19 Jan 2011 01:00:47 -0600http://ask.sagemath.org/question/7885/practical documentation for sage; e.g. `%hide` and `%hideall`http://ask.sagemath.org/question/9941/practical-documentation-for-sage-eg-hide-and-hideall/I cannot seem to find documentation on `%hide` and `%hideall`. It doesn't seem like the reference manual has any information on these two directives/commands, while the built-in command line help system just gives errors for queries like `%hide?` (perhaps I'm not using the correct syntax?). `askSage` only has a few postings on this, which are only partially helpful to me.
I guess my general question is: for someone who is still very much a novice to python and sage, how would one go about learning more about specific commands like `%hide`.
Also, and apologies for smuggling in a second question, how do I unhide a cell in a sage notebook after I've already hidden it with `%hide`?sabbatini.lucaSun, 24 Mar 2013 11:17:27 -0500http://ask.sagemath.org/question/9941/Two quick questions about the tutorialhttp://ask.sagemath.org/question/9633/two-quick-questions-about-the-tutorial/I'm using the Interactive Shell.
First question: How do I get back to the working session after I'm done consulting the documentation? For example, if I look up for tan? I get all the information I need and after that a highlighted END. I just don't know how to get back to where I was before.
Second question: The last example in the section Functions, Indentation, and Counting of the Guided Tour doesn't seem to work. It's the example Class Evens(list) .... I've tried typing exactly as it is several times and I keep getting a syntax error message.
Any help would be appreciated. Thank you very much.jdiosesSat, 15 Dec 2012 11:54:56 -0600http://ask.sagemath.org/question/9633/Atomatic building of documentation for a custom libraryhttp://ask.sagemath.org/question/9487/atomatic-building-of-documentation-for-a-custom-library/Hi there,
I have created a .sage file with functions of my own, and have documented every function following http://www.sagemath.org/doc/developer/conventions.html#documentation-strings
Is there a way of generating automatically a *pdf* or *html* with the docstring of every function in the library, such as the ones in the sage documentation?
Or, more or less the same: can I use something like 'sage -docbuild' for a custom file (with standard doctrings)?
Cheers!JesustcWed, 31 Oct 2012 04:36:59 -0500http://ask.sagemath.org/question/9487/How to ensure examples in non-reference documentation test righthttp://ask.sagemath.org/question/9138/how-to-ensure-examples-in-non-reference-documentation-test-right/Consider the following rst file, called Tiny.rst, and placed somewhere in the Sage doc tree where I know that things work properly.
.. -*- coding: utf-8 -*-
Tiny Test File
==============
A command
---------
Here's an example.
::
sage: factor(2012)
2^2 * 503
Functions in Sage
-----------------
Let's do some functions.
::
sage: f(x)=x^2
sage: f(x)
x^2
Let's ask Sage what the function is one more time.
::
sage: f(x)
x^2
When I test it, regular commands and commands together test fine. But commands with user-defined things that are in another literal block don't.
sage -t devel/sage-main/doc/en/.../Tiny.rst
**********************************************************************
File "/Users/.../sage-5.1.beta5/devel/sage-main/doc/en/.../Tiny.rst", line 51:
sage: f(x)
Exception raised:
File "<doctest __main__.example_3[2]>", line 1, in <module>
f(x)###line 51:
sage: f(x)
NameError: name 'f' is not defined
**********************************************************************
1 items had failures:
1 of 4 in __main__.example_3
***Test Failed*** 1 failures.
For whitespace errors, see the file /Users/.../.sage/tmp/new_host_2.home-49485/Tiny_49488.py
[2.7 s]
----------------------------------------------------------------------
The temporary doctesting directory
/Users/.../.sage/tmp/new_host_2.home-49485
was not removed: it is not empty, presumably because doctests
failed or doctesting was interrupted.
----------------------------------------------------------------------
The following tests failed:
sage -t devel/sage-main/doc/en/.../Tiny.rst # 1 doctests failed
----------------------------------------------------------------------
Timings have been updated.
If you remove the words before the second `f(x)`, the same thing happens.
So what gives? Clearly a lot of the documentation doesn't have this issue.
kcrismanThu, 05 Jul 2012 17:04:00 -0500http://ask.sagemath.org/question/9138/Submitting a module to Sage trac with supporting test code and documentationhttp://ask.sagemath.org/question/9097/submitting-a-module-to-sage-trac-with-supporting-test-code-and-documentation/Hi all:
I recently wrote
1. a new Python module for Sage
2. a Python module that tests (1) using the unittest module
3. a PDF document describing the mathematical background for the algorithms in (1)
I want to submit all three of these to the Sage trac server for reviewers to refer to. Is that a good idea? If so, what's the best way to do that? I know how to submit (1) as a patch, but what about (2) and (3)?
Thanks.araichevTue, 19 Jun 2012 18:38:05 -0500http://ask.sagemath.org/question/9097/What is the best way to report small glitches in the docs?http://ask.sagemath.org/question/8830/what-is-the-best-way-to-report-small-glitches-in-the-docs/For example on page
[number theory](http://www.sagemath.org/doc/constructions/number_theory.html)
the section 'Divisors' says:
<pre>
Sage uses divisors(n) for the number [...] of divisors of n ...
</pre>
and adds the example
<pre>
divisors(28)
[1, 2, 4, 7, 14, 28]
</pre>petropolisTue, 27 Mar 2012 08:24:43 -0500http://ask.sagemath.org/question/8830/