Skip to content

Commit

Permalink
Merge pull request #30 from jamessa/master
Browse files Browse the repository at this point in the history
@jamessa 建議修正「EPUB reflow sample_直排」內容,並以原始檔方式存放 EPUB content。
  • Loading branch information
TDPF authored Dec 18, 2019
2 parents c70b59e + 0bb14e0 commit 45a6751
Show file tree
Hide file tree
Showing 161 changed files with 19,146 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.epub
49 changes: 32 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,55 @@
# 台灣 EPUB 3 製作指引

## 關於本文件
## 關於本指引

### 目的

本製作指引(以下稱本文件)主要提供給出版社在製作一般EPUB格式電子書時作為參考使用。
本製作指引(以下稱本指引)主要提供給出版社在製作一般EPUB格式電子書時作為參考使用。

由於EPUB 3格式有著相當多元的製作方式與表現手法。結果在製作時難以決定該使用何種方法,也不容易掌握其表現程度。以此,本文件作為一份中介規格書,提供出版社製作時參考使用,以解決這些問題。
由於EPUB 3格式有著相當多元的製作方式與表現手法。結果在製作時難以決定該使用何種方法,也不容易掌握其表現程度。以此,本指引作為一份中介規格書,提供出版社製作時參考使用,以解決這些問題。

同時,本文件不僅用於EPUB 3格式電子書製作使用,也提供電子書平台業者於製作EPUB 3閱讀程式時,作為一個須支援的技術規格說明,以求出版社所製作出的電子書得以在不同閱讀程式上有近乎一致的表現,達到一源多用的目的。
同時,本指引不僅用於EPUB 3格式電子書製作使用,也提供電子書平台業者於製作EPUB 3閱讀程式時,作為一個須支援的技術規格說明,以求出版社所製作出的電子書得以在不同閱讀程式上有近乎一致的表現,達到一源多用的目的。

### 概要

本文件適用的書籍種類為:小說等文字書(Reflowable),以及漫畫、雜誌等圖文書(Fixed-Layout)。
本指引適用的書籍種類為:小說等文字書(Reflowable),以及漫畫、雜誌等圖文書(Fixed-Layout)。

文字書僅提供簡單體裁,不包含如文字方向混合(直排與橫排混合)以及多欄排版、文繞圖等具有特殊設計表現。部分進階的表現會在本文件中標註為「選擇性」,閱讀程式開發商可嘗試實作,出版社使用這些表現時需注意可能無法正常顯示。
文字書僅提供簡單體裁,不包含如文字方向混合(直排與橫排混合)以及多欄排版、文繞圖等具有特殊設計表現。部分進階的表現會在本指引中標註為「選擇性」,閱讀程式開發商可嘗試實作,出版社使用這些表現時需注意可能無法正常顯示。

圖文書僅限於漫畫,或者難以重製的雜誌,使用一頁一圖包裝成EPUB 3固定版面格式(簡易型Fixed-Layout)。使用HTML排版,或者加入MediaOverlay語音朗讀功能的複雜固定版面不是本文件的對象
圖文書僅限於漫畫,或者難以重製的雜誌,使用一頁一圖包裝成EPUB 3固定版面格式(簡易型Fixed-Layout)。使用HTML排版,或者加入MediaOverlay語音朗讀功能的複雜固定版面不是本指引的對象

EPUB 3內使用HTML5與CSS3等網頁技術,各作業系統與瀏覽器組版引擎對於基本元素的解釋有相當的差異,這是發生在網頁上的既有現象,且電子書閱讀程式多半不會提供規格說明;也不一定提出測試方法讓出版社得以確認表現。為求單一檔案在不同閱讀器上能夠顯示一致,也是本文件的目的
EPUB 3內使用HTML5與CSS3等網頁技術,各作業系統與瀏覽器組版引擎對於基本元素的解釋有相當的差異,這是發生在網頁上的既有現象,且電子書閱讀程式多半不會提供規格說明;也不一定提出測試方法讓出版社得以確認表現。為求單一檔案在不同閱讀器上能夠顯示一致,也是本指引的目的

本文件以日本電子書出版社協會(電書協)公佈之EPUB 3 File Creation Guide為底本進行擴展,加入台灣數位出版產業之需求與特性。該範本在日本已經成為出版社與販售平台溝通的良好範例,並且具備文字直排等細節,且基於IDPF下Readium Foundation所公布的Readium程式作為基礎,提供範本與樣式表,為電子書表現的最大公約數。足以供中文電子書所使用。
本指引以日本電子書出版社協會(電書協)公佈之EPUB 3 File Creation Guide為底本進行擴展,加入台灣數位出版產業之需求與特性。該範本在日本已經成為出版社與販售平台溝通的良好範例,並且具備文字直排等細節,且基於IDPF下Readium Foundation所公布的Readium程式作為基礎,提供範本與樣式表,為電子書表現的最大公約數。足以供中文電子書所使用。

我們也希望本文件提供的範本能夠適用至各種電子書製作軟體,令產製出的EPUB 3文件能夠具備通用性。令電子書的生產到販賣過程能夠更加順暢。
我們也希望本指引提供的範本能夠適用至各種電子書製作軟體,令產製出的EPUB 3文件能夠具備通用性。令電子書的生產到販賣過程能夠更加順暢。

最終希望海內外各販售平台在提供閱讀程式時,能夠滿足本文件中的各項需求,以能夠完整呈現出版社所製作出的EPUB 3電子書,減少針對不同平台修改、調整的麻煩,降低書檔流通的障礙,讓電子書流通更為穩定確實。
最終希望海內外各販售平台在提供閱讀程式時,能夠滿足本指引中的各項需求,以能夠完整呈現出版社所製作出的EPUB 3電子書,減少針對不同平台修改、調整的麻煩,降低書檔流通的障礙,讓電子書流通更為穩定確實。

本文件依照IDPF所公布的EPUB 3.01規範為基礎,並且EPUB 3.1規範。規範中未普遍實作,但為出版社重要需求的部分以附件提出,希望能取得海內外閱讀程式開發商的共識,作為添補修正。
本指引依照IDPF所公布的EPUB 3.01規範為基礎,並且EPUB 3.1規範。規範中未普遍實作,但為出版社重要需求的部分以附件提出,希望能取得海內外閱讀程式開發商的共識,作為添補修正。


## 檔案說明

此儲存庫中存放包含「台灣 EPUB 3 製作指引」之本文內容(Markdown 與 EPUB 格式),並針對文中所提及之設計規範與建議,提供 CSS 設計樣版以利電子書製作與閱讀器實作者參考。為利於內容編修與版本管控,所有 EPUB 內容均以解壓縮後之原始檔方式存放。

### 範本全文

- [Markdown](https://github.com/dpublishing/epub3guide/blob/master/tdpf-epub3guide.md)
- [EPUB](https://github.com/dpublishing/epub3guide/blob/master/samples/台灣EPUB%203製作指引.epub)
- [Markdown 格式](https://github.com/dpublishing/epub3guide/blob/master/tdpf-epub3guide.md)
- [EPUB 格式](https://github.com/dpublishing/epub3guide/blob/master/samples/%E5%8F%B0%E7%81%A3EPUB%203%E8%A3%BD%E4%BD%9C%E6%8C%87%E5%BC%95)

### 參考範例

- [Fixed Layout範本](https://github.com/dpublishing/epub3guide/blob/master/samples/EPUB%20FXL%20sample.epub)
- [Reflow 直排範本](https://github.com/dpublishing/epub3guide/blob/master/samples/EPUB%20reflow%20sample_直排.epub)
- [Reflow 橫排範本](https://github.com/dpublishing/epub3guide/blob/master/samples/EPUB%20reflow%20sample_橫排.epub)
- [CSS 樣版](https://github.com/dpublishing/epub3guide/tree/master/samples/style_template)
- 指引範本
- [Fixed Layout](https://github.com/dpublishing/epub3guide/blob/master/samples/EPUB%20FXL%20sample)
- [Reflow 直排](https://github.com/dpublishing/epub3guide/blob/master/samples/EPUB%20reflow%20sample_%E7%9B%B4%E6%8E%92)
- [Reflow 橫排](https://github.com/dpublishing/epub3guide/blob/master/samples/EPUB%20reflow%20sample_%E6%A9%AB%E6%8E%92)

### 產生 EPUB 檔方式

可使用 EPUBChecker 指令將本儲存庫中提供之 EPUB 原始內容產生為封裝後的 EPUB 檔案。關於更多 EPUBChecker 資訊可參考 EPUBChecker 官網: https://github.com/w3c/epubcheck

```shell
epubcheck [目錄名稱] --mode exp --save
```
3 changes: 3 additions & 0 deletions pack-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

find samples/ ! -name 'style_template' -maxdepth 1 -mindepth 1 -type d -print | xargs -I '{}' epubcheck "{}" -mode exp -save
Binary file removed samples/EPUB FXL sample.epub
Binary file not shown.
12 changes: 12 additions & 0 deletions samples/EPUB FXL sample/META-INF/container.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<container
version="1.0"
xmlns="urn:oasis:names:tc:opendocument:xmlns:container"
>
<rootfiles>
<rootfile
full-path="item/standard.opf"
media-type="application/oebps-package+xml"
/>
</rootfiles>
</container>
Binary file added samples/EPUB FXL sample/item/image/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-002.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-003.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-004.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-005.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-006.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-007.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added samples/EPUB FXL sample/item/image/i-white.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions samples/EPUB FXL sample/item/navigation-documents.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xml:lang="zh-TW" lang="zh-TW"
>
<head>
<meta charset="UTF-8"/>
<title>目錄</title>
</head>
<body>
<nav epub:type="toc" id="toc">
<h1>目錄</h1>
<ol>
<li><a href="xhtml/p-cover.xhtml">封面</a></li>
<li><a href="xhtml/p-001.xhtml">目錄</a></li>
<li><a href="xhtml/p-002.xhtml">固定版面的適用範圍</a></li>
<li><a href="xhtml/p-003.xhtml">固定版面支援的功能</a></li>
<li><a href="xhtml/p-004.xhtml">固定版面所使用的素材</a></li>
<li><a href="xhtml/p-005.xhtml">製作流程</a></li>
<li><a href="xhtml/p-006.xhtml">跨頁範本</a></li>
<li><a href="xhtml/p-colophon.xhtml">版權頁</a></li>
</ol>
</nav>
</body>
</html>
97 changes: 97 additions & 0 deletions samples/EPUB FXL sample/item/standard.opf
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<package
xmlns="http://www.idpf.org/2007/opf"
version="3.0"
xml:lang="zh-TW"
unique-identifier="unique-id"
prefix="rendition: http://www.idpf.org/vocab/rendition/#"
>

<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">

<!-- 書名 -->
<dc:title id="title">台灣EPUB 3製作指引 固定版面範本</dc:title>

<!-- 作者名 -->
<dc:creator id="creator01">台灣數位出版聯盟</dc:creator>
<meta refines="#creator01" property="role" scheme="marc:relators">aut</meta>
<meta refines="#creator01" property="display-seq">1</meta>

<dc:creator id="creator02">作者名2</dc:creator>
<meta refines="#creator02" property="role" scheme="marc:relators">aut</meta>
<meta refines="#creator02" property="display-seq">2</meta>

<!-- 出版社名 -->
<dc:publisher id="publisher">出版社名</dc:publisher>


<!-- 語言 -->
<dc:language>zh-TW</dc:language>

<!-- 檔案id -->
<dc:identifier id="unique-id">urn:uuid:860ddf31-55a4-449a-8cc9-3c1837657a15</dc:identifier>

<!-- 更新時間 -->
<meta property="dcterms:modified">2019-01-01T00:00:00Z</meta>

<!-- Fixed-Layout Documents -->
<meta property="rendition:layout">pre-paginated</meta>
<meta property="rendition:spread">landscape</meta>



</metadata>

<manifest>

<!-- navigation -->
<item media-type="application/xhtml+xml" id="toc" href="navigation-documents.xhtml" properties="nav"/>

<!-- style -->
<item media-type="text/css" id="fixed-layout" href="style/fixed-layout.css"/>

<!-- image -->
<item media-type="image/jpeg" id="cover" href="image/cover.jpg" properties="cover-image"/>
<item media-type="image/jpeg" id="i-white" href="image/i-white.jpg"/>
<item media-type="image/jpeg" id="i-001" href="image/i-001.jpg"/>
<item media-type="image/jpeg" id="i-002" href="image/i-002.jpg"/>
<item media-type="image/jpeg" id="i-003" href="image/i-003.jpg"/>
<item media-type="image/jpeg" id="i-004" href="image/i-004.jpg"/>
<item media-type="image/jpeg" id="i-005" href="image/i-005.jpg"/>
<item media-type="image/jpeg" id="i-006" href="image/i-006.jpg"/>
<item media-type="image/jpeg" id="i-007" href="image/i-007.jpg"/>
<item media-type="image/jpeg" id="i-colophon" href="image/i-colophon.jpg"/>


<!-- xhtml -->
<item media-type="application/xhtml+xml" id="p-cover" href="xhtml/p-cover.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-white" href="xhtml/p-white.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-001" href="xhtml/p-001.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-002" href="xhtml/p-002.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-003" href="xhtml/p-003.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-004" href="xhtml/p-004.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-005" href="xhtml/p-005.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-006" href="xhtml/p-006.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-007" href="xhtml/p-007.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-colophon" href="xhtml/p-colophon.xhtml" properties="svg"/>
<item media-type="application/xhtml+xml" id="p-white2" href="xhtml/p-white2.xhtml" properties="svg"/>

</manifest>

<spine page-progression-direction="rtl">

<itemref linear="yes" idref="p-cover" properties="rendition:page-spread-center"/>
<itemref linear="yes" idref="p-white" properties="page-spread-right"/>
<itemref linear="yes" idref="p-001" properties="page-spread-left"/>
<itemref linear="yes" idref="p-002" properties="page-spread-right"/>
<itemref linear="yes" idref="p-003" properties="page-spread-left"/>
<itemref linear="yes" idref="p-004" properties="page-spread-right"/>
<itemref linear="yes" idref="p-005" properties="page-spread-left"/>
<itemref linear="yes" idref="p-006" properties="page-spread-right"/>
<itemref linear="yes" idref="p-007" properties="page-spread-left"/>
<itemref linear="yes" idref="p-colophon" properties="page-spread-right"/>
<itemref linear="yes" idref="p-white2" properties="page-spread-left"/>

</spine>

</package>
12 changes: 12 additions & 0 deletions samples/EPUB FXL sample/item/style/fixed-layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@charset "UTF-8";

html,
body {
margin: 0;
padding: 0;
font-size: 0;
}
svg {
margin: 0;
padding: 0;
}
41 changes: 41 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-001.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xml:lang="zh-TW" lang="zh-TW"
>
<head>
<meta charset="UTF-8"/>
<title>作品名</title>
<link rel="stylesheet" type="text/css" href="../style/fixed-layout.css"/>
<meta name="viewport" content="width=1536, height=2048"/>
</head>
<body>
<div class="main">

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 1536 2048">
<image width="1536" height="2048" xlink:href="../image/i-001.jpg"/>
<a xlink:href="p-002.xhtml" target="_top" xlink:title="固定版面的適用範圍">
<rect fill-opacity="0.0" x="360" y="610" width="670" height="100"/>
</a>
<a xlink:href="p-003.xhtml" target="_top" xlink:title="固定版面支援的功能">
<rect fill-opacity="0.0" x="360" y="780" width="670" height="100"/>
</a>
<a xlink:href="p-004.xhtml" target="_top" xlink:title="固定版面所使用的素材">
<rect fill-opacity="0.0" x="360" y="930" width="750" height="100"/>
</a>
<a xlink:href="p-005.xhtml" target="_top" xlink:title="製作流程">
<rect fill-opacity="0.0" x="360" y="1100" width="300" height="100"/>
</a>
<a xlink:href="p-006.xhtml" target="_top" xlink:title="跨頁範本">
<rect fill-opacity="0.0" x="360" y="1250" width="300" height="100"/>
</a>

</svg>

</div>
</body>
</html>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-002.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xml:lang="zh-TW" lang="zh-TW"
>
<head>
<meta charset="UTF-8"/>
<title>作品名</title>
<link rel="stylesheet" type="text/css" href="../style/fixed-layout.css"/>
<meta name="viewport" content="width=1536, height=2048"/>
</head>
<body>
<div class="main">

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 1536 2048">
<image width="1536" height="2048" xlink:href="../image/i-002.jpg"/>
</svg>

</div>
</body>
</html>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-003.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xml:lang="zh-TW" lang="zh-TW"
>
<head>
<meta charset="UTF-8"/>
<title>作品名</title>
<link rel="stylesheet" type="text/css" href="../style/fixed-layout.css"/>
<meta name="viewport" content="width=1536, height=2048"/>
</head>
<body>
<div class="main">

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 1536 2048">
<image width="1536" height="2048" xlink:href="../image/i-003.jpg"/>
</svg>

</div>
</body>
</html>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-004.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xml:lang="zh-TW" lang="zh-TW"
>
<head>
<meta charset="UTF-8"/>
<title>作品名</title>
<link rel="stylesheet" type="text/css" href="../style/fixed-layout.css"/>
<meta name="viewport" content="width=1536, height=2048"/>
</head>
<body>
<div class="main">

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 1536 2048">
<image width="1536" height="2048" xlink:href="../image/i-004.jpg"/>
</svg>

</div>
</body>
</html>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-005.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xml:lang="zh-TW" lang="zh-TW"
>
<head>
<meta charset="UTF-8"/>
<title>作品名</title>
<link rel="stylesheet" type="text/css" href="../style/fixed-layout.css"/>
<meta name="viewport" content="width=1536, height=2048"/>
</head>
<body>
<div class="main">

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 1536 2048">
<image width="1536" height="2048" xlink:href="../image/i-005.jpg"/>
</svg>

</div>
</body>
</html>
Loading

0 comments on commit 45a6751

Please sign in to comment.