Bug Hunting Session
Bug 115623 - EPUB: support vertical writing mode (tb)
Summary: EPUB: support vertical writing mode (tb)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: EPUB-Export
  Show dependency treegraph
 
Reported: 2018-02-11 02:49 UTC by Mark Hung
Modified: 2018-04-23 13:07 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample Vertical Writing Document (9.02 KB, application/vnd.oasis.opendocument.text)
2018-02-12 13:38 UTC, Mark Hung
Details
Patch for libepubgen to support writing-mode (11.26 KB, patch)
2018-03-19 15:10 UTC, Mark Hung
Details
Patch for libepubgen (7.68 KB, application/zip)
2018-03-25 14:58 UTC, Mark Hung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2018-02-11 02:49:47 UTC
Description:
In ODF, style:writing-mode attribute of style:page-layout-properties[1] defines the writing direction. According to [1], it can also appear in paragraph properties, section properties, table properties, and table cell properties, though writer UI allows only it be defined in page, table cell, and text frame. 

Vertical writing is typically used in literature or novel in traditional Chinese. So the feature make sense in the context of digital book. 

[1]http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1420256_253892949


Steps to Reproduce:
None

Actual Results:  
writing mode ignore.

Expected Results:
allows exporting vertical writing mode.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Mark Hung 2018-02-12 13:38:00 UTC
Created attachment 139833 [details]
Sample Vertical Writing Document
Comment 2 Mark Hung 2018-02-12 13:59:21 UTC
Sample epub:
https://drive.google.com/file/d/1jWYRufbLlylyVodC5m_bdIyPavN3oa_j/view
( SOURCE: http://blog.wanderer.tw/post/34646924318/plastic-opium-epub-vertical-ebook-for-free-download )

There is a piece of writing mode definition in it's stylesheet.css.
body{
	font-size: 100%;
	-epub-writing-mode: vertical-rl;
  	-webkit-writing-mode: vertical-rl;
  	writing-mode: vertical-rl;
  	-epub-line-break: normal;
  	vertical-align: baseline;
  	font-family: serif;

}
Comment 3 Mark Hung 2018-02-12 14:21:25 UTC
EPUB 3 Accessibility Guidelines: CSS Writing Modes Module Level 3
https://idpf.github.io/a11y-guidelines/content/style/reference.html#css025-css3writemode
Comment 4 Buovjaga 2018-03-05 18:18:03 UTC
Sounds good -> NEW
Comment 5 Mark Hung 2018-03-19 15:10:42 UTC
Created attachment 140714 [details]
Patch for libepubgen to support writing-mode

The patch allows libepubgen to support writing-mode in page properties. It will be converted to body class or body style. Note that this is for reflowable layout method.
Comment 6 Mark Hung 2018-03-25 14:58:27 UTC
Created attachment 140871 [details]
Patch for libepubgen

My patches for libepubgen to support writing mode:

0001-Support-writing-mode-for-reflowable-layout-method.patch
0002-Always-keep-page-properties-when-splitting-the-HTML-.patch
0003-Ensure-page-properties-in-the-page-span-works.patch
Comment 7 Commit Notification 2018-04-04 07:04:42 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=75c166d058717a7edd26273f50a86fe5f2cc7fb0

tdf#115623: patch libepubgen to support writing-mode.

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2018-04-05 08:59:05 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4e9dbb4c81dfd99cfec4a36372b09a96ad4d4133

tdf#115623: EPUB export: handle style:page-layout

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-04-08 13:19:13 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e371819719a099e5c4fc0af1c2d1ee8ffc4e97c0

tdf#115623: EPUB export: support style:master-page

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-04-10 07:34:23 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c6d3d0642e0f5d24cab402a8a7c6f81406d044cf

tdf#115623: invoke openPageSpan / closePageSpan

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.