From: Dave K. <dku...@da...> - 2017-05-12 22:56:11
|
Matěj, I've got another fix for our issues. You will need to evaluate them yourself. 1. For language and region/country, now, with ODT writer, if you use the -l/--language command line option, then you must specify both language and country, for example, es_mx (Mexican Spanish), en-au (Australian English), and of course cs-cz. This is because the ODT writer needs both, if it changes the language. People have been fighting over whose language and/or religion is superior for hundreds of years. I say, let them keep fighting; I'm not going to step in the middle of that. If you go to UAM (Universidad Autónoma Madrid), I'm sure they will tell you that the default should be es-es; if you go to UNAM (Universidad Nacional Autónoma de México) they will tell you the default should be es-mx. In a previous email, Günter Milde says: Docutils should accept and work with the generic tag "cs" and expand it to "cs-CZ" in cases where it would be misinterpreted as "cs-US" by some dumb back-end. But, I don't know how to do that in the general case. 2. Image size -- I've reworked this quite severely. The ODT writer now tries to achieve a little consistency by converting all units to centimeters. For your image, you might want to start with something like the following and adjust from there:: .. image:: images/frantisek_xaversky.jpg :scale: 15% :align: center :alt: Svatý František Xaverský v Mikulášském chrámu The reason for the small scale factor is that your image is quite large. The size returned by PIL (the Python Image Library) for your image (frantisek_xaversky.jpg) is 2448 X 3264. That's pixels, I suppose. The conversion factor that I found at http://www.unitconversion.org/unit_converter/typography-ex.html is 1 px = 0.0264 cm. So, for example, 2448 * 0.0264 * .15 = 9.69 cm, which is a reasonable starting width for your image on a page, and you can adjust from there. I've attached a new version of docutils/writers/odf_odt/__init__.py to a separate message. Please let me know what you think. Dave K. -- Dave Kuhlman http://www.davekuhlman.org |