diff --git a/CHANGES b/CHANGES index b2678bdcf..86d7679fc 100644 --- a/CHANGES +++ b/CHANGES @@ -47,6 +47,7 @@ Incompatible changes * `html_translator_class` is now deprecated. Use `Sphinx.set_translator()` API instead. * Drop python 3.3 support +* Drop epub3 builder's ``epub3_page_progression_direction`` option (use ``epub3_writing_mode``). Features added -------------- @@ -113,6 +114,7 @@ Features added * #646: ``option`` directive support '.' character as a part of options * Add document about kindlegen and fix document structure for it. * #2474: Add ``intersphinx_timeout`` option to ``sphinx.ext.intersphinx`` +* #2926: EPUB3 builder supports vertical mode (``epub3_writing_mode`` option) Bugs fixed ---------- diff --git a/doc/config.rst b/doc/config.rst index 52aa0992b..fb77769d0 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1460,6 +1460,30 @@ the `Dublin Core metadata `_. .. versionadded:: 1.2 +.. confval:: epub3_writing_mode + + It specifies writing direction. It can accept ``'horizontal'`` (default) and + ``'vertical'`` + + .. list-table:: + :header-rows: 1 + :stub-columns: 1 + + - * ``epub3_writing_mode`` + * ``'horizontal'`` + * ``'vertical'`` + - * writing-mode [#]_ + * ``horizontal-tb`` + * ``vertical-rl`` + - * page progression + * left to right + * right to left + - * iBook's Scroll Theme support + * scroll-axis is vertical. + * scroll-axis is horizontal. + + .. [#] https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode + .. confval:: epub3_page_progression_direction The global direction in which the content flows. @@ -1471,6 +1495,9 @@ the `Dublin Core metadata `_. .. versionadded:: 1.4 + .. deprecated:: 1.5 + Use ``epub3_writing_mode``. + .. _latex-options: Options for LaTeX output diff --git a/sphinx/builders/epub3.py b/sphinx/builders/epub3.py index 44c384bfa..d706867fa 100644 --- a/sphinx/builders/epub3.py +++ b/sphinx/builders/epub3.py @@ -54,7 +54,7 @@ PACKAGE_DOC_TEMPLATE = u'''\ + prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"> %(lang)s @@ -150,7 +150,7 @@ class Epub3Builder(EpubBuilder): page_progression_direction = 'rtl' else: page_progression_direction = 'default' - return self.esc(page_progression_direction) + return page_progression_direction def _ibook_scroll_axis(self): if self.config.epub3_writing_mode == 'horizontal': @@ -159,7 +159,7 @@ class Epub3Builder(EpubBuilder): scroll_axis = 'horizontal' else: scroll_axis = 'default' - return self.esc(scroll_axis) + return scroll_axis def _css_writing_mode(self): if self.config.epub3_writing_mode == 'vertical':