|
EGLS_solutions
Solutions for EGLS requirements
IntroductionEach section or subsection in this wiki references to a section or subsection in the EGLS requirement list wiki. Solutions to Page Progression Direction +Solutions to Page progression direction +EGLS_PPD1 Solution A (Murata): OPFAllow the OPF 'item' element to have an optional attribute @page-progression-direction, which announces the page progression direction. To specify a package-level default, allow the OPF 'package' element to have the same attribute. Pros:
Cons:
EGLS_PPD1 Solution B (Murata): CSSIntroduce an IDPF-extension CSS property idpf-page-progression-direction. Pros:
Cons:
EGLS_PPD1 Solution C (Murata): both OPF and CSSIntroduce @page-progression-direction to the OPF 'item' element and also introduce an IDPF-extension CSS property idpf-page-progression-direction. Pros:
Cons:
EGLS_PPD1 Solution D (Takeshi): OPF(spine)Allow the OPF 'spine' element to have an optional attribute @page-progression-direction, which announces the page progression direction. Pros:
Cons:
EGLS_PPD1 Solution E (kojiishi)Follow http://dev.w3.org/csswg/css3-page/#progression to decide page progression. Exceptional cases like translated comics can set primary direction as vertical, then set inner div or each span to be horizontal. Pros:
Solutions to Two-page-spread +EGLS_PPD2 Solution A (kojiishi): CSS 2.1Use 'left' or 'right' to page-break-before/after/inside property in CS 2.1. Pros:
Cons:
EGLS_PPD2 Solution B (kojiishi): CSS Paged MediaAlthough CSS 3 Paged Media doesn't state yet, but there's a discussion to add "even" and "odd" values. Pros:
Cons:
EGLS_PPD2 Solution C (kojiishi): CSS Paged MediaEPUB 3.0 uses its own 'idpf-page-break-before' and 'idpf-page-break-after' properties. EGLS_PPD2 Solution D (Takeshi): OPFTo introduce a new page positioning attribute to 'itemref' element in OPF and specify the starting position of each OPS document. Let's say @odd-or-even and available value will be 'odd', 'even' and 'any'. The default is 'any'. It is the same as XSL-FO. Pros:
Cons:
Solutions to Vertical Writing +Solutions to Two Styles of Vertical Writing +EGLS_VW1 Solution A (kojiishi): CSSUse writing-mode property. Cons:
EGLS_VW1 Solution B (kojiishi): CSSDefine idpf-writing-mode property. Pros:
Solutions to Principal Writing Mode +EGLS_VW2 Solution A (Murata): OPFAllow the OPF 'item' element to have an optional attribute @writing-mode, which announces the page progression direction. To specify a package-level default, allow the OPF 'package' element to have the same attribute. Pros:
Cons:
EGLS_VW2 Solution B (Murata): CSSAdopt the writing-mode property of an upcoming working draft for CSS Text Layout. Pros:
Cons:
EGLS_VW2 Solution C (Murata): both OPF and CSSIntroduce @writing-mode to the OPF 'item' element and also adopt the writing-mode property of an upcoming working draft for CSS Text Layout. Pros:
Cons:
EGLS_VW2 Solution D (kojiishi): Alternate StylesheetsUse HTML 4.0 alternate stylesheets with appropriate guidelines, by following the Alternate Style Tags. Pros:
Solutions to Column Progression +EGLS_VW3 Solution A (Murata)Use CSS Multi-column Layout Module, which is a W3C candidate recommendation. Solutions to Writing Mode of Captions and Table Entries +EGLS_VW4 Solution A (kojiishi)Use writing-mode CSS property to the table tag. Pros:
Cons:
Solutions to Providing Reasonable Fallbacks to Horizontal Writing +EGLS_VW5 Solution A (kojiishi)Content providers can provide two stylesheets, one for each direction, and link to them using alternate stylesheets defined in HTML 4.0. Readers use alternate stylesheets to select which stylesheet to use. The use of alternate styleshets is detailed at Alternate Style Tags. In the case the stylesheet for the other direction is not available, readers can synthesisze it. EPUB3 may or may not define the guideline how to synthesize the stylesheets to switch the direction. Cons:
EGLS_VW5 Solution B (kojiishi)Content providers can use logical properties to author stylesheets that works both in horizontal and in vertical writing mode. Cons:
Solutions to Providing Optimal Layouts for more than one Principal Writing Mode +EGLS_VW6 Solution A (kojiishi)writing-mode property should solve the vertical glyph issue. For the number conversions, since it's a feature that requires cotextual information, readers can go through DOM and change the text as needed. The algorithm is up to the reader. For styles that can change by CSS, content providers can use Alternate Style Tags to provide different stylesheets for each directions. Cons:
Solutions to Announcing non-optimality +EGLS_VW7 Solution A (kojiishi)Content providers can write any text within the contents. Printed books sometimes contain "this book was originally written in vertical" in the cover page or anywhere else. Content providers can do the same thing in EPUB 3.0. EGLS_VW7 Solution B (kojiishi)Add a flag or value in OPF to specify that information, and reader prompts it to users when viewing in a speicifc direction. Please note that directions are also useful for accessibilty purposes; there are some people in the world who can read horizontal text but can't read vertical, or vice-versa. EGLS_VW7 Solution C (kojiishi)In the case content provider does not provide Alternate Style Tags for a direction, readers may prompt that the direciton is missing and is going to synthesize it. EGLS_VW7 Solution D (kojiishi)In the case content provider provides stylesheet for each direction using Alternate Style Tags, EPUB3 can define another class tag for the reader to prompt. Solutions to Mixed Text +Solutions to One by One +EGLS_MT1 Solution A (kojiishi)Write them in fullwidth forms. EGLS_MT2 Solution B (kojiishi)text-transform property in CSS3 Text can achieve the same result as Solution A in styles. Pros:
EGLS_MT2 Solution C (kojiishi)text-orientation property in CSS Writing Modes Module Level 3. Cons:
Solutions to Rotation +EGLS_MT2 Solution A (kojiishi)Write them in canonical (narrow-width) forms. Solutions to Tate-chu-yoko +EGLS_MT3 Solution A (kojiishi)Wrap them in a span with writing-mode and some other CSS properties to display them as Tate-chu-Yoko. Pros:
EGLS_MT3 Solution B (kojiishi)Wrap them in a span with text-combine property. Pros:
Solutions to Selection of the Three Setting Styles +EGLS_MT3 Solution A (kojiishi)Readres can go through DOM and make necessary changes as needed. Solutions to Line Breaking Rules Line Breaking Rules +Solutions to Line-start and Line-end Prohibition Rules +EGLS_LBR1-1 Solution A (kojiishi)line-break property in CSS3 Text. Pros:
EGLS_LBR1-1 Solution B (kyojitahara)line-break and text-justify property in CSS3 Text. Pros:
In JIS X 4051, a standard for Japanese layout, line adjustment rule is described in the section of Line-start (4.3 in JIS X 4051)and Line-end Prohibition Rules(4.4 in JIS X 4051). It is very important and pricipal in Japanese layout to make all lines aligned because of the following point of views.
Line-start/line-end prohibition and line adjustment are tightly related and we need both to realize the principal. Solution for line adjustment:
EGLS_LBR1-2 Solution A (kyojitahara)Add EPUB3.0 original CSS property 'characters-not-starting-line' and 'characters-not-ending-line'. Example:
Strict prohibition
div.line-breaking-rule-a{characters-not-starting-line: '!),.。々〉》:?}]】〕”%';}
Loose prohibition
div.line-breaking-rule-b{characters-not-starting-line: '!),.。々〉》:}]】〕” ';}Strict prohibition
div.line-breaking-rule-a{characters-not-ending-line: '(〈《{[【〔¥@$#〒“';}
Loose prohibition
div.line-breaking-rule-b{characters-not-ending-line: '(〈《{[【〔“';}Pros:
Solutions to Unbreakable Character Sequences +EGLS_LBR2-1 Solution A (kojiishi)line-break property in CSS3 Text. Pros:
EGLS_LBR2-1 Solution B (kyojitahara)line-break and text-justify property in CSS3 Text. Pros:
EGLS_LBR2-2 Solution A (kyojitahara)Add EPUB3.0 original CSS property 'unbreakable-characters'. Example: div{unbreakable-characters: '―‥…';}Pros:
Solutions to Hanging Punctuations +EGLS_EGLS_LBR3-1 Solution A (kojiishi)hanging-punctuation property in CSS3 Text. Cons:
EGLS_LBR3-1 Solution B (kyojitahara)hanging-punctuation and text-justify property in CSS3 Text. Pros:
EGLS_LBR3-2 Solution A (kyojitahara)Add EPUB3.0 original CSS property 'hanging-punctuation-characters'. Example: div{hanging-punctuation-characters: '、。,.';}Pros:
Solutions to Non-separating Characters +EGLS_EGLS_LBR4-1 Solution A (kojiishi)Justification logic described in text-justify property covers the case as an example for the UA to implement. Cons:
EGLS_LBR4-2 Solution A (kyojitahara)Add original CSS property 'inseparable-characters'. Example: div{inseparable-characters: '―‥…';}Pros:
Solutions to Ruby and Emphasis Dots +Q1: Should we use HTML5 ruby or should we use Ruby Annotation (XHTML)?Quite a few people think that HTML5 ruby is easier to write and implement than Ruby Annotation. Meanwhile, some people think that HTML5 ruby fails to handle some important use cases in Multiple Ruby Text (Japanese) EGLS_RE6, which can be addressed by "complex ruby markup" in Ruby Annotation. Some implementers are strongly against "complex ruby markup". It has not been widely implemented, although there are three implementations: a Firefox add-on (XHTML Ruby Support ), a Firefox patch, and Amaya. Proposal (MURATA): Adopt HTML5 ruby Q2: Should we use OPS switch elements (i.e., <ops:switch>) for wrapping ruby or should we use ruby directly?We assume that EPUB 3.0 is going to use HTML5 rather than XHTML 1.1 as a basis. If this is the case, wrapping HTML5 ruby by <ops:switch> does not make a lot of sense. Wrapping Ruby annotation ruby by <ops:switch> makes sense. If we wrap ruby with <ops:switch>, we do not need rp, which is for fallback. If not, we do need rp. Q3: Should we distinguish Japanese ruby, Chinese ruby, and Bopomofo Ruby? If so, how?Japanese mono ruby and Chinese mono ruby are rendered similarly, and Japanese group ruby and Chinese group ruby are also rendered similarly. Jukugo ruby and Multiple ruby text are specific to Japan. Bopomofo ruby is similar to Japanese or Chinese mono ruby, although bopomofo ruby text, which is always represented by Unicode characters in the ranges 3100-312F or 31A0-31BF, is rendered differently. Moreover, Bopomoto ruby positioning is different from Japanese or Chinese ruby. In this document we assume that we can use the same HTML syntax for Japanese ruby, Chinese ruby, and Bopomofo Ruby except that jukugo ruby and multiple ruby text need different syntax. Q4: Which of the three styles of Japanese ruby, namely mono, group, and jukugo ruby is supported by HTML5 and Ruby Annotation (XHTML)?The latest HTML5 working draft (as of 2010-09-26) does not mention mono, group, or jukugo ruby. The Ruby annotation mentions mono ruby and group ruby only in the glossary and does not mention jukugo ruby.
The following examples show the relationship between ruby letters and base kanji characters. Example of mono-ruby: "凝+(ぎよう)" "視+(し)" Example of jukugo-ruby 1: "凝+(ぎよう) 視+(し)" Example of jukugo-ruby 2: "(凝視)+(ぎよう/し)" Q5: Should we use CSS3 Ruby?CSS3 Ruby is a candidate recommendation, but is likely to be thoroughly changed for HTML5 ruby. The latest editor's draft is available. Here we assume that we will not use CSS3 ruby for EPUB 3.0. Q6: Should we replace ぁぃぅぇぉ in ruby text by あいうえお?In traditional publishing in Japan, ruby text typically uses あいうえお in stead of ぁぃぅぇぉ. Unicode has あいうえお(U+3042 U+3044 U+3046 U+3048 U+304a) as well as ぁぃぅぇぉ(U+3041 U+3043 U+3045 U+3047 U+3049). In this document, we assume that an EPUB document always uses ぁぃぅぇぉ and the reading system replaces them by あいうえお when they are displayed as part of ruby text. Note: Yamamoto-san wrote "Traditionally in Japanese typography, it is true that a small kana character is usually not used for a palatalized or labio-velarized syllable, if it is used as a ruby character. However, it is the author or editor who decides which kana style is to be used (small or large) in the real-world publishing business. Hence, it should be noted that this is neither a glyph issue, nor a font issue. This issue is clearly on the abstracted layer of characters and text. Therefore, any automatic conversion or replacement of characters must not be allowed usually. In fact, there are not a few authors and editors who want to use small kana characters in ruby instances to describe palatalized or labio-velarized syllables, depending on the usages and purposes of their content." Note: The latest editor's draft for CSS Fonts Module Level 3 provides font-variant:ruby, which enables display of ruby glyphs (OpenType feature: ruby). Note: Yamamoto-san also wrote "On the other hand, I think this issue is on the layer of glyphs. For example, if you specify the "ruby" OpenType glyph substitution feature, its effect is only that the stroke weight of your ruby glyphs are added. This "ruby" glyph substitution is intended to prevent ruby characters from looking too thin, because composing ruby glyphs by reducing the body size of ordinary kana glyphs in the font to 1/2 the type size used will usually make them look too thin. The "ruby" glyph substitution feature replaces the specified ruby glyphs only. It doesn't affect any characters at all. Therefore, even if you specify the "ruby" OpenType glyph substitution feature to a small kana character that you have specified to be used as a ruby character, the character won't be replaced with its larger version, and must not be." Comments by kojiishi: text-transform:large-kana can transform small Kana to large Kana without modifying the source text. Solutions to Mono-Ruby +EGLS_RE1 Solution A (Murata): HTML5 ruby without ops:switch (and with rp)Example: <p> <ruby>東<rp>(</rp><rt>とう</rt><rp>)</rp></ruby><ruby>京<rp>(</rp><rt>きょう</rt><rp>)</rp></ruby>は日本の首都です。 </p> <p> <ruby>东<rp>(</rp><rt>dōng</rt><rp>)</rp></ruby><ruby>京<rp>(</rp><rt>jīng</rt><rp>)</rp></ruby>是日本首都 </p> Pros:
Note: Since the latest HTML5 working draft (as of 2010-09-26) does not mention mono ruby, it is not completely clear HTML5 can capture mono ruby. EGLS_RE1 Solution B (Murata): HTML5 ruby with ops:switch (and without rp)Example: <p>
<ops:switch>
<ops:case ...>
<ruby>東<rt>とう</rt></ruby><ruby>京<rt>きょう</rt></ruby>
</ops:case>
<ops:default>
<span>東(とう)京(きょう)</span>
</ops:default>
</ops:switch>は日本の首都です。
</p><p>
<ops:switch>
<ops:case ...>
<ruby>东<rt>dōng</rt></ruby><ruby>京<rt>jīng</rt></ruby>
</ops:case>
<span>东(dōng)京(jīng)</span>
</ops:default>
</ops:switch>是日本首都
</p>Pros:
EGLS_RE1 Solution C (Murata): Ruby annotation with ops:switch (and without rp)Example: <p>
<ops:switch>
<ops:case ...>
<ruby><rb>東</rb><rt>とう</rt></ruby><ruby><rb>京</rb><rt>きょう</rt></ruby>
</ops:case ...>
<ops:default>
<span>東(とう)京(きょう)</span>
</ops:default>
</ops:switch>は日本の首都です。
</p>Pros:
Solutions to Jukugo-ruby +EGLS_RE2 Solution A (Murata): HTML5 ruby without ops:switch (and with rp)Example: <p> <ruby>東<rp>(</rp><rt>とう</rt><rp>)</rp>京<rp>(</rp><rt>きょう</rt><rp>)</rp></ruby>は日本の首都です。 </p> EGLS_RE2 Solution B (Murata): HTML5 ruby with ops:switch (and without rp)Example: <p>
<ops:switch>
<ops:case ...>
<ruby>東<rt>とう</rt>京<rt>きょう</rt></ruby>
</ops:case ...>
<ops:default>
<span>東(とう)京(きょう)</span>
</ops:default>
</ops:switch>は日本の首都です。
</p>EGLS_RE2 Solution C (Murata): Ruby Annotation with ops:switch (and without rp)Solutions to Group-ruby +EGLS_RE3 Solution A (Murata): HTML5 ruby without ops:switch (and with rp)Example: <p> <ruby>東京<rp>(</rp><rt>とうきょう</rt><rp>)</rp></ruby>は日本の首都です。 </p> <p> <ruby>东京<rp>(</rp><rt>dōng jīng</rt><rp>)</rp></ruby>是日本首都 </p> EGLS_RE3 Solution B (Murata): HTML5 ruby with ops:switch (and without rp)Example: <p>
<ops:switch>
<ops:case ...>
<ruby>東京<rt>とうきょう</rt></ruby>
</ops:case>
<ops:default>
<span>東京(とうきょう)</span>
</ops:default>
</ops:switch>は日本の首都です。
</p><p>
<ops:switch>
<ops:case ...>
<ruby>东京<rt>dōng jīng</rt></ruby>
</ops:case>
<span>东京(dōng jīng)</span>
</ops:default>
</ops:switch>是日本首都
</p>EGLS_RE3 Solution C (Murata): Ruby Annotation with ops:switch (and without rp)Solutions to Bopomofo Ruby (Zhuyin Fuhao) +EGLS_RE4 Solution A (Murata): HTML5 ruby without ops:switch (and with rp)Example: <p> <ruby>世<rp>(</rp><rt>ㄕˋ</rt><rp>)</rp></ruby><ruby>上<rp>(</rp><rt>ㄕㄤˋ</rt><rp>)</ruby> </p> EGLS_RE4 Solution B (Murata): HTML5 ruby with ops:switch (and without rp)<p>
<ops:switch>
<ops:case ...>
<ruby>世<rp>(</rp><rt>ㄕˋ</rt><rp>)</rp></ruby><ruby>上<rp>(</rp><rt>ㄕㄤˋ</rt><rp>)</ruby>
</ops:case>
<ops:default>
<span>世(ㄕˋ)上(ㄕㄤˋ)</span>
</ops:default>
</ops:switch>
</p>Solutions to Ruby Positioning +EGLS_RE5-1/2 Solution A (Murata)Do nothing in the EPUB 3.0 specification. Details of ruby positioning should ideally be described in HTML5 ruby or XHTML Ruby annotation. If these specifications do not provide enough information, it might be a good idea for each country or region to create some guideline document and submit it to IDPF so that it can be linked from the IDPF web site. Solutions to Multiple Ruby Text (Japanese) +EGLS_RE6 Solution A (Murata)<ruby>
<ruby>東<rp>(</rp><rt>とう</rt><rp>)</rp>南<rp>(</rp><rt>なん</rt><rp>)</rp></ruby>
<rt><rp>[</rp>たつみ</rt><rp>]</rp>
</ruby>Pros:
Cons:
Solutions to Handling Ruby According on User preferences or Displays Properties +EGLS_RE7 Solution A (Murata)The EPUB specification should make clear what is intended by the content provider but should not try to restrict the behavior of reading systems. In other words, reading systems should be allowed to do anything. This point is already made clear in 2.7: Rendering of Documents on Reading Systems in OPS 2.0. We might want to add some examples for ruby. Solutions to Emphasis Dots +EGLS_RE8 Solution A (Murata)Ideally, W3C will create a candidate recommendation for the 'text-emphasis' property of (currently in CSS Text) in a very timely manner, and EPUB 3.0 should simply adopt it. EGLS_RE8 Solution B (Murata)EPUB 3.0 uses 'idpf-text-emphasis', which is based on a non-CR working draft from W3C. EGLS_RE8 Solution C (Murata)EPUB 3.0 provides its own 'idpf-text-emphasis' without relying on any W3C specs. Solutions to Characters or Glyphs +Solutions to Versions of Unicode or ISO/IEC 10646 +EGLS_CG1 Solution A (MURATA)Reference to Unicode 6.0 without mandating all conformance requirements present in Unicode 6.0. Pros:
EGLS_CG1 Solution B (MURATA)Reference to a particular version of ISO/IEC 10646 that has all code points of Unicode 6.0. Do not reference to Unicode. Pros:
Solutions to Prohibiting Private-use Characters +EGLS_CG2 Solution A (MURATA)Deprecate the use of code values in the range U+E000--U+F8FF (Private Use Area in the BMP), the range U+F0000-U+FFFFD (The Plane 15 without U+FFFFE and U+FFFFF), and the range U+100000-U+10FFFFD (The Plane 16 without U+FFFFE and U+FFFFF) for EPUB 3.0 documents. Solutions to In-line Graphics +EGLS_CG3 Solution A (Fujisawa)Use HTML img element to reference an SVG graphics file or SVG fragment in the same HTML file. This solution also satisfies EGLS_CG4. It may be difficult to align the baseline of text with SVG graphics. CSS 2D Transforms can be used to rotate SVG graphics to support vertical layout. <http://www.w3.org/TR/css3-2d-transforms/> EGLS_CG3 Solution B (Fujisawa)Use the font element to define graphics as SVG Font and put that definition directly into the HTML head element. In the same HTML file, we can just specify the 'font-family' for the SVG Font to display the corresponding graphics. This solution also satisfies EGLS_CG4. A SVG Font definition can contain one or more graphics. SVG 1.1 supports both vertical and horizontal layout for SVG Fonts, but SVG Tiny 1.2 only supports horizontal layout. Solutions to Font Embedding +EGLS_CG4 Solution A (Fujisawa)Ideally, W3C will create a CR for CSS Fonts Module Level 3, and EPUB will use its @font-face property to reference to SVG fonts ((SVG 1.1 Fonts and SVG Tiny 1.2) or WOFF fonts. Relative URIs specified in @font-face reference to SVG fonts or WOFF fonts within the ZIP file. Note: WOFF is not a W3C recommendation, but is widely implemented already. It is expected to become a CR in 2010. Solutions to Others +Solutions to Phonetics in Metadata +EGLS_O1 Solution A (Murata): xml:langUse two elements of the same tag name. One is for a kanji string (which may contain non-Kanji characters) and the other is for a katakana string. Specify xml:lang="ja-jp" and xml:lang="ja-ka-jp" for the first and second elements, respectively. This is actually possible in EPUB 2.0 but has never been clarified. <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:opf="http://www.idpf.org/2007/opf">
<dc:title xml:lang="ja-jp">伊達姿五侍</dc:title>
<dc:title xml:lang="ja-kana-jp">ダテスガタゴサムライ</dc:title>
...
</metadata>Pros:
Cons:
EGLS_O1 Solution B (kojiishi): INTERLINEAR ANNOTATIONUse Unicode INTERLINEAR ANNOTATION to embed phonetics into the text as defined in http://www.unicode.org/charts/PDF/UFFF0.pdf
What epub applications should do against this Unicode sequence is described in "Unicode in XML and other Markup Languages" (Unicode Technical Report #20 and W3C Working Group Note 16). Reading systems are recommended to take one or more of the following actions:
Note that the use of these code point in general markup is discouraged in the above Technical Note, EPUB3 can define its interpretation and where it can be used clearly to avoid those issues. Example: <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:opf="http://www.idpf.org/2007/opf">
<dc:title xml:lang="ja-jp">U+FFF9伊達姿五侍U+FFFAダテスガタゴサムライU+FFFB</dc:title>
...
</metadata>Where U+FFF9, U+FFFA, and U+FFFB in the example represents single Unicode characters. Pros
Cons
Solutions to Language Inheritance +EGLS_O2 Solution A (Takeshi)Content author specifies primaliry language of a package and use it as the default langage. Use opf:priority attribute and set 'primal'. Pros:
<dc:language opf:priority="primal">ja</dc:language> <dc:language>en</dc:language> Cons:
EGLS_O2 Solution B (Takeshi)Reading system uses the first entry of language element as the primal language and use it as default language. <dc:language>en</dc:language> <dc:language>fr</dc:language> Pros:
No need to change OPS 2.0.1 format. Cons:
Solutions to Normalization +EGLS_O3 Solution A (Murata)Make Unicode Normalization optional in OPS and OPF. Pros:
EGLS_O3 Solution B (Murata)Use variation selectors of Unicode rather than avoiding Unicode Normalization C. See ISO/IEC JTC1/SC2 WG2 N3525. Pros:
|
Small type in "EGLS_VW6 Solution A" cotextual -> contextual.