Georg Brandl avatar Georg Brandl committed d919a28 Merge

merge with 0.6

Comments (0)

Files changed (25)

 Release 0.6.6 (in development)
 ==============================
 
+* #393: Fix the usage of Unicode characters in mathematic formulas
+  when using the ``pngmath`` extension.
+
 * #404: Make ``\and`` work properly in the author field of the
   ``latex_documents`` setting.
 

sphinx/ext/pngmath.py

 """
 
 import re
+import codecs
 import shutil
 import tempfile
 import posixpath
 
 DOC_HEAD = r'''
 \documentclass[12pt]{article}
-\usepackage[utf8]{inputenc}
+\usepackage[utf8x]{inputenc}
 \usepackage{amsmath}
 \usepackage{amsthm}
 \usepackage{amssymb}
 
     latex = DOC_HEAD + self.builder.config.pngmath_latex_preamble
     latex += (use_preview and DOC_BODY_PREVIEW or DOC_BODY) % math
-    if isinstance(latex, unicode):
-        latex = latex.encode('utf-8')
 
     # use only one tempdir per build -- the use of a directory is cleaner
     # than using temporary files, since we can clean up everything at once
     else:
         tempdir = self.builder._mathpng_tempdir
 
-    tf = open(path.join(tempdir, 'math.tex'), 'w')
+    tf = codecs.open(path.join(tempdir, 'math.tex'), 'w', 'utf-8')
     tf.write(latex)
     tf.close()
 
     try:
         fname, depth = render_math(self, '$'+node['latex']+'$')
     except MathExtError, exc:
-        sm = nodes.system_message(str(exc), type='WARNING', level=2,
+        msg = unicode(str(exc), 'utf-8', 'replace')
+        sm = nodes.system_message(msg, type='WARNING', level=2,
                                   backrefs=[], source=node['latex'])
         sm.walkabout(self)
         self.builder.warn('display latex %r: ' % node['latex'] + str(exc))
Add a comment to this file

sphinx/locale/ca/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/cs/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/de/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/de/LC_MESSAGES/sphinx.po

File contents unchanged.

Add a comment to this file

sphinx/locale/es/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/fi/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/fi/LC_MESSAGES/sphinx.po

 #: sphinx/writers/latex.py:651
 #, fuzzy
 msgid "Continued on next page"
-msgstr "Hakemisto yhtenä luettelona"
+msgstr ""
 
 #: sphinx/writers/text.py:166
-#, fuzzy, python-format
+#, python-format
 msgid "Platform: %s"
 msgstr "Ympäristö: %s"
 
Add a comment to this file

sphinx/locale/fr/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/hr/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/it/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/ja/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/nl/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/pl/LC_MESSAGES/sphinx.js

File contents unchanged.

Add a comment to this file

sphinx/locale/pl/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/ru/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/sl/LC_MESSAGES/sphinx.js

File contents unchanged.

Add a comment to this file

sphinx/locale/sl/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/sl/LC_MESSAGES/sphinx.po

-
 msgid ""
 msgstr ""
-"Project-Id-Version:  Sphinx\n"
+"Project-Id-Version: Sphinx\n"
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
 "POT-Creation-Date: 2008-09-11 23:58+0200\n"
-"PO-Revision-Date: 2009-08-06 23:04+0200\n"
-"Last-Translator: Domen Kožar <domen@dev.si>\n"
+"PO-Revision-Date: 2010-04-20 09:19+0100\n"
+"Last-Translator: Luka Marinko <luka.marinko@simt.si>\n"
 "Language-Team: Rok Garbas <rok.garbas@gmail.com>\n"
 "Plural-Forms: nplurals=1; plural=0\n"
 "MIME-Version: 1.0\n"
 msgid "%B %d, %Y"
 msgstr "%d %B, %Y"
 
-#: sphinx/environment.py:324 sphinx/themes/basic/genindex-single.html:2
+#: sphinx/environment.py:324
+#: sphinx/themes/basic/genindex-single.html:2
 #: sphinx/themes/basic/genindex-split.html:2
 #: sphinx/themes/basic/genindex-split.html:5
 #: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
 msgid "Module Index"
 msgstr "Seznam modulov"
 
-#: sphinx/environment.py:326 sphinx/themes/basic/defindex.html:16
+#: sphinx/environment.py:326
+#: sphinx/themes/basic/defindex.html:16
 msgid "Search Page"
 msgstr "Iskalnik"
 
-#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#: sphinx/roles.py:55
+#: sphinx/directives/desc.py:747
 #, python-format
 msgid "environment variable; %s"
 msgstr "okoljska spremenljivka; %s"
 msgid "%s() (built-in function)"
 msgstr "%s() (vgrajene funkcije)"
 
-#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
+#: sphinx/directives/desc.py:419
+#: sphinx/directives/desc.py:476
 #: sphinx/directives/desc.py:488
 #, python-format
 msgid "%s() (in module %s)"
 msgid "%s (built-in variable)"
 msgstr "%s (vgrajene spremenljivke)"
 
-#: sphinx/directives/desc.py:423 sphinx/directives/desc.py:514
+#: sphinx/directives/desc.py:423
+#: sphinx/directives/desc.py:514
 #, python-format
 msgid "%s (in module %s)"
 msgstr "%s (v modulu %s)"
 #: sphinx/ext/autodoc.py:889
 #, python-format
 msgid "   Bases: %s"
-msgstr "   Osnove: %s"
+msgstr "   Baza: %s"
 
 #: sphinx/ext/autodoc.py:922
 #, python-format
 
 #: sphinx/themes/basic/layout.html:196
 #, python-format
-msgid ""
-"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
-msgstr ""
-"Narejeno s <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
+msgid "Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
+msgstr "Narejeno s <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
 
 #: sphinx/themes/basic/modindex.html:36
 msgid "Deprecated"
 "Please activate JavaScript to enable the search\n"
 "    functionality."
 msgstr ""
-"Prosimo omogočite JavaScript\n"
-"    za delovanje iskalnika."
+"Za pravilno delovanje Iskanja morete vklopiti\n"
+"    JavaScript."
 
 #: sphinx/themes/basic/search.html:14
 msgid ""
 msgid "Other changes"
 msgstr "Ostale spremembe"
 
-#: sphinx/themes/basic/static/doctools.js:139 sphinx/writers/html.py:473
+#: sphinx/themes/basic/static/doctools.js:139
+#: sphinx/writers/html.py:473
 #: sphinx/writers/html.py:478
 msgid "Permalink to this headline"
 msgstr "Povezava na naslov"
 
-#: sphinx/themes/basic/static/doctools.js:145 sphinx/writers/html.py:80
+#: sphinx/themes/basic/static/doctools.js:145
+#: sphinx/writers/html.py:80
 msgid "Permalink to this definition"
 msgstr "Povezava na to definicijo"
 
 msgstr ", v "
 
 #: sphinx/themes/basic/static/searchtools.js:464
-msgid ""
-"Your search did not match any documents. Please make sure that all words "
-"are spelled correctly and that you've selected enough categories."
-msgstr ""
-"Za vaše iskanje ni rezultatov. Prosimo preglejte ali so vse besede "
-"pravilno črkovane in ali ste izbrali dovolj kategorij."
+msgid "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+msgstr "Za vaše iskanje ni rezultatov. Prosimo preglejte ali so vse besede pravilno črkovane in ali ste izbrali dovolj kategorij."
 
 #: sphinx/themes/basic/static/searchtools.js:466
 #, python-format
 
 #: sphinx/writers/latex.py:578
 msgid "Footnotes"
-msgstr ""
+msgstr "Opombe"
 
 #: sphinx/writers/latex.py:646
 msgid "continued from previous page"
-msgstr "nadaljevanje prejšnje strani"
+msgstr "nadaljevanje iz prejšnje strani"
 
 #: sphinx/writers/latex.py:651
 msgid "Continued on next page"
Add a comment to this file

sphinx/locale/tr/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo

Binary file modified.

Add a comment to this file

sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo

Binary file modified.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.