Permalink
Browse files

Merge pull request #1 from gavrie/master

Adaptation to Kindle format
  • Loading branch information...
2 parents 5742953 + fd43c59 commit 58ae231d3e1f6039706a91a83b26dcbb8b9eb8ec @sarabander committed Nov 21, 2011
Showing with 32 additions and 3 deletions.
  1. +6 −1 README
  2. +3 −0 src/sicp.texi
  3. +23 −2 src/texinfo.tex
View
7 README
@@ -4,4 +4,9 @@ Typography and layout are improved for better on-screen legibility.
It is based on Neil Van Dyke's Texinfo version: http://www.neilvandyke.org/sicp-texi/
-Official SICP page with HTML version: http://mitpress.mit.edu/sicp/
+Official SICP page with HTML version: http://mitpress.mit.edu/sicp/
+
+Adapted to Kindle format by Gavrie Philipson:
+* Page size matches the 600*800 screen aspect ratio of the Kindle
+* Page numbers have been removed
+* Size of text is larger and closer to standard Kindle ebooks
View
@@ -1,5 +1,6 @@
\input texinfo
@input utopia
+@kindle
@comment **********************************************************
@setfilename sicp
@settitle Structure and Interpretation of Computer Programs, 2e
@@ -132,6 +133,8 @@ based on @url{http://www.neilvandyke.org/sicp-texi/, 2.neilvandyke4} (January 10
@end titlepage
@everyheading @| @| @thispage
+@headingsoff
+
@c to suppress the black boxes after overfull lines:
@finalout
View
@@ -253,7 +253,7 @@
\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
\newdimen\cornerlong \cornerlong=1pc
\newdimen\cornerthick \cornerthick=.3pt
-\newdimen\topandbottommargin \topandbottommargin=.75in
+\newdimen\topandbottommargin \topandbottommargin=0in
% Output a mark which sets \thischapter, \thissection and \thiscolor.
% We dump everything together because we only have one kind of mark.
@@ -754,7 +754,8 @@
% @endpage starts a new page without restarting footnote counter from zero % new def added by A.R
%
-\def\endpage{\par\vfill\par\penalty -20000}
+%\def\endpage{\par\vfill\par\penalty -20000}
+\def\endpage{}
% @exdent text....
% outputs text on separate line in roman font, starting at standard page margin
@@ -9184,6 +9185,26 @@
{11.5in}{8.8in}%
}}
+% Use @kindle for Kindle formatting (based on smallbook)
+\def\kindle{{\globaldefs = 1
+ \parskip = 2pt plus 1pt
+ \textleading = 20pt
+ %
+ % Parameters in order: 1) textheight; 2) textwidth;
+ % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+ % 7) physical page height; 8) physical page width.
+ \internalpagesizes{7.5in}{5.5in}%
+ {-0.75in}{-0.75in}%
+ {0pt}{0pt}%
+ {8in}{6in}%
+ %
+ \lispnarrowing = 0.3in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .5cm
+}}
+
% Use @smallbook to reset parameters for 7x9.25 trim size.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt

0 comments on commit 58ae231

Please sign in to comment.