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
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:6.1.0
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:

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

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 text:style-name="Ru1">
            <text:span text:style-name="T4">文</text:span>
...... ( 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.

Comment 2 Mark Hung 2018-04-16 14:11:38 UTC

EPUB3 samples that contains ruby

ruby annotation, HTML: The Markup Language (an HTML language reference)
Comment 3 Buovjaga 2018-04-18 11:26:19 UTC

Arch Linux 64-bit
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":


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:

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