Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修正《EPUB reflow sample_直排》 #30

Merged
merged 7 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ EPUB 3內使用HTML5與CSS3等網頁技術,各作業系統與瀏覽器組版
最終希望海內外各販售平台在提供閱讀程式時,能夠滿足本文件中的各項需求,以能夠完整呈現出版社所製作出的EPUB 3電子書,減少針對不同平台修改、調整的麻煩,降低書檔流通的障礙,讓電子書流通更為穩定確實。

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

###

要產生 epub 檔

```
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>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-006.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-006.jpg"/>
</svg>

</div>
</body>
</html>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-007.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-007.jpg"/>
</svg>

</div>
</body>
</html>
25 changes: 25 additions & 0 deletions samples/EPUB FXL sample/item/xhtml/p-colophon.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-colophon.jpg"/>
</svg>

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