<!--You could copy and paste the entire front-end of this little book into your document--say, from the <html> tag to the chapter-one anchor tag--then delete the header styles you don't need. (Or modify them.) Or just take bits and pieces. Save as html and open in a browser to check it out.-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTML TITLE GOES HERE</title>
<style type="text/css">
p.body
{margin:0%;
text-indent:1.2em;}
<!--You could delete the ".body" part of the first style to turn all paragraphs into body style (indented). Then you just need to apply "start" style to the first paragraphs of new chapters and sections.-->
p.start
{margin:0%;
margin-top:5%;
text-indent:0em;}
h1.title
{margin-top:18%;
margin-bottom:6%;
text-align:center;}
h4.by
{margin-top:7%;
margin-bottom:10%;
text-align:center;}
h2.author
{margin-top:10%;
margin-bottom:0%;
text-align:center;}
.break
{page-break-after:always;}
.center
{text-align:center;}
</style>
</head>
<body>
<div id="title_page"></div>
<h1 class="title">A SHORT BOOK</h1>
<h4 class="by">by</h4>
<h2 class="author">A. Writer</h2>
<!--I recommend using an image for the title page, not header styles. If you use an image, you can remove the header styles from the style section above. Search below for the section called "code for inserting full page images" to see how to insert an image.-->
<div class="break"></div>
<div id="copyright"></div>
<hr />
<p class="start">Copyright © 20XX Your Name</p>
<p class="start">All rights reserved. This book or any portion thereof may not be reproduced or used in any manner whatsoever without the express written permission of the publisher except for the use of brief quotations in a book review.</p>
<hr />
<!--The horizontal rules (hr) are of course optional.-->
<div class="break"></div>
<div id="chap_1"></div>
<p class="center">1</p>
<hr />
<h1 class="title">A GOOD PLACE TO BEGIN</h1>
<p class="start">This is where your story takes off. Use as much of the above code as you can. I suggest you keep the whole thing in your Kindle Making Kit, along with a shortened, customized version for starting new books. In the area below I'm going to put copies of code used in the various chapters of KINDLE CREATION FOR CONTROL FREAKS.</p>
<!--code from Chap 4: use Punctuation Swap Grid--it's in the Template stack on the right-hand sidebar of my blog-->
<!--code from Chap 5-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<style type="text/css">
p.body
{margin:0%;
text-indent:1.2em;}
p.start
{margin:0%;
margin-top:5%;
text-indent:0em;}
</style>
<p style="font-size:150%;">Go figure.</p>
<!--avoid use of in-line style!-->
<!--code for turning all paragraphs <p> into indented paragraphs-->
p
{margin:0in;
text-indent:1.2em;}
<!--codes for attributes that can be used lots of places and you can put more than one inside the quotes-->
.center
{text-align:center;}
.bold
{font-weight:bold;}
.italic
{font-style:italic;}
.bi
{font-weight:bold;
font-style:italic;}
<p>This is the <span class="bi">crucial part</span> of the sentence.</p>
<!--codes for a "book-like" section breaks-->
<p class="center">. . .</p>
<p class="center">*</p>
<p class="center">§</p>
<!--code for inserting ID points or anchors-->
<div id="chap_1"></div>
<div id="title_page"></div>
<!--codes for separating parts of a hand made title page-->
<p> </p>
<div><br /></div>
<!--for title page by header code, see the top of this page-->
<!--code for adding page breaks-->
.break
{page-break-after:always;}
<div class="break"></div>
<!--alternate versions of page break code-->
page-break-before:always
page-break-inside:avoid
<!--header code for chapter titles-->
<h1 class="title">Chapter 1</h1>
<!--code for copyright ID and text-->
<div id="copyright"></div>
<p class="start">Copyright © 20XX Your Name</p>
<p class="start">All rights reserved</p>
<p class="start">Copyright © 20XX Your Name</p>
<p class="start">All rights reserved. This book or any portion thereof may not be reproduced or used in any manner whatsoever without the express written permission of the publisher except for the use of brief quotations in a book review.</p>
<!--style for front matter-->
p.front
{margin-top:2%;
margin-bottom:2%;
text-indent:0em;
font-size:75%;}
<!--code from Chap 6-->
<!--one way to start a chapter-->
<p class="start"><b><big><big>T</big></big>he first few words</b> of the sentence[etc]</p>
<!--code for font sizes-->
span.small
{font-size:small;}
<p class="start"><span class="small">WE’VE GOT SMALL CAPS</span> for the first few [etc]</p>
<p class="start"><b><big><big>T</big></big>he first few words</b> of the sentence[etc]</p>
span.large
{font-size:large;}
span.x-large
{font-size:x-large;}
<p class="start"><span class="large">T</span>he first few words</b>[etc]</p>
<!--drop cap code, split between kf8 and mobi--though it is unnecessary to split code if font-size is 200% or above-->
@media amzn-kf8
{span.dropcaps
{font-weight:bold;
font-size:320%;
float:left;
padding-right:.1em;
margin-top:-0.35em;
margin-bottom:-0.35em;}
}
@media amzn-mobi
{span.dropcaps
{font-size:2em;
font-weight:bold;}
}
<p class="start"><b><span class="dropcaps">T</span>his particular morning</b>, ten-year-old Trevor Blake [etc]</p>
<!--code for "bigcaps": non-dropping drop caps; use split code for mobi if font-size goes below 200%-->
span.bigcaps
{font-weight:bold;
font-size:200%;
float:left;
padding-right:0.04em;
margin-top:-0.58em;
margin-bottom:-0.75em;}
<!--code from Chap 7-->
<!--code for inserting full page images-->
img.wide
{width:100%;}
<p class="center"><img class="wide" src="title_page.gif" alt="title page" /></p>
<!--code for sizing mobi files that need some help-->
<p class="center"><img class="wide" src="title_page.gif" width="525" height="645" alt="title page" /></p>
<!--code for inserting the "invisible" square needed to get kf8 apps to recognize a margin-top instruction-->
<p class="center"><img src="spacer.gif" width=".1" height="2" alt="spacer" /></p>
<!--code from Chap 9-->
<!--code for inserting a chapter-start image-->
<p class="center"><img class="wide" src="cs-1.gif" alt="chapter one" /> </p>
<!--codes for using multiple images in a chapter start-->
<p class="center"><img src="msl.jpg" /><img src="1.gif" /> <img src="5.gif" /></p>
img.chap-start
{width:10%;}
<p class="center"><img class="chap-start" src="msl.gif" width="38" height="65" alt="missile" /><img class="chap-start" src="1.gif" width="25" height="60" alt="one" /><img class="chap-start" src="5.gif" width="25" height="60" alt="five" /></p>
<!--code from Chap 10-->
<!--code for inserting images of letters at the start of paragraphs-->
<p class="start"><img src="rockwell ultrabold T.gif" width="30" height="30" alt="rockwell T" /><b>his is the first sentence</b> of the rest of [etc]</p>
<!--kf8 sizing of letter images-->
img.letter
{width=12%;}
<p class="start"><img class="letter" src="rockwell ultrabold T.gif" width="30" height="30" alt="Rockwell T" /><b>his is the first sentence</b> of the rest of [etc]</p>
<!--drop images in kf8-->
img.drop
{float:left;
margin:10px 8px 0px 0px;}
<img class="drop" src="rockwell ultrabold T.gif" width="12%" /><b>his particular morning</b>, ten-year-old [etc.]
img.drop
{float:left;
border:12px ridge yellow;
margin:10px 8px 0px 0px;}
img.drop
{width:12%;
float:left;
border:12px double blue;
margin:10px 8px 0px 0px;}
<!--margin specs go: top, right, bottom, left-->
<!--code for sizing drop images in both kf8 and mobi-->
<img class="drop" src="rockwell ultrabold T.gif" width="32" height="32" /><b>his particular morning</b>, ten-year-old [etc.]
<!--code from Chap 12-->
<item id="stylesheet" href="style.css" media-type="text/css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<!--code from Chap 13-->
<!--format for internal links-->
<a href="#gallery">Photo Gallery</a>
<!--code from the Mystery Bonus Chapter is in a separate template called ePub-->
<!--code used to create Kindle Creation for Control Freaks-->
h2.chap
{text-align:center;
margin-top:80px;
margin-bottom:55px;}
p.section
{margin:0in;
text-indent:0em;
font-weight:bold;
text-align:left;
margin-top:30px;
margin-bottom:20px;}
p.line
{margin-left:2.8em;
margin-top:8px;
margin-bottom:8px;
text-indent:0em;
font-weight:bold;
font-size:75%;}
p.body
{margin:0in;
margin-top:14px;
margin-bottom:14px;
text-indent:0em;}
p.front
{margin-top:8px;
margin-bottom:8px;
text-indent:0em;
font-size:75%;}
p.list
{margin-top:14px;
margin-bottom:14px;
margin-left:1em;}
.part
{margin-top:20px;
margin-bottom:0px;}
<!--end of miscellaneous code-->
</body>
</html>
No comments:
Post a Comment
Comments are welcome -- and moderated by me. Please be patient.