Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

Commit

Permalink
Added Kindle details (mobi7 + KF8)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayPanoz committed Mar 26, 2016
1 parent b2f7190 commit 61bcd44
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 3 deletions.
15 changes: 15 additions & 0 deletions ReadingSystems/Kindle/KF8/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# KF8

Easy one. We’ve got some kind of “ePub 2.5” format there, with very few alterations and undocumented support of `-webkit-` prefixed properties as a bonus.

Now, there is one important thing which is worth reporting…

**If part of a CSS declaration (prop OR value) is not supported, the whole is erased.**

In other words, should have Amazon added support for say `max-width` at any time in the life of KF8, the declaration would still have been **missing in your converted CSS.** Same for value `inherit`, etc.

If I’m usually trying to stay objective—and that's obviously not easy—, this small detail speaks volumes to me. It feels like their whole ~~system~~ ~~mess~~ gas-works isn’t even future-proof.

“Need update? Create format.”

Also, KindleGen doesn’t know how to parse `<header>`.
100 changes: 100 additions & 0 deletions ReadingSystems/Kindle/mobi7/example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<guide>
<reference title="Page de titre" type="title-page" filepos=0000000172 />
<reference title="Texte" type="text" filepos=0000000523 />
</guide>
</head>
<body>
<a id="filepos172" />
<div >
<div >
<h1 height="2em" width="0" align="center"><font size="+1">SPACE9</font></h1>
<div height="25%"></div>
</div>
<div >
<p height="2em" width="0" align="center">John Doe</p>
</div>
<div >
<p height="2em" width="0" align="center">
<a href="#filepos172" ><font color="#666">Les éditeurs associés</font></a></p> </div> </div>
<mbp:pagebreak/>
<a id="filepos523" />
<h1 width="0"><font size="4"><b>La typographie comme voix</b></font></h1>
<div height="5em"></div>
<p width="5%">Lorem ipsum dolor sit amet, cœnsectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed <small><font size="-1">nisi</font></small>. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc.</p>
<p width="5%">Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Sed dignissim lacinia nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<p width="5%">Nam nec ante. Sed lacinia, urna non tincidunt mattis, tortor neque adipiscing diam, a cursus ipsum ante quis turpis. Nulla facilisi. Ut fringilla. Suspendisse potenti. Nunc feugiat mi a tellus consequat imperdiet. Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna.</p>
<a id="filepos2051" />
<h2 height="3em" width="0"><font size="4"><b>Qui impose le rythme, explicite</b></font></h2>
<div height="2em"></div>
<p width="5%">Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morfi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. <i>Proin quam</i>. Integer lacinia sollicitudin massa. Cras metus.</p>
<p width="5%">Sed aliquet risus a tortor. Integer id quam. Morbi mi. <i>Sed non quam</i>. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. Sed pretium blandit orci. <i>Sed non quam</i>. Ut eu diam at pede suscipit sodales. Aenean lectus elit, fermentum non, convallis id, sagittis at, neque. Nullam mauris orci, aliquet et, iaculis et, viverra vitae, ligula. Nulla ut felis in purus aliquam imperdiet.</p>
<div height="2em"></div>
<blockquote width="0" align="right">
<blockquote width="0">
<p width="5%">Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. <cite>— John Doe</cite></p>
</blockquote>
</blockquote>
<div height="2em"></div>
<p width="5%">Maecenas aliquet mollis lectus. Vivamus consectetuer risus et tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla.</p>
<a id="filepos4095" />
<h3 height="2em" width="0"><font size="4"><b>La pensée en mouvement</b></font></h3>
<p width="5%">Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. <i>Proin quam</i>. Integer lacinia sollicitudin massa. Cras metus.</p>
<div height="2em" width="0" align="center"><img alt="" src="Images/image00012.jpeg"/></div>
<div height="2em"></div>
<p width="5%">Sed aliquet risus a tortor. Integer id quam. Morbi mi. <i>Sed non quam</i>. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. Sed pretium blandit orci. <i>Sed non quam</i>. Ut eu diam at pede suscipit sodales. Aenean lectus elit, fermentum non, convallis id, sagittis at, neque. Nullam mauris orci, aliquet et, iaculis et, viverra vitae, ligula. Nulla ut felis in purus aliquam imperdiet.</p>
<p width="5%">Maecenas aliquet mollis lectus. Vivamus consectetuer risus et tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla.</p>
<mbp:pagebreak/>
<a id="filepos5832" />
<h1 width="0"><font size="4"><b>Articuler des idées</b></font></h1>
<div height="5em"></div>
<p width="5%">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed <span >nisi</span>. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc.</p>
<p width="5%">Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Sed dignissim lacinia nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<p width="5%">Nam nec ante. Sed lacinia, urna non tincidunt mattis, tortor neque adipiscing diam, a cursus ipsum ante quis turpis. Nulla facilisi. Ut fringilla. Suspendisse potenti. Nunc feugiat mi a tellus consequat imperdiet. Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna.</p>
<a id="filepos7330" />
<h2 height="3em" width="0"><font size="4"><b>Autour d’un discours</b></font></h2>
<div height="2em"></div>
<p width="5%">Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. <i>Proin quam</i>. Integer lacinia sollicitudin massa. Cras metus.</p>
<p width="5%">Sed aliquet risus a tortor. Integer id quam. Morbi mi. <i>Sed non quam</i>. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. Sed pretium blandit orci. <i>Sed non quam</i>. Ut eu diam at pede suscipit sodales. Aenean lectus elit, fermentum non, convallis id, sagittis at, neque. Nullam mauris orci, aliquet et, iaculis et, viverra vitae, ligula. Nulla ut felis in purus aliquam imperdiet.</p>
<div height="2em" width="0" align="center"><img alt="test alt text" height="266" src="Images/image00012.jpeg" width="425"/></div>
<div height="2em"></div>
<p width="5%">Maecenas aliquet mollis lectus. Vivamus consectetuer risus et tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla.</p>
<a id="filepos9111" />
<h3 height="2em" width="0"><font size="4"><b>Clair et concis</b></font></h3>
<p width="5%">Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. <i>Proin quam</i>. Integer lacinia sollicitudin massa. Cras metus.</p>
<ul>
<li>Praesent blandit dolor</li>
<li>Sed non quam</li>
<li>Cras metus</li>
</ul>
<p width="5%">Sed aliquet risus a tortor. Integer id quam. Morbi mi. <i>Sed non quam</i>. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. Sed pretium blandit orci. <i>Sed non quam</i>. Ut eu diam at pede suscipit sodales. Aenean lectus elit, fermentum non, convallis id, sagittis at, neque. Nullam mauris orci, aliquet et, iaculis et, viverra vitae, ligula. Nulla ut felis in purus aliquam imperdiet.</p>
<div height="2em"></div>
<table border="0">
<tr>
<th>Entry Header 1</th>
<th>Entry Header 2</th>
<th>Entry Header 3</th>
</tr>
<tr>
<td>Entry First Line 1</td>
<td>Entry First Line 2</td>
<td>Entry First Line 3</td>
</tr>
<tr>
<td>Entry Line 1</td>
<td>Entry Line 2</td>
<td>Entry Line 3</td>
</tr>
<tr>
<td>Entry Last Line 1</td>
<td>Entry Last Line 2</td>
<td>Entry Last Line 3</td>
</tr>
</table>
<div height="2em"></div>
<p width="5%">Maecenas aliquet mollis lectus. Vivamus consectetuer risus et tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla.</p>
<mbp:pagebreak/>
</body>
</html>
40 changes: 37 additions & 3 deletions ReadingSystems/Kindle/mobi7/mobi7.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
Legacy Mobi (v6 + v7)
Consistent with an unstyled document
rendered in Kindle Previewer 2.94.
rendered in Kindle Previewer 2.94.
For a sorta CSS reference,
see https://www.w3.org/TR/REC-html32
*/

body {
Expand Down Expand Up @@ -31,7 +34,14 @@ hr {
/* At this point, the margin reset for headings, tables, blockquotes,
etc. is beyond comprehension. Why degrade vertical rhythm so much?
Or maybe they have chosen this nuclear option in order to deal with
manual paragraph jumps and margins? (cf. Word files from self-pubs) */
manual paragraph jumps and margins? (cf. Word files from self-pubs)
[UPDATE] OK, see example.html, they’re just managing margins using
attribute height (-top in element, -bottom using a div).
Example:
<h2 height="3em" width="0"><font size="4"><b>Qui impose le rythme, explicite</b></font></h2>
<div height="2em"></div>
*/

center,dd,div,dl,dt,li,ol,pre,table,ul,hr,h1,h2,h3,h4,h5,h6 {
margin-top: 0px;
Expand Down Expand Up @@ -101,4 +111,28 @@ img.widths {

img.heights {
height: auto;
}
}

/* Notes (CSS -> HTML)
for bold and italic
font-weight: bold -> <b>el</b>
font-style: italic -> <i>el</i>
for font-size
25% or 0.25em -> <font size="+1 | -1">
font-size: medium -> <font size="4">
for text-align
text-align: center -> align="center"
text-align: right -> align="right"
for text-indent
text-indent: 5%; -> width="5%"
for table
border: none -> border="0"
Misc
new XHTML file -> <mbp:pagebreak/>
*/

0 comments on commit 61bcd44

Please sign in to comment.