画像やxhtmlといったEPUBフォルダにあるファイルを記載します
表紙画像やコンテンツ(原稿)、目次など電子書籍に使う各ファイルを記載していきます。記載するのに使うのがOPFファイル。
まずは、OFPファイルを探します。kindigi_reflow_templateフォルダのitemフォルダ内にstandard.opfというのがあります。これがOPFファイルです。
kindigi_reflow_template
┗itemフォルダ
┗standard.opf

作業自体はたいしたことありませんが、間違えるとEPUBにパッケージできなかったりしますので正確にやります。
テキストエディターでstandard.opfを開き、「manifest」と検索してください。38行目あたりにある<manifest>以下にファイルを記載していきます。実際には、見ての通りすでにファイルは記載されています。手順4.「フォルダ内のファイルを整理する」で消去したファイルをリスト(manifest)からも消していく作業になります。
<manifest>
<manifest>の少し下43行目あたりに<!-- style -->というのがあると思います。ここにはCSSが記載されています。手順4.「フォルダ内のファイルを整理する」でCSSのファイルを消しました。それに伴ってOPFファイルも変更が必要です。
消したCSSはこのリスト(manifest)からも消さなければなりません。手順4.「フォルダ内のファイルを整理する」で消したCSSのファイルは下記でハイライトされている行に記載されています。style-check.cssの行のみです。これを行ごと消しましょう。
<!-- style -->
<item media-type="text/css" id="book-style" href="style/book-style.css" />
<item media-type="text/css" id="style-reset" href="style/style-reset.css" />
<item media-type="text/css" id="style-standard" href="style/style-standard.css" />
<item media-type="text/css" id="style-advance" href="style/style-advance.css" />
<item media-type="text/css" id="style-check" href="style/style-check.css" />
消すとこうなります。
<!-- style -->
<item media-type="text/css" id="book-style" href="style/book-style.css" />
<item media-type="text/css" id="style-reset" href="style/style-reset.css" />
<item media-type="text/css" id="style-standard" href="style/style-standard.css" />
<item media-type="text/css" id="style-advance" href="style/style-advance.css" />
次は<!-- style -->のすぐ下にある<!-- image -->。ここには画像が記載されています。手順4.「フォルダ内のファイルを整理する」で削除した画像のファイルに合わせてリストを消していきます。使用している画像はcover.jpgのみですので、それ以外は消します。
<!-- image -->
<item media-type="image/jpeg" id="cover" href="image/cover.jpg" properties="cover-image" />
<item media-type="image/jpeg" id="img-001" href="image/img-001.jpg" />
<item media-type="image/jpeg" id="img-002" href="image/img-002.jpg" />
<item media-type="image/jpeg" id="credit" href="image/original_credit.jpg" />
<item media-type="image/png" id="cid08705" href="image/cid-08705.png" />
<item media-type="image/png" id="cid13706" href="image/cid-13706.png" />
消すとこうなります。
<!-- image -->
<item media-type="image/jpeg" id="cover" href="image/cover.jpg" properties="cover-image" />
次は<!-- image -->のすぐ下にある<!-- xhtml -->。ここにはコンテンツが記載されています。手順4.「フォルダ内のファイルを整理する」で削除したxhtmlファイルに合わせてリストを消していきます。使用している画像は
p-002.xhtml
p-cover.xhtml
p-titlepage.xhtml
ですので、それ以外は消します。
<!-- xhtml -->
<item media-type="application/xhtml+xml" id="p-cover" href="xhtml/p-cover.xhtml" />
<item media-type="application/xhtml+xml" id="p-titlepage" href="xhtml/p-titlepage.xhtml" />
<item media-type="application/xhtml+xml" id="p-caution" href="xhtml/p-caution.xhtml" />
<item media-type="application/xhtml+xml" id="p-toc" href="xhtml/p-toc.xhtml" />
<item media-type="application/xhtml+xml" id="p-001" href="xhtml/p-001.xhtml" />
<item media-type="application/xhtml+xml" id="p-002" href="xhtml/p-002.xhtml" />
<item media-type="application/xhtml+xml" id="p-003" href="xhtml/p-003.xhtml" />
<item media-type="application/xhtml+xml" id="p-004" href="xhtml/p-004.xhtml" />
<item media-type="application/xhtml+xml" id="p-005" href="xhtml/p-005.xhtml" />
<item media-type="application/xhtml+xml" id="p-006" href="xhtml/p-006.xhtml" />
<item media-type="application/xhtml+xml" id="p-credit" href="xhtml/p-credit.xhtml" />
消すとこうなります。これでリスト(manifest)は終了です。
<!-- xhtml -->
<item media-type="application/xhtml+xml" id="p-cover" href="xhtml/p-cover.xhtml" />
<item media-type="application/xhtml+xml" id="p-002" href="xhtml/p-002.xhtml" />
次は</manifest>のすぐ下にある<spine page-progression-direction="rtl">を修正します。spineはファイルの順番を司ります。もし順番を間違えると本文のあとに表紙画像がくるといった悲しいことになります。
<spine page-progression-direction="rtl">の内容です。この中で今回使用しているファイルは表紙(p-cover)とコンテンツ(p-002)の二つです。それ以外は消します。消す行をハイライトしています。
<spine page-progression-direction="rtl">
<itemref linear="yes" idref="p-cover" properties="page-spread-left" />
<itemref linear="yes" idref="p-titlepage" properties="page-spread-left" />
<itemref linear="yes" idref="p-caution" properties="page-spread-left" />
<itemref linear="yes" idref="p-toc" properties="page-spread-left" />
<itemref linear="yes" idref="p-001" properties="page-spread-left" />
<itemref linear="yes" idref="p-002" properties="page-spread-left" />
<itemref linear="yes" idref="p-003" properties="page-spread-left" />
<itemref linear="yes" idref="p-004" properties="page-spread-left" />
<itemref linear="yes" idref="p-005" properties="page-spread-left" />
<itemref linear="yes" idref="p-006" properties="page-spread-left" />
<itemref linear="yes" idref="p-credit" properties="page-spread-left" />
</spine>
消すとこうなります。これでspineは終了です。
繰り返しになりますが、spineは表示の順番を司りますのでp-coverとp-002を入れ替えると、電子書籍として読むときに表紙がコンテンツのうしろに表示されてしまいます。
<spine page-progression-direction="rtl">
<itemref linear="yes" idref="p-cover" properties="page-spread-left" />
<itemref linear="yes" idref="p-002" properties="page-spread-left" />
</spine>
これで手順6.OPFへのアイテムを定義するも終わりました、EPUB制作の作業はほぼ終わりです。あとは手順7.EPUBにパッケージにするだけです。
知識はいらない、3時間でつくる縦書きEPUB3の趣旨
ツールや材料を準備します。
準備したコンテンツ(原稿)のデータを電子書籍のフォーマットに落とし込みます。
書籍のイメージに合った表紙画像を作ります。
いらないファイルを削除したり、名前を変更したりフォルダ内を整理します。
書籍の目次を作ります。
書籍のデータ、その並び順や表紙画像など使用しているものを定義していきます。
これまでに準備・作成したファイルをパッケージします。これでEPUBができあがります。
iBooksで電子書籍を楽しみましょう。
コミック、写真集などの画像集や、縦書きリフロータイプの電子書籍データが以下のページでつくれます。