Ticket #12559 (needs_info enhancement)

Opened 16 months ago

Last modified 18 hours ago

Chinese translation of "A tour of Sage"

Reported by: mvngu Owned by: Kehengsite
Priority: major Milestone: sage-5.11
Component: documentation Keywords:
Cc: lq52655963@…, vbraun Work issues:
Report Upstream: N/A Reviewers:
Authors: Kehengsite Merged in:
Dependencies: #14669, #14571 Stopgaps:

Description (last modified by jdemeyer) (diff)

The attachment is created by "kehengsite", whose Chinese name is 廖祥. If you have some good ideas to promote this Sage Chinese document,please tell me throught e-mail(lq52655963@…). In addition,thanks Nguyen to create a trac account for me!

Apply trac_12559_tour_chinese.patch Download

Attachments

A_tour_of_sage_Zh.tar.bz2 Download (939.4 KB) - added by mvngu 16 months ago.
A_tour_of_sage_Zh.pdf Download (765.6 KB) - added by ppurka 16 months ago.
A_tour_of_sage_Zh.rar Download (1005.7 KB) - added by Kehengsite 15 months ago.
Finished intsallation guide
A_tour_of_sage_Zh.rst Download (14.6 KB) - added by dimpase 2 weeks ago.
converted to rST using pandoc
SageTutorial_zh_CN.pdf Download (930.0 KB) - added by vbraun 2 weeks ago.
pdf output
index.rst Download (14.6 KB) - added by dimpase 11 days ago.
the rST doc, for review only (it's also in the patch)
trac_12559_tour_chinese.patch Download (846.2 KB) - added by vbraun 29 hours ago.
Updated patch

Change History

Changed 16 months ago by mvngu

comment:1 Changed 16 months ago by ppurka

I have asked one of my Chinese colleagues to take a look at the contents for review.

Changed 16 months ago by ppurka

comment:2 Changed 16 months ago by ppurka

Attached Download in the pdf file are some comments by my colleague Chengmin Wang. Many thanks to him.

comment:3 Changed 16 months ago by dimpase

  • Cc jpang added

comment:4 Changed 16 months ago by Kehengsite

  • Owner changed from mvngu to Kehengsite
  • Description modified (diff)

In the next,I will add instalation guide to this document.But at first,I need a few days to make understand how this trac syetem works.

comment:5 Changed 16 months ago by Kehengsite

  • Authors set to Kehengsite

comment:6 follow-up: ↓ 7 Changed 16 months ago by Kehengsite

  • Description modified (diff)
  • Work issues set to I don't konw how to convert LaTeX file to Sphinx

comment:7 in reply to: ↑ 6 Changed 16 months ago by dimpase

Replying to Kehengsite:

latex->rst [converter  http://johnmacfarlane.net/pandoc/]

Changed 15 months ago by Kehengsite

Finished intsallation guide

comment:8 follow-up: ↓ 9 Changed 15 months ago by Kehengsite

Waiting to be converted to rst

comment:9 in reply to: ↑ 8 ; follow-up: ↓ 11 Changed 15 months ago by dimpase

  • Status changed from new to needs_info

Replying to Kehengsite:

Waiting to be converted to rst

If I try to run latex and then dvips on these files I get

$ dvips A_tour_of_sage_Zh
This is dvips(k) 5.991 Copyright 2011 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.04.01:0058' -> A_tour_of_sage_Zh.ps

kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+437/600 --dpi 1037 unihei52
mktexpk: don't know how to create bitmap font for unihei52.
mktexpk: perhaps unihei52 is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
dvips: Font unihei52 not found; using cmr10

</usr/local/texlive/2011/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>
dvips: ! invalid char 159 from font unihei52

If I try pdflatex I get

!pdfTeX error: pdflatex (file simsun.ttc): cannot open TrueType font file for reading
 ==> Fatal error occurred, no output PDF file produced!

Is it a problem with my TeX installation (TeXLive 2011 on MacOSX) ? Or something non-standard in this file? I tried googling for these errors, but most of the results are in Chinese, and I can't see what is the problem...

comment:10 Changed 15 months ago by Kehengsite

I use CTeX distrbution (www.ctex.org) to finish this work,in the compiling process,

several Chinese fonts were needed. so,if you use TeXLive to commpile the .tex file,as

lack of CTeX macro,it won't success.

In fact,I'm trying to find a perfect way to convert this .tex file to rst,but yet

successed. Now,I'm working on it!

Thinks very much for you help anyway!

comment:11 in reply to: ↑ 9 Changed 15 months ago by Kehengsite

Replying to dimpase:

Replying to Kehengsite:

Waiting to be converted to rst

If I try to run latex and then dvips on these files I get

$ dvips A_tour_of_sage_Zh
This is dvips(k) 5.991 Copyright 2011 Radical Eye Software (www.radicaleye.com)
' TeX output 2012.04.01:0058' -> A_tour_of_sage_Zh.ps

kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+437/600 --dpi 1037 unihei52
mktexpk: don't know how to create bitmap font for unihei52.
mktexpk: perhaps unihei52 is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
dvips: Font unihei52 not found; using cmr10

</usr/local/texlive/2011/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk>
dvips: ! invalid char 159 from font unihei52

If I try pdflatex I get

!pdfTeX error: pdflatex (file simsun.ttc): cannot open TrueType font file for reading
 ==> Fatal error occurred, no output PDF file produced!

Is it a problem with my TeX installation (TeXLive 2011 on MacOSX) ? Or something non-standard in this file? I tried googling for these errors, but most of the results are in Chinese, and I can't see what is the problem...

I use CTeX distrbution (www.ctex.org) to finish this work,in the compiling process,

several Chinese fonts were needed. so,if you use TeXLive to commpile the .tex file,as

lack of CTeX macro,it won't success.

In fact,I'm trying to find a perfect way to convert this .tex file to rst,but yet

successed. Now,I'm working on it!

Thinks very much for you help anyway!

comment:12 Changed 2 weeks ago by dimpase

  • Cc vbraun added; jpang removed

this is a real UTF challenge :–)

comment:13 follow-up: ↓ 14 Changed 2 weeks ago by vbraun

First question, is this simplified or traditional chinese? ;-)

Changed 2 weeks ago by dimpase

converted to rST using pandoc

comment:14 in reply to: ↑ 13 Changed 2 weeks ago by dimpase

Replying to vbraun:

First question, is this simplified or traditional chinese? ;-)

Simplified. I just attached the result of using pandoc on the latex source. It will surely need more reformatting etc.

Now one has to figure out where it should go, and how to run sphinx on it...

comment:15 follow-up: ↓ 16 Changed 2 weeks ago by vbraun

  • Description modified (diff)

The attached patch lets you build the html version with

sage -docbuild zh_CN/a_tour_of_sage html

There are some errors because I'm missing the images (we need them as png, not pdf for the html docs)

comment:16 in reply to: ↑ 15 Changed 2 weeks ago by dimpase

Replying to vbraun:

The attached patch lets you build the html version with

sage -docbuild zh_CN/a_tour_of_sage html

There are some errors because I'm missing the images (we need them as png, not pdf for the html docs)

I presume one can steal the images from this document in other languages...

comment:17 follow-up: ↓ 18 Changed 2 weeks ago by vbraun

And there is a lot of installation stuff before the "A Tour OF Sage" starts, which is not present in the English version. Shouldn't that be broken out to a separate document?

comment:18 in reply to: ↑ 17 Changed 2 weeks ago by dimpase

Replying to vbraun:

And there is a lot of installation stuff before the "A Tour OF Sage" starts, which is not present in the English version. Shouldn't that be broken out to a separate document?

Indeed. I was wondering if there is a corresponding part of Sage docs that has this info.

comment:19 Changed 2 weeks ago by vbraun

I've fixed up the images and the pdf build. The latter pretty much requires xelatex; Apparently you can also use standard pdflatex but then you need the CJK package which is not in TeXlive. So I think its better to use xelatex, and simply disable it if xelatex is not available.

Changed 2 weeks ago by vbraun

pdf output

comment:20 Changed 2 weeks ago by vbraun

  • Status changed from needs_info to needs_review

comment:21 Changed 2 weeks ago by dimpase

PDF doc does not build for me:

sage -docbuild zh_CN/a_tour_of_sage pdf                 
[a_tour_of] loading translations [zh_CN]... done
[a_tour_of] Compiling the master document
[a_tour_of] building [latex]: all documents
[a_tour_of] Merging environment/index files...
[a_tour_of] ... done (0 todos, 1 index, 0 citations, 0 modules)
[a_tour_of] Saved pickle file: citations.pickle
[a_tour_of] processing SageTutorial_zh_CN.tex... index
[a_tour_of] resolving references...
[a_tour_of] writing... done
[a_tour_of] copying images... interact_screenshot.jpg sin_plot.png circles_plot.png plot_3d.jpg eigen_plot.png
[a_tour_of] copying TeX support files... done
[a_tour_of] build succeeded, 1 warning.
env </dev/null pool_size=4000000 save_size=50000 extra_mem_top=2000000 xelatex  'SageTutorial_zh_CN.tex'
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
(Fatal format file error; I'm stymied)
make: *** [SageTutorial_zh_CN.pdf] Error 1
Traceback (most recent call last):
  File "/usr/local/src/sage/sage-5.10.rc1/devel/sage/doc/common/builder.py", line 1454, in <module>
    getattr(get_builder(name), type)()
  File "/usr/local/src/sage/sage-5.10.rc1/devel/sage/doc/common/builder.py", line 208, in pdf
    raise RuntimeError("failed to run $MAKE all-pdf in %s"%tex_dir)
RuntimeError: failed to run $MAKE all-pdf in /usr/local/src/sage/sage-5.10.rc1/devel/sage/doc/output/latex/zh_CN/a_tour_of_sage

Just in Sage shell in sage/doc/output/latex/zh_CN/a_tour_of_sage I get

$ make    
env </dev/null pool_size=4000000 save_size=50000 extra_mem_top=2000000 xelatex  'SageTutorial_zh_CN.tex'
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
(Fatal format file error; I'm stymied)
make: *** [SageTutorial_zh_CN.pdf] Error 1

This seems to indicate that xelatex cannot find the right format file. Indeed, it works on "normal" files. Also note that and in the normal shell I get

$ make
env </dev/null pool_size=4000000 save_size=50000 extra_mem_top=2000000 xelatex  'SageTutorial_zh_CN.tex'
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
entering extended mode
(./SageTutorial_zh_CN.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov
ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1
9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san
skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn
orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian
, estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po
rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.
(./sphinxmanual.cls
Document Class: sphinxmanual 2009/06/02 Document class (Sphinx manual)
(/usr/share/texmf-texlive/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo)))
! Undefined control sequence.
l.5 \DeclareUnicodeCharacter
                            {00A0}{\nobreakspace}
?
! Emergency stop.
l.5 \DeclareUnicodeCharacter
                            {00A0}{\nobreakspace}
No pages of output.
Transcript written on SageTutorial_zh_CN.log.
make: *** [SageTutorial_zh_CN.pdf] Error 1

comment:22 Changed 2 weeks ago by dimpase

With TexLive 2012, the error is less strange:

sage -docbuild zh_CN/a_tour_of_sage pdf
[a_tour_of] loading translations [zh_CN]... done
[a_tour_of] Compiling the master document
[a_tour_of] building [latex]: all documents
[a_tour_of] updating environment: 0 added, 1 changed, 0 removed
[a_tour_of] reading sources... [100%] index
[a_tour_of] Merging environment/index files...
[a_tour_of] ... done (0 todos, 1 index, 0 citations, 0 modules)
[a_tour_of] Saved pickle file: citations.pickle
[a_tour_of] pickling environment... done
[a_tour_of] checking consistency... done
[a_tour_of] processing SageTutorial_zh_CN.tex... index
[a_tour_of] resolving references...
[a_tour_of] writing... done
[a_tour_of] copying images... interact_screenshot.jpg sin_plot.png circles_plot.png plot_3d.jpg eigen_plot.png
[a_tour_of] copying TeX support files... done
[a_tour_of] build succeeded, 1 warning.
env </dev/null pool_size=4000000 save_size=50000 extra_mem_top=2000000 xelatex  'SageTutorial_zh_CN.tex'
This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)
 restricted \write18 enabled.
entering extended mode
(./SageTutorial_zh_CN.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 piedmontese, polish, portuguese, romanian, romansh, russian, sanskrit, serbian
, serbianc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, u
ppersorbian, welsh, loaded.
(./sphinxmanual.cls
Document Class: sphinxmanual 2009/06/02 Document class (Sphinx manual)
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo)))
! Undefined control sequence.
l.5 \DeclareUnicodeCharacter
                            {00A0}{\nobreakspace}
?
! Emergency stop.
l.5 \DeclareUnicodeCharacter
                            {00A0}{\nobreakspace}
No pages of output.
Transcript written on SageTutorial_zh_CN.log.
make: *** [SageTutorial_zh_CN.pdf] Error 1
Traceback (most recent call last):
  File "/usr/local/src/sage/sage-5.10.rc1/devel/sage/doc/common/builder.py", line 1454, in <module>
    getattr(get_builder(name), type)()
  File "/usr/local/src/sage/sage-5.10.rc1/devel/sage/doc/common/builder.py", line 208, in pdf
    raise RuntimeError("failed to run $MAKE all-pdf in %s"%tex_dir)
RuntimeError: failed to run $MAKE all-pdf in /usr/local/src/sage/sage-5.10.rc1/devel/sage/doc/output/latex/zh_CN/a_tour_of_sage

comment:23 follow-up: ↓ 25 Changed 2 weeks ago by vbraun

Did you delete the old (cached) latex file? I.e. rm -rf doc/output before running the docbuild. It seems that your latex file contains precisely what I disabled...

comment:24 Changed 2 weeks ago by vbraun

  • Dependencies set to #14669, #14571

comment:25 in reply to: ↑ 23 Changed 2 weeks ago by dimpase

Replying to vbraun:

Did you delete the old (cached) latex file? I.e. rm -rf doc/output before running the docbuild. It seems that your latex file contains precisely what I disabled...

I just tried this, makes no difference. By the way, ru/tutorial pdf builds OK.

comment:26 follow-ups: ↓ 27 ↓ 29 Changed 13 days ago by vbraun

Sorry, I had the wrong latex file cached. Fixed in the updated patch.

comment:27 in reply to: ↑ 26 ; follow-up: ↓ 28 Changed 13 days ago by dimpase

Last edited 13 days ago by dimpase (previous) (diff)

comment:28 in reply to: ↑ 27 Changed 13 days ago by dimpase

Last edited 13 days ago by dimpase (previous) (diff)

comment:29 in reply to: ↑ 26 Changed 13 days ago by dimpase

Replying to vbraun:

Sorry, I had the wrong latex file cached. Fixed in the updated patch.

OK, it's all good. I was missing system zh, etc, fonts on Debian.

comment:30 Changed 13 days ago by jdemeyer

  • Description modified (diff)
  • Work issues I don't konw how to convert LaTeX file to Sphinx deleted

Using subprocess.check_output() in the docbuilder is dangerous, it caused #14626. So either you need to be very sure that this cannot happen again or you need to apply a workaround similar to #14626.

comment:31 Changed 13 days ago by vbraun

Fixed.

comment:32 Changed 12 days ago by dimpase

  • Status changed from needs_review to needs_info

There are few more or less trivial issues with the text:

1) references to Sage are quite outdated

2) the part corresponding to the "Tour fo Sage" has strange formatting (extra sub-headers)

3) it should be proofread by a native speaker just in case

Fixing 1) ought to be done by (with help of) a native speaker, as it's not really clear what's going on there. I'll ask someone to have a look, but he unfortunately doesn't work with Sage. Should I ask for a rough English translation of the 1st part, so that links/refs can be adjusted?

I've also emailed the original author asking if (s)he can help.

Last edited 12 days ago by dimpase (previous) (diff)

comment:33 follow-up: ↓ 35 Changed 12 days ago by vbraun

I don't think its a good idea to translate English->Chinese->English and then edit that as an English speaker ;-)

The installation instructions should be rewritten to not reference a particular version number (as in http://www.sagemath.org/doc/installation/). And separated into a different page, at least. Ideally we'd have a separate translation of the installation instructions, but that is a bigger task.

Also, I don't think its really necessary to spend time on typesetting nitpicks in the pdf version. The html output is the one we should be worrying about.

Changed 11 days ago by dimpase

the rST doc, for review only (it's also in the patch)

Changed 29 hours ago by vbraun

Updated patch

comment:34 Changed 29 hours ago by vbraun

Updated with better check for XeTeX

comment:35 in reply to: ↑ 33 Changed 18 hours ago by dimpase

Replying to vbraun:

I don't think its a good idea to translate English->Chinese->English and then edit that as an English speaker ;-)

The installation instructions should be rewritten to not reference a particular version number (as in http://www.sagemath.org/doc/installation/). And separated into a different page, at least. Ideally we'd have a separate translation of the installation instructions, but that is a bigger task.

Hopefully my student will work on this next month.

Note: See TracTickets for help on using tickets.