不见春山
骑马倚斜桥,满楼红袖招。
Home
Categories
Archives
Tags
About
Home
EPUB 格式详解
EPUB 格式详解
取消
EPUB 格式详解
由
ctaoist
发布于 2023-08-23
·
最后更新:2023-08-23
1
epub3 标准则是基于 html5、css3、svg 等 web 标准以及 mathML 等来展示内容,以 `.epub` 结尾的 zip 压缩文件。  epub3 规范使用 [OCF (open container format) 标准](https://idpf.org/epub/30/spec/epub30-ocf.html)规定的文件结构,根目录当中__必须__有一个 `mimetype` 文件和一个 `META-INF` 文件夹。其中,`mimetype` 文件中只有一个行内容 `application/epub+zip`,而 `META-INF` 中存放的则是表述整个文档的元数据。 在 META-INF 文件夹内必须有一个 `container.xml` 文件(除该文件以后,标准还定义了一些可选文件,用于处理加密、混淆字体等问题)用来描述文档内容。 ```xml <?xml version="1.0" encoding="utf-8"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container> ``` 在 epub3 标准当中,`rootfile` 的 `full-path` 所指定的 `opf 文件`,是一个 xml 文件,用于描述文档内容(默认的阅读顺序,出版物信息,作者、标题等,资源文件信息等)。`content.opf` 文件如下所示: ```xml <?xml version='1.0' encoding='utf-8'?> <package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="epubsplit-id"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"> <dc:title>论语别裁(上下册)</dc:title> <dc:creator opf:role="aut" opf:file-as="南怀瑾">南怀瑾</dc:creator> <dc:identifier id="epubsplit-id">epubsplit-uid-1692611853</dc:identifier> <dc:contributor opf:role="bkp">epubsplit</dc:contributor> <dc:rights>Copyrights as per source stories</dc:rights> <dc:description><div><p>Split from:</p> <p><em>南怀瑾国学八经典(套装共12册)(南怀瑾独家授权定本种子书,读懂国学这八本书就够了)</em></p> </div></dc:description> <dc:publisher>出版社</dc:publisher> <dc:date>2019-09-01T16:00:00+00:00</dc:date> <dc:language>zh</dc:language> <dc:identifier opf:scheme="calibre">6e3f1dae-7a91-40d8-8503-46194b111c93</dc:identifier> <meta name="calibre:title_sort" content="论语别裁(上下册)"/> <meta name="cover" content="a45"/> <meta name="output encoding" content="utf-8" /> </metadata> <manifest> <item id="a0" href="OEBPS/Text/cover.xhtml" media-type="application/xhtml+xml"/> <item id="a1" href="OEBPS/Text/part0002.xhtml" media-type="application/xhtml+xml"/> <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/> <item id="a27" href="OEBPS/Styles/style0003.css" media-type="text/css"/> <item id="a45" href="OEBPS/Images/cover.jpeg" media-type="image/jpeg"/> <item id="a42" href="OEBPS/Images/image02241.jpeg" media-type="image/jpeg"/> </manifest> <spine toc="ncx"> <itemref idref="a0" linear="yes"/> <itemref idref="a1" linear="yes"/> </spine> <guide> <reference type="cover" href="OEBPS/Text/cover.xhtml"/> </guide> </package> ``` manifest 节点则用来陈列文档的相关的资源,spine 的节点用来设置默认的阅读顺序。
杂集
该博客文章由作者通过
CC BY 4.0
进行授权。
分享
最近更新
Altera 烧写双镜像
WireGuard 搭建组网教程
聚类
N2N 搭建教程
ROS修改 MTU 和 MSS 解决上网慢和页面显示不全问题
热门标签
Tensorflow
虚拟组网
Router
ROS
VPN
Linux
机器学习
zerotier
ARM
I2C
文章目录
ROS修改 MTU 和 MSS 解决上网慢和页面显示不全问题
Quartus ii 调用 Modelsim