Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 07-04-2009, 08:18 AM   #1
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 14,910
Karma: 13495654
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Using the width attribute

I have been following the thread on The Complete Guide to Formatting Books for the Amazon Kindle by Joshua Tallent. He said that he had come up with a method of formatting poetry.

HarryT commented that he used the width attribute for that purpose. This caught my attention. I suspect that both use the same method.

I have tried using the width attribute and it has never worked for me.

Example:
<p width="-15">... <div width="-15">...

I am obviously doing something wrong but haven't isolated my problem.

Can someone point me in the right direction?

Thanks,
Charlie
crutledge is offline   Reply With Quote
Old 07-04-2009, 09:00 AM   #2
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,374
Karma: 3161371
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
I just checked, and I'm using it the same way:

<p width="-20">

If you're checking your work in a browser, it won't show. The width attribute is nonstandard.
Nate the great is offline   Reply With Quote
 
Enthusiast
Old 07-04-2009, 09:14 AM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,764
Karma: 40390405
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Yes, it only shows up in the finished Mobi book. I generally use 1em for each "level" of indentation. That looks right to me, although others may of course feel otherwise.

I'm not using negative (hanging) indents, but positive ones. Eg, picking a little verse at random:

Code:
Mary had a little lamb
    its fleece was white as snow.
And everywhere that Mary went
    the lamb was sure to go.
Then I'd do that in a Mobi book like this:


Code:
<div>Mary had a little lamb,</div>
<div width="1em">its fleece was white as snow.</div>
<div>And everywhere that Mary went,</div>
<div width="1em">the lamb was sure to go.,</div>
and that will indent the 2nd and 4th lines by an amount which looks good to me. In a web browser, however, you won't see the indents.
HarryT is online now   Reply With Quote
Old 07-04-2009, 09:17 AM   #4
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 14,910
Karma: 13495654
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Nate,
Thank you very much. The browser is the way I test everything. Know of a good non-standard browser?
Charlie
crutledge is offline   Reply With Quote
Old 07-04-2009, 06:30 PM   #5
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,374
Karma: 3161371
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
I finally had time today to experiment, and I found a better way to do the hanging indent. Here is an example that works with MobiCreator and uses standards compliant attributes:

<style type="text/css">
p.hanging {
margin-left:00;
text-indent:-20;
}
</style>

This code fragment is supposed to go in the file header (between the head tags). I stronly urge you to use it instead of the width attribute.

P.S. It works in a browser, too.
Nate the great is offline   Reply With Quote
Old 07-05-2009, 12:21 PM   #6
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 14,910
Karma: 13495654
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Nate,
This way looks great. This will force me to learn style sheets as I've really had no need for them before. I assume that the code can be named and used as a Class attribute for <p> and <div>. By adjusting margin-left and text-indent, lines of poetry could be indented to various levels and any word wrap will be correct.

You, sir, are an HTML expert.
Charlie

P.S. It beats the heck out of the poetry method in the book!!!

Last edited by crutledge; 07-05-2009 at 12:24 PM.
crutledge is offline   Reply With Quote
Old 07-05-2009, 12:43 PM   #7
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,374
Karma: 3161371
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
If you look over in the Advanced Ebook Formatting Tips thread, it turns out I was wrong about margin-left. It's ignored by MobiCreator. I'd still leave it in just in case you use the same source files to make another format which can use it.
Nate the great is offline   Reply With Quote
Old 07-06-2009, 04:44 AM   #8
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 2,241
Karma: 3868686
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
Quote:
Originally Posted by Nate the great View Post
If you look over in the Advanced Ebook Formatting Tips thread, it turns out I was wrong about margin-left. It's ignored by MobiCreator. I'd still leave it in just in case you use the same source files to make another format which can use it.
Can I ask if I may whether you have tried the same document in Calibre? I know that there are some differences in the way that Mobipocket Creator and Calibre deal with HTML, and one of my ambitions is to be able to collect a list of the differences.

Unless we check things like this we won't know whether the problems lie with Mobipocket as a format, or with Mobipocket Creator.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 07-06-2009, 05:10 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,764
Karma: 40390405
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
All you can do in a Mobi book is to set "global" margins for the entire book:

http://www.mobipocket.com/dev/articl...le=margins.htm

You cannot vary the margins for specific parts of the book.

Last edited by HarryT; 07-06-2009 at 05:13 AM.
HarryT is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Width kobo2010 Kobo Reader 4 05-10-2010 08:14 PM
How to apply fixed-width fonts EnergyLens Calibre 5 04-17-2010 12:41 PM
Error parsing attribute name? seagull Calibre 1 01-01-2010 11:30 AM
Attribute error? jusmee Calibre 2 12-15-2009 08:22 PM
Qs about the objid attribute DanielCoffey LRF 1 06-29-2009 07:12 AM


All times are GMT -4. The time now is 05:39 AM.


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