ubuntu-developer-manual team mailing list archive
-
ubuntu-developer-manual team
-
Mailing list archive
-
Message #00088
Re: PDFs in latin (script) langs only?
On 01/04/2011 12:00 PM, Kyle Nitzsche wrote:
And the BIG question: if Latex does not support these scripts, does that
present an obstacle for its use to produce this document?
As an aside, I have used apache fop to produce pdfs in Chinese (and Cyrillic,
and others) from docbook.
For example, using the LP doctemplate project (works for docbook articles, not
books yet, but that could be completed), I just created two localized pdfs of
the sample article, one in:
* Chinese/Traditional:
http://people.canonical.com/~knitzsche/build/pdf/zh_TW/sample-article.pdf
* Russian: http://people.canonical.com/~knitzsche/build/pdf/ru/sample-article.pdf
They each have a localized screenshot (no config files needed, just drop it the
images-<locale> folder).
(Remaining English words simply weren't added to the po file.)
Doctemplate also builds into two versions of html:
"html" (for lack of a better name):
* Chinese/Traditional:
http://people.canonical.com/~knitzsche/build/html/zh_TW/index.html
* Russian: http://people.canonical.com/~knitzsche/build/html/ru/index.html
"html-site" (need better name):
* Chinese/Traditional:
http://people.canonical.com/~knitzsche/build/html-site/zh_TW/index.html
* Russian: http://people.canonical.com/~knitzsche/build/html-site/ru/index.html
And localized xml that can be displayed in yelp, including autogeneration of omf
files.
And Epub, which you'd need to download.
The only issues I know of with docbook -> apache fop (pdf) respecting languages
is fop does not support Arabic well (doesn't do compositing, which means the
characters don't link as they should.)
Doctemplate as a build system works but could benefit from some love (it's been
over a year since I've worked on it.) But its key idea is: make it easy for
writers to write by providing a build system that just works and produces
multiple outputs, all localized, including images, with automatic gettext support.
You can install it from the doctemplate ppa (no natty version as of yet, ok, no
maverick version either ;): https://launchpad.net/~doctemplate-team/+archive/ppa
After installation:
* create a dir and move into it
* './doctemplate_setup_article'
* './make_omf_template' (that's a housekeeping thing that should be run
automatically but doesn't yet. only needs to be run once.)
* now you can make pdf, html, html-site, or epub with the obviously name shell
commands in your dir.
- note: localized XML (for yelp or whatever) is ALWAYS created by any build
since that's the first step.
* build outputs are in build/. for example build/html-site/zh_TW/
* content is in article/ directory
* images in article/images
- to localize an image, create article/images-CODE and put image there. for
example, create article/images-zh_TW_TW/MYimage.png
* translations in article/po
* update pot file with ./make
Cheers,
Kyle
References