Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2011, 05:53 AM   #16
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
The reason you're having a problem is you don't have a margin-top specified on the p selector, so the default margin is what's being used, which is larger than .2em. If you were doing a conversion the look and feel options I mentioned before would fix this, but I suspect that you didn't actually attempt to convert the document to mobi/ePub...

Try this:
Spoiler:
Code:
<html>
<head>
<style type="text/css">
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dd, dt, p, pre, table, th, td, tr, {margin: 0; padding: 0em; }
p {
	text-indent: 1.5em;
	margin-bottom: 0.2em;
	margin-top:0.2em;
}
p.chapter
{
text-indent: 1.5em;
font-weight: bold;
font-size: 2em;
page-break-before: always;
margin-top: 5em;
margin-bottom: 2em;
}
p.centered

{
text-indent: 0em;

text-align: center;

}

span.centered

{

text-indent: 0em;
text-align: center;

}
p.title
{
text-indent: 0em;
text-align: center;
font-weight: bold;
font-size: 4em;
page-break-before: always;
margin-top: 5em;
margin-bottom: 2em;
}
p.author
{
text-indent: 0em;
text-align: center;
font-weight: bold;
font-size: 3em;
margin-top: 0em;
margin-bottom: 2em;
}
</style>
</head>
<body>
<p class="title">The Boyne Walk</p>
	<p class="author">by FR Higgins</p>
<p class="chapter">More lake than river</p>
<p>Only last week, walking the hushed fields of our most lovely Meath, now thinned by November, I came to where the road from Laracor leads to the Boyne river&mdash;that seems more lake than river&mdash;stretched in uneasy light and stript of reeds. And walking alongside an old weir of my people&rsquo;s, where nothing stirs&mdash;only the shadowed leaden flight of a heron up the lean air&mdash;I went unmanly with grief, knowing how my father, happy though captive in years, walked last with me there.</p>
<p class="chapter">Heart breaks</p>
<p>Yes, happy in Meath with me for a day he walked, taking stock of herds hid in their own breathing; and naming colts, gusty as wind, once steered by his hand, lightnings winked in the eyes that were half shy in greeting old friends&mdash;the wild blades, when he gallivanted the land.</p>
<p>For that proud, wayward man now my heart breaks&mdash;breaks for that man whose mind was a secret eyrie, whose kind hand was sole signet of his race, who curbed me, scorned my green ways yet increasingly loved me till Death drew its grey blind down his face.</p>
<p>And yet I am pleased that even my reckless ways are living shades of his rich calms and passions&mdash;witnesses for him and for those faint namesakes with whom now he is one, under yew branches, yes, one in a graven silence no bird breaks.</p></body>
</body></html>


The new line is margin-top:0.2em;
ldolse is offline   Reply With Quote
Old 08-05-2011, 07:44 AM   #17
Tearin de Hairou
Junior Member
Tearin de Hairou began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Aug 2011
Device: Kindle
Quote:
Originally Posted by ldolse View Post
...but I suspect that you didn't actually attempt to convert the document to mobi/ePub...

(code snipped)

The new line is margin-top:0.2em;
Idolse, thank you for your help. Bear with me a little; although I did use html a little in the mid-1990s, I'm in effect learning it anew.

Your suspicion that I didn't actually attempt to convert the document to .mobi is incorrect; I spent a day of bloody sweat doing it over and over and over and over and over and over and over and over and over again yesterday (I've left off a few 'overs' there).

I finally got it working (well enough for a beginning - it was showing a title page with an author, a contents list, and chapters sized up more or less correctly) by pasting in this code from another document that was working (also well enough for a beginning):

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<style type="text/css">
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dd, dt, p, pre, table, th, td, tr, {margin: 0; padding: 0em; }
p
{
	text-indent: 1.5em;
	margin-bottom: 0em;
	line-height: inherit;
}
p.chapter
{
text-indent: 1.5em;
font-weight: bold;
font-size: 2em;
page-break-before: always;
margin-top: 5em;
margin-bottom: 2em;
}
p.centered
{
text-indent: 0em;
text-align: center;
}
p.title
{
	text-indent: 0em;
	text-align: center;
	font-weight: bold;
	font-size: 4em;
	page-break-before: always;
	margin-top: 5em;
	margin-bottom: 2em;
}
p.author
{
	text-indent: 0em;
	text-align: center;
	font-weight: bold;
	font-size: 3em;
	margin-top: 0em;
	margin-bottom: 2em;
}
</style>
</head>
<body>
	<p class="title">Onward to Mehico</p>
	<p class="author">by XX Ejico</p>
<p class="chapter">Burning questions</p>
<p>THE FOLLOWING DAY a call was put through to Seamus&lsquo; desk. &ldquo;Is that Seamus Murphy?&rdquo;</p>
<p>&ldquo;This is DI Jordan. Who&lsquo;s speaking?&rdquo;</p>
</p></body>
As you see, this doesn't have a 'margin-top' line either, but it works when converted to a .mobi.

The first set of styles looked fine when opened in a web page, but showed the title and chapter as the same size as the rest of the text when converted to .mobi using Calibre.

Thank you for the tip about the margin-top line; I'll put that in anyway - but it doesn't seem to be the total cause of this particular problem.

Thank you for your patient help.
Tearin de Hairou is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Contents taraboom11 Sigil 20 04-30-2011 11:18 AM
Using Table of Contents sammieb77 enTourage Archive 7 01-14-2011 08:01 PM
Table of Contents ucoa Calibre 1 01-07-2011 09:01 PM
How to make a PDF table of contents work in epub ajbrutico Calibre 3 09-26-2010 09:31 AM
Help with my Table of Contents Skylinefranc Calibre 0 03-19-2010 12:55 AM


All times are GMT -4. The time now is 08:46 PM.


MobileRead.com is a privately owned, operated and funded community.