We have this wonderful SICP (Structure and Interpretation of Computer Programs) Ebook Project. But the epub
ebook file created is catered for colored screens. Some of the default color schemes are not great for Ebook readers. I did the following things to make the epub
version of the SICP more suitable for Ebook readers.
I am using Calibre to edit the epub
file. I am satisfied with the result. Please let me know if there is anything that should also be changed.
/* SPAN elements with the classes below are added by prettyprint. */
/* Modified for Kindle */
.pln { color: black } /* plain text */
/* Modified for Kindle */
@media screen {
.str { color: black } /* string content */
.kwd { color: black; font-weight: normal } /* a keyword */
.com { color: black; } /* a comment */
var .com, .com var { font-style: italic } /* a slanted comment */
.typ { color: black } /* a type name */
.lit { color: black } /* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun { color: black }
.opn, .clo { color: black }
.err { color: black } /* 'error' keyword (A.R) */
.tag { color: black } /* a markup tag name */
.atn { color: black } /* a markup attribute name */
.atv { color: black } /* a markup attribute value */
.dec, .var { color: black } /* a declaration; a variable name */
.fun { color: black } /* a function name */
}
html {
font-family: "Linux Libertine O", serif;
font-size: 100%; /* 100% for epub */
color: #000000; /* modified for Kindle */
line-height: 130%;
/* 'liga' turns on ligatures, 'ss06' picks alternate ampersand */
-moz-font-feature-settings: "liga" 1, "ss06";
-ms-font-feature-settings: "liga" 1, "ss06";
-webkit-font-feature-settings: "liga", "ss06";
-o-font-feature-settings: "liga", "ss06";
font-feature-settings: "liga", "ss06";
}
body {
background-color: #ffffff; /* Modified for Kindle */
margin: 0;
position: relative;
}
.chapnum {
display: inline-block;
font-weight: normal;
font-size: 6.7em;
color: black; /* Modified for Kindle */
height: 1ex;
margin-top: 0.3ex;
margin-bottom: 0.5ex;
}
.secnum {
display: inline-block;
color: #000000; /* Modified for Kindle */
margin-right: 0.8em;
vertical-align: top;
}