From 1e08bf205ce7cb0c875c93eabea1f430061e33df Mon Sep 17 00:00:00 2001 From: Yuto Hayamizu Date: Tue, 4 Sep 2012 23:18:50 +0900 Subject: [PATCH] Add a stylesheet and a Makefile rule for EPUB generation --- doc/src/sgml/Makefile | 11 +- doc/src/sgml/stylesheet-epub.xsl | 1682 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1692 insertions(+), 1 deletions(-) create mode 100644 doc/src/sgml/stylesheet-epub.xsl diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 5c3afad..f2aa214 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -267,7 +267,6 @@ htmlhelp: stylesheet-hh.xsl postgres.xml %-US.fo: stylesheet-fo.xsl %.xml $(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $^ - ## ## Experimental Texinfo targets ## @@ -287,6 +286,16 @@ MAKEINFO = makeinfo ## +## Generating Epub +## + +postgres.epub: stylesheet-epub.xsl postgres.xml + $(XSLTPROC) $(XSLTPROCFLAGS) $^ + echo "application/epub+zip" > mimetype + zip -0Xq $@ mimetype + zip -Xr9D $@ OEBPS META-INF + +## ## Check ## diff --git a/doc/src/sgml/stylesheet-epub.xsl b/doc/src/sgml/stylesheet-epub.xsl new file mode 100644 index 0000000..8aa938c --- /dev/null +++ b/doc/src/sgml/stylesheet-epub.xsl @@ -0,0 +1,1682 @@ + + + + + + + + 1 + 2 + + book toc,title + + + + + + + + + + + + + + + + + + + ncxtoc + htmltoc + + + + + + + + + .png + + + + + + + + + + + + + + + + 1 + + + 1 + + + 1 + + + 0 + + + + + + + + + + + + + + + + + + Note + + + namesp. cut + + + stripped namespace before processing + + + + + + + Note + + + namesp. cut + + + processing stripped document + + + + + + + + + + + ID ' + + ' not found in document. + + + + + + + + + Formatting from + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0 + + + + + + + + + urn: + + : + + + + + urn:isbn: + + + + urn:issn: + + + + + + + + + + + + + + + + + + + + + + cover + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0 + + + + + + + application/oebps-package+xml + + + + + + + + + + + + + + + + + + + + + + + + + 2005-1 + + + + + + cover + + + + + + + + dtb:uid + + isbn: + + + + + + + + + dtb:depth + -1 + + + dtb:totalPageCount + 0 + + + dtb:maxPageNumber + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + © + + + + + + + + + + + + + + + + cover + Cover + + + + + + + + + + + toc + Table of Contents + + + + + + + + + + + + + + + + + + + + + + yes + + no + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + application/x-dtbncx+xml + + + + + + + application/xhtml+xml + + + + + + + + + + + text/css + css + + + + + + + + + + + application/xhtml+xml + + + + + + epub.embedded.font + + + + font/opentype + + + + WARNING: OpenType fonts should be supplied! ( + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/gif + + + image/gif + + + image/png + + + image/png + + + image/jpeg + + + image/jpeg + + + image/jpeg + + + image/jpeg + + + image/svg+xml + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + WARNING: mediaobjectco almost certainly will not render as expected in .epub! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + application/xhtml+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (missing alt) + + + + + + + + + + + + + + text-align: + + middle + + + + + + + + + + + + + + + + + + + + + + 1 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + 1 + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No insertfile extension available. + + + + + + + + No insertfile extension available. Use a different processor (with extensions) or turn on $use.extensions and $textinsert.extension (see docs for more). + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cover + + text/css + + img { max-width: 100%; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -toc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + clear: both + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + + + 1 + 2 + 3 + 4 + 5 + + + + + + + + + + + + + + + + + + + + + + + + 6 + 5 + 4 + 3 + 2 + 1 + + + + + title + + + + + + + + + + + + + -- 1.7.5.4