Opened 11 years ago
Closed 8 years ago
#12847 closed enhancement (fixed)
Catalan: introduction to Sage
Reported by: | Minh Van Nguyen | Owned by: | Minh Van Nguyen |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | documentation | Keywords: | tutorial catalan |
Cc: | maria.bras@…, Marc Masdeu | Merged in: | |
Authors: | Maria Bras-Amoros, Marc Masdeu | Reviewers: | Xavier Guitart, Frédéric Chapoton, Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | 01f1c78 (Commits, GitHub, GitLab) | Commit: | 01f1c7807e8bb8da98d23c4b2abe9e2bacaa94fc |
Dependencies: | Stopgaps: |
Description
An introduction to Sage written in Catalan. Attached is the introduction by Maria Bras Amoros. Let's get this into the Sage standard documentation. Work that needs to be done include:
- Convert this to RST format.
- Get a reviewer who knows Sage and is fluent in Catalan.
Attachments (5)
Change History (37)
Changed 11 years ago by
Attachment: | introduccio-al-sage_Amoros2012.pdf added |
---|
comment:1 Changed 11 years ago by
Cc: | maria.bras@… added |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Yes, there are minor style issues with regard to spacing. See PEP8; arithmetic operators, assignments, and comparisons should all be spaced.
Changed 10 years ago by
comment:4 Changed 10 years ago by
We converted the file to ReST format. To review: the files index.rst and conf.py should be put inside SAGE_ROOT/devel/sage/doc/ca/tutorial/ (ca/tutorial should be created as well). One then compiles with:
sage --docbuild ca/tutorial html
comment:5 Changed 10 years ago by
Authors: | Maria Bras Amoros → Maria Bras-Amoros, Marc Masdeu |
---|---|
Cc: | Marc Masdeu added |
Status: | new → needs_review |
comment:6 Changed 10 years ago by
Status: | needs_review → positive_review |
---|
It seems OK to me.
I just noticed a few typos:
- "mentres que" --> "mentre que"
- "l'inversa" --> "la inversa"
- "Així mateix,:" --> "Així mateix:"
- "col.leccions" --> "col·leccions"
- "multiplicative_order(x)" --> "multiplicative_order(n)", and similarly for additive_order
Changed 10 years ago by
comment:7 Changed 10 years ago by
Reviewers: | → Xavier Guitart |
---|
Just fixed the typos. I will keep the ticket status as "positive review", and hopefully we get this in the distribution soon...
comment:8 Changed 10 years ago by
These files need to be put into a proper Mercurial patch, see http://sagemath.org/doc/developer/walk_through.html#modifying-sage-source-code
comment:9 Changed 10 years ago by
Status: | positive_review → needs_work |
---|---|
Work issues: | → patch file |
comment:10 Changed 10 years ago by
Status: | needs_work → needs_review |
---|
I have just added the patch. All the doctests pass, and it has been reviewed for language correctness (by Xavier Guitart). Someone should review the correctness of the patch, but there is no need for that reviewer to be able to read catalan...
comment:11 Changed 10 years ago by
I tried the patch.
When building the htmls, I got the folllowing warnings.
checking consistency... done preparing documents... done writing output... [100%] index /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/ca/tutorial/index.rst:822: WARNING: undefined label: section-systems (if the link has no caption the label must precede a section header) /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/ca/tutorial/index.rst:822: WARNING: undefined label: section-maxima (if the link has no caption the label must precede a section header) writing additional files... genindex search copying static files... done dumping search index... done
When building the pdfs, I got the following exception.
Helios:devel$ sage -docbuild ca/tutorial pdf sphinx-build -b latex -d /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/output/doctrees/ca/tutorial /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/ca/tutorial /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/output/latex/ca/tutorial Running Sphinx v1.1.2 loading pickled environment... done loading intersphinx inventory from /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/common/python.inv... building [latex]: all documents updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found Exception occurred: File "/Users/kwankyu/Sage/sage-5.6/local/lib/python2.7/site-packages/Sphinx-1.1.2-py2.7.egg/sphinx/builders/latex.py", line 86, in write docname, targetname, title, author, docclass = entry[:5] ValueError: need more than 4 values to unpack The full traceback has been saved in /var/folders/3s/q8nmk8wn6xb2bq6z6ndw1ljw0000gn/T/sphinx-err-dr6vAA.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>, or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks! Build finished. The built documents can be found in /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/output/latex/ca/tutorial make: *** No rule to make target `all-pdf'. Stop. Build finished. The built documents can be found in /Users/kwankyu/Sage/sage-5.6/devel/sage/doc/output/pdf/ca/tutorial
comment:13 Changed 10 years ago by
Status: | needs_review → needs_work |
---|
Applied the patch and the html build's with no warnings on Mountain Lion with a freshly built 5.8. The pdf build with a few hyperref errors.
The biggest problem that I see is that there sage code blocks that aren't getting recognized by sphinx sprinkled throughout the output. For example,
La i-èssima entrada d’una seqüència (o d’un conjunt) C és C[i]. Però compte perquè Sage enumera les posicions des de 0!: :: sage: S[1] = 1000 sage: S [121, 1000, 25, 9, 9, 25, 49, 121] sage: S[3] 9
It's been awhile since I worked with sphinx but I believe that the problem is not leaving a space after :: in the rst source.
Changed 10 years ago by
Attachment: | trac_12847_catalan_tutorial.patch added |
---|
Only need to apply this patch
comment:14 Changed 10 years ago by
Status: | needs_work → needs_review |
---|
I am sorry, I seen this problem and fixed about a week ago, and then forgot to make and upload the corresponding patch! Also, this includes a fix for a piece of code that wasn't working.
Please can you take a look now? All should be fine. Sorry again...
Changed 10 years ago by
Attachment: | trac_12847_fixspace.patch added |
---|
Patch to fix the spaces. Can be applied after the main patch.
comment:15 Changed 10 years ago by
Builds fine but there were still a few un-formatted code blocks on my system. I have attached a patch that fixes the problem on my system.
comment:16 Changed 9 years ago by
Milestone: | sage-5.11 → sage-5.12 |
---|
comment:17 Changed 9 years ago by
Milestone: | sage-6.1 → sage-6.2 |
---|
comment:18 Changed 9 years ago by
Milestone: | sage-6.2 → sage-6.3 |
---|
comment:19 Changed 9 years ago by
Branch: | → public/ticket/12847 |
---|---|
Commit: | → 04bafe141ea4a32e339e99921b880653c5d6c596 |
Work issues: | patch file |
comment:20 Changed 9 years ago by
Keywords: | tutorial catalan added |
---|
comment:21 Changed 8 years ago by
Milestone: | sage-6.3 → sage-6.4 |
---|
comment:22 Changed 8 years ago by
Hey Frédéric, did it seem to you that there were any remaining language or math issues here? Otherwise we could presumably make sure the output doesn't look horrendous and give a thumbs up. Thoughts?
comment:23 Changed 8 years ago by
Commit: | 04bafe141ea4a32e339e99921b880653c5d6c596 → 168291894071d104a1b5baec9ce1642ea248371f |
---|
comment:24 Changed 8 years ago by
Commit: | 168291894071d104a1b5baec9ce1642ea248371f → 5e662879589095c37ebeff92f2e0282f4af6c52d |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
5e66287 | trac #12847 fixup
|
comment:25 follow-up: 26 Changed 8 years ago by
About language issues, I do not know. "Je parle seulement francais, pas catalan."
The doc builds, the tests pass. The doc looks good enough. I think this can go. Do you confirm ?
comment:26 Changed 8 years ago by
About language issues, I do not know. "Je parle seulement francais, pas catalan."
Ich habe auch dieses Problem.
The doc builds, the tests pass. The doc looks good enough. I think this can go. Do you confirm ?
I just feel uncomfortable without someoneOh, we have the above:
All the doctests pass, and it has been reviewed for language correctness (by Xavier Guitart).
I guess your changes are minor but probably someone should double-check them so Volker doesn't have to worry about it - one moment.
comment:27 Changed 8 years ago by
Reviewers: | Xavier Guitart → Xavier Guitart, Frédéric Chapoton, Karl-Dieter Crisman |
---|
comment:28 Changed 8 years ago by
Actually, I found a few very minor things you may have missed.
- This will be machine-dependent, as it involves dictionaries.
sage -t src/doc/ca/tutorial/index.rst ********************************************************************** File "src/doc/ca/tutorial/index.rst", line 494, in doc.ca.tutorial.index Failed example: solutions = solve([sqrt(x) + sqrt(y) == 5, x + y == 10], x, y,solution_dict = True); solutions Expected: [{x: -5/2*I*sqrt(5) + 5, y: 5/2*I*sqrt(5) + 5}, {x: 5/2*I*sqrt(5) + 5, y: -5/2*I*sqrt(5) + 5}] Got: [{y: 5/2*I*sqrt(5) + 5, x: -5/2*I*sqrt(5) + 5}, {y: -5/2*I*sqrt(5) + 5, x: 5/2*I*sqrt(5) + 5}] ********************************************************************** 1 item had failures:
Since the solutions are then printed out nicely, I think the easiest fix is just to confirm the solutions are, in fact, dicts. - There were two extra
skip
s that escaped because of a misplaced double colon. - Finally, since in several other localizations (Spanish, Russian, French) the
tutorial
files are the translations of the original tutorial, I think we should rename this - maybeintroduction
or something. I'm going to do that as well.
Then all that will need review ... sorry.
comment:29 Changed 8 years ago by
Commit: | 5e662879589095c37ebeff92f2e0282f4af6c52d → 01f1c7807e8bb8da98d23c4b2abe9e2bacaa94fc |
---|
comment:30 Changed 8 years ago by
Okay, still needs review, now of my changes. I'm pretty happy with it, though.
comment:32 Changed 8 years ago by
Branch: | public/ticket/12847 → 01f1c7807e8bb8da98d23c4b2abe9e2bacaa94fc |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
I would change "comandaments" and "comandes" to "ordres", which is what Termcat proposes.
Also, I think that in Python one writes
instead of
Both constructions do the same, it's just a matter of style. Similarly, spacing is supposed to increase legibility, so one uses:
instead of