From 43dc6c891729f42ce49d903751adb7f606065d92 Mon Sep 17 00:00:00 2001 From: milde Date: Tue, 14 Aug 2012 08:47:23 +0000 Subject: [PATCH] Apply [ 3555160 ] ensure order of "otherlanguages". git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7492 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- HISTORY.txt | 10 +++++++--- docutils/writers/latex2e/__init__.py | 2 +- docutils/writers/xetex/__init__.py | 2 +- test/functional/expected/standalone_rst_xetex.tex | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/HISTORY.txt b/HISTORY.txt index cf104919b..19123c04a 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -30,12 +30,16 @@ Changes Since 0.9.1 * docutils/parsers/rst/directives/misc.py - - Fix [ 3546533 ] unicode error with date directive. + - Fix [ 3546533 ] Unicode error with `date` directive. * docutils/writers/manpage.py - - Apply [3527401] addmonition's don't preserve indentation - - Apply [3527397] Add indentation to literal blocks in manpage writer. + - Apply [ 3527401 ] addmonition's don't preserve indentation + - Apply [ 3527397 ] Add indentation to literal blocks in manpage writer. + +* docutils/writers/latex2e/__init__.py, docutils/writers/xetex/__init__.py + + - Apply [ 3555160 ] ensure order of "otherlanguages". Release 0.9.1 (2012-06-17) diff --git a/docutils/writers/latex2e/__init__.py b/docutils/writers/latex2e/__init__.py index bb8982510..1eed8766a 100644 --- a/docutils/writers/latex2e/__init__.py +++ b/docutils/writers/latex2e/__init__.py @@ -379,7 +379,7 @@ class Babel(object): def __call__(self): """Return the babel call with correct options and settings""" - languages = self.otherlanguages.keys() + languages = sorted(self.otherlanguages.keys()) languages.append(self.language or 'english') self.setup = [r'\usepackage[%s]{babel}' % ','.join(languages)] if 'spanish' in languages: diff --git a/docutils/writers/xetex/__init__.py b/docutils/writers/xetex/__init__.py index 82d918949..8c5016e2f 100644 --- a/docutils/writers/xetex/__init__.py +++ b/docutils/writers/xetex/__init__.py @@ -118,7 +118,7 @@ class Babel(latex2e.Babel): r'\setdefaultlanguage{%s}' % self.language] if self.otherlanguages: setup.append(r'\setotherlanguages{%s}' % - ','.join(self.otherlanguages.keys())) + ','.join(sorted(self.otherlanguages.keys()))) return '\n'.join(setup) diff --git a/test/functional/expected/standalone_rst_xetex.tex b/test/functional/expected/standalone_rst_xetex.tex index 962ff25b6..8adc77146 100644 --- a/test/functional/expected/standalone_rst_xetex.tex +++ b/test/functional/expected/standalone_rst_xetex.tex @@ -7,7 +7,7 @@ \usepackage{amsmath} \usepackage{polyglossia} \setdefaultlanguage{english} -\setotherlanguages{german,british,french} +\setotherlanguages{british,french,german} \usepackage{color} \usepackage{float} % float configuration \floatplacement{figure}{H} % place figures here definitely -- 2.11.4.GIT