SigilのEPUB 3ファイル用追加コード

sigilでEPUB 3ファイルを作成するときに使う追加コードを備忘録(バックアップ)として。
すでにある場合は置き換え。なければ追加。
「これが正解」というわけではなく、あくまでも「ウチはこうやってる」ということで。

■content.opf
<package version=”3.0″ unique-identifier=”BookId” prefix=”ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/” xmlns=”http://www.idpf.org/2007/opf”>

———-

<dc:language>ja</dc:language>
<dc:title id=”title0″>書名</dc:title>
<meta refines=”#title0″ property=”file-as”>ショメイ</meta>
<meta refines=”#title0″ property=”display-seq”>1</meta>
<dc:creator id=”creator0″>著者名</dc:creator>
<meta refines=”#creator0″ property=”file-as”>チョシャメイ</meta>
<meta refines=”#creator0″ scheme=”marc:relators” property=”role” id=”role”>aut</meta>
<meta refines=”#creator0″ property=”display-seq”>1</meta>
<dc:publisher id=”publisher”>出版社名</dc:publisher>
<meta refines=”#publisher” property=”file-as”>シュッパンシャメイ</meta>
<meta property=”ibooks:specified-fonts”>true</meta>

———

<item id=”nav.xhtml” href=”Text/nav.xhtml” media-type=”application/xhtml+xml” properties=”nav”/>

———

<item id=”cover.jpg” href=”Images/cover.jpg” media-type=”image/jpeg”/>

———

・書籍として、縦書き(縦組)/ページめくり方向が「右から左」の場合、
<spine page-progression-direction=”rtl” toc=”ncx”>
・書籍として、横書き(横組)/ページめくり方向が「左から右」の場合、
<spine page-progression-direction=”ltr” toc=”ncx”>

———

<guide>
<reference type=”cover” title=”中表紙” href=”Text/centercover.xhtml”/>
<reference type=”toc” title=”目次” href=”Text/nav.xhtml”/>
<reference type=”text” title=”本文” href=”Text/Section0001.xhtml”/>
</guide>

■nav.xhtml
<nav id=”landmarks” class=”landmarks” epub:type=”landmarks” hidden=”hidden”>
<h2>ガイド</h2>
<ol>
<li><a epub:type=”cover” href=”../Text/centercover.xhtml”><span>表紙</span></a></li>
<li><a epub:type=”toc” href=”../Text/nav.xhtml”><span>目次</span></a></li>
<li><a epub:type=”bodymatter” href=”../Text/Section0001.xhtml”><span>本文</span></a></li>
<li><a epub:type=”backmatter” href=”../Text/ad009.xhtml”><span>広告・奥付</span></a></li>
</ol>
</nav>

■toc.ncx
<?xml version=”1.0″ encoding=”UTF-8″?>
<ncx xmlns:ncx=”http://www.daisy.org/z3986/2005/ncx/”
xmlns=”http://www.daisy.org/z3986/2005/ncx/”
version=”2005-1″
xml:lang=”ja”>

———

<ncx:docTitle>
<ncx:text>書名</ncx:text>
</ncx:docTitle>
<ncx:navMap>
<ncx:navPoint id=”navPoint-1″ playOrder=”1″>
<ncx:navLabel>
<ncx:text>目次</ncx:text>
</ncx:navLabel>
<ncx:content src=”Text/nav.xhtml”/>
</ncx:navPoint>
</ncx:navMap>

■本文html
<?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=”ja”>
<head>
<meta charset=”UTF-8″ />

■ガイドナビ要素指定
<body class=”cover” epub:type=”cover”>
<body class=”frontmatter” epub:type=”frontmatter”>
<body class=”bodymatter” epub:type=”bodymatter”>
<body class=”backmatter” epub:type=”backmatter”>

■縦中横
css
span.tcy {
text-combine: horizontal;
-webkit-text-combine: horizontal;
-epub-text-combine: horizontal;
}

xhtml
<span class=”tcy”>!!</span>
<span class=”tcy”>!?</span>

■改ページ
<p style=”page-break-before: always;”></p>

■圏点
css
span.em-dot {
text-emphasis-style : dot;
-epub-text-emphasis-style : dot;
-epub-text-emphasis-color : #333333;
webkit-text-emphasis-style : dot;
-webkit-text-emphasis-color : #333333;
}

xhtml
<span class=”em-dot”>圏点</span>

■ルビ
<ruby>東京都<rt>とうきょうと</rt></ruby>
<ruby><rt></rt></ruby>

Comments are closed.