Open eslamisepehr opened 3 years ago
Commit: 15057e2
Branch pushed to git repo; I updated commit sha1. New commits:
15057e2 | Translate A Tour Of Sage to Persian |
Author: eslamisepehr
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
Reviewer: Matthias Koeppe
Changed author from eslamisepehr to Sepehr Eslami
I don't read Farsi, but it builds correctly and looks good in the HTML. Thanks for this contribution!
However, trying to build the PDF documentation:
./sage -docbuild fa/a_tour_of_sage pdf
[a_tour_of] WARNING: no Babel option known for language 'fa'
[a_tour_of] building [latex]: all documents
[a_tour_of] updating environment: [config changed ('numfig_format')] 1 added, 0 changed, 0 removed
[a_tour_of] Merging environment/index files...
[a_tour_of] ... done (0 todos, 1 index, 0 citations, 0 modules)
[a_tour_of] processing a_tour_of_sage.tex... index
[a_tour_of] resolving references...
[a_tour_of] done
[a_tour_of] WARNING: no Babel option known for language 'fa'
! Package inputenc Error: Unicode character ت (U+062A)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.276 \sphinxmaketitle
?
! Emergency stop.
...
l.276 \sphinxmaketitle
! ==> Fatal error occurred, no output PDF file produced!
So this needs more work before it can be merged.
Any LaTeX / docbuild experts who can help here?
At a quick glance it doesn't look like Sphinx supports Farsi text in its LaTeX builder, but I'm not an expert. Is \usepackage{babel}
supposed to be good enough, or do we need to use \usepackage[farsi]{babel}
?
It would seem that jhpalmieri is right about this, see this package - but see here for some potential problems. Also, for some character sets you need correct fonts available, in my PreTeXt experience, though maybe we have them since we do have Japanese - I recall trying to get Chinese required better, and uniformly available, CJK fonts though (Mac and Linux don't have a common set of fonts for some of these "built in").
Unless we are going to start asking for XeLaTeX and things like \usepackage{xepersian}
- but I assume that would be a lot bigger of an ask. (Personally I think that seeing if the Sage doc compiles and looks good with xetex is a good idea, but that is not something I am in a position to try to implement at this time.)
I saw those same two links about the arabi
package. It looks like it was last changed in 2006, so I'm pretty pessimistic.
I saw those same two links about the
arabi
package. It looks like it was last changed in 2006, so I'm pretty pessimistic.
Seems likely, unless we were to go xetex. Of course, maybe numbering won't really matter in such a small document? It could be worth testing out, at least.
I'd even consider going to luatex, which offers superior support of unicode, so that one can simply use Greek letters, and symbols like ∫, ⊊, etc in maths.
We still have a problem with Chinese IIRC as I feel the Japanese version is kind of hacked together. It would be very good to have a uniform solution to all of these non-Roman alphabets.
I also believe I know someone who native language is Persian, so I can ask him to check.
Setting a new milestone for this ticket based on a cursory review.
CC: @dimpase @kcrisman @jhpalmieri
Component: documentation
Author: Sepehr Eslami
Branch/Commit: u/gh-eslamisepehr/add_persian_language_for_a_tour_of_sage @
15057e2
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/31491