Bug 116822 - Text with Asian Phonetic Guide(Ruby) filtered out in EPUB format
Summary: Text with Asian Phonetic Guide(Ruby) filtered out in EPUB format
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: EPUB-Export
  Show dependency treegraph
 
Reported: 2018-04-05 12:31 UTC by Mark Hung
Modified: 2018-05-28 09:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file with ruby text (9.62 KB, application/vnd.oasis.opendocument.text)
2018-04-05 12:31 UTC, Mark Hung
Details
Solved in 6.1.0.0-beta1 (34.95 KB, image/png)
2018-05-28 09:34 UTC, impreza233
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2018-04-05 12:31:19 UTC
Created attachment 141127 [details]
Sample file with ruby text

1. Open the attached file.
2. Export as EPUB
3. Open the file in the reader, the content is filtered.
Text with Asian phonetic guide ( ruby text ) is filtered. Neither base text nor ruby text appears.
Comment 1 Mark Hung 2018-04-16 13:51:34 UTC
"A ruby is additional text that is displayed above or below a base text. The purpose of a ruby is to annotate a base text or provide information about its pronunciation

The <text:ruby> element is usable within the following elements: <text:a> 6.1.8, <text:h> 5.1.2, <text:meta> 6.1.9, <text:meta-field> 7.5.19, <text:p> 5.1.3, <text:ruby-base> 6.4.2 and <text:span> 6.1.7." [1].

So at least text:ruby inside text:p and text:h should be implemented in writerperfect.


A very simple snippet that illustrates ruby tag generated by Writer:

 <text:p text:style-name="P1">
        <text:ruby text:style-name="Ru1">
          <text:ruby-base>中</text:ruby-base>
          <text:ruby-text>ㄓㄨㄥ</text:ruby-text>
        </text:ruby>
        <text:ruby text:style-name="Ru1">
          <text:ruby-base>
            <text:span text:style-name="T4">文</text:span>
          </text:ruby-base>
          <text:ruby-text>ㄨㄣˊ</text:ruby-text>
        </text:ruby>
...... ( the rest is deleted )

So it is necessary to allow ruby-base to be contain span as its child element so that ruby text can have different character formats.


[1]http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415250_253892949
Comment 2 Mark Hung 2018-04-16 14:11:38 UTC


EPUB3 samples that contains ruby
https://idpf.github.io/epub3-samples/30/samples.html#kusamakura

ruby annotation, HTML: The Markup Language (an HTML language reference)
http://w3c.github.io/html-reference/ruby.html
Comment 3 Buovjaga 2018-04-18 11:26:19 UTC
Repro

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: c8c74a0b4ca6f3a3619f423b6548c80c52392ae0
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 15th 2018
Comment 4 Commit Notification 2018-04-26 15:18:02 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

tdf#116822 export ruby text and base text to epub.

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 5 impreza233 2018-05-28 09:34:30 UTC
Created attachment 142335 [details]
Solved in 6.1.0.0-beta1