Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 12-06-2016, 02:56 PM   #1
AThirstyMind
A Thirsty Mind
AThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with others
 
Posts: 92
Karma: 2546
Join Date: May 2011
Location: Lubec, Maine
Device: Kindle Fire, iPad, iPhone
Style Sheet entry for a 'hanging' style

p.FlushHang, li.FlushHang, div.FlushHang
{mso-style-name:FlushHang;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
text-indent: -.25in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}

The above is what shows up when I format a line (flush left) to hang at 1.5em on the second line. Please disregard the 'in' and 'pt' designations... I edit these to 'em' before converting.

Anyway, the above style doesn't work... it indents the first line a negative 1.5em and not the second line. So how should I construct this style so it comes out:

First line flush
and Second line indented 1.5em

I thought I'd done this before with good results, but now I don't remember which book included this hanging style. This specific style is used in a glossary.

Thanks!
AThirstyMind is offline   Reply With Quote
Old 12-07-2016, 06:55 AM   #2
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
I have this information in my files. Dunno who provided it. (Hitch, perhaps. "Pesky" is her sort of word.) Hope it's useful!

Hanging indents will work in both KF6 an KF8 if you use a media
query in CSS something like:

@media amzn-kf8
{
p.hang { text-indent:-36; margin-left:36;}
}

and use the following code in the body of the HTML file:

<p class="hang" width="-36">Your text here.</p>

The negative text-indent works in CSS for Kindle 2 (and later KF6
devices) but only without the margin-left attribute. With
Amazon's latest epublishing tools this coding produces cut-off
text in KF8 (you need that pesky margin-left).
Notjohn is offline   Reply With Quote
Old 12-07-2016, 06:57 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,943
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Notjohn View Post
I have this information in my files. Dunno who provided it. (Hitch, perhaps. "Pesky" is her sort of word.) Hope it's useful!

Hanging indents will work in both KF6 an KF8 if you use a media
query in CSS something like:

@media amzn-kf8
{
p.hang { text-indent:-36; margin-left:36;}
}

and use the following code in the body of the HTML file:

<p class="hang" width="-36">Your text here.</p>

The negative text-indent works in CSS for Kindle 2 (and later KF6
devices) but only without the margin-left attribute. With
Amazon's latest epublishing tools this coding produces cut-off
text in KF8 (you need that pesky margin-left).
That's wrong. You do not need to add width=36 to the HTML. You should never add CSS code to the HTML. Put the code in CSS and use the CSS classes.
JSWolf is offline   Reply With Quote
Old 12-07-2016, 01:23 PM   #4
AThirstyMind
A Thirsty Mind
AThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with others
 
Posts: 92
Karma: 2546
Join Date: May 2011
Location: Lubec, Maine
Device: Kindle Fire, iPad, iPhone
Thanks, I wondered if perhaps the rules had changed. But I think I'll go a different way for this glossary, something simpler with maybe 0.5em between each entry instead of the 'pesky' hanging line.
AThirstyMind is offline   Reply With Quote
Old 12-09-2016, 02:02 AM   #5
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
@AThirstyMind ---

For a glossary, have you ever tried using <dl> definition list? That automatically keeps the term <dt> aligned to the left margin, and insets the definition <dd> like a hanging indent. You can set attributes for bold, italic, top and bottom margin, alignment (left, center, right, justify).

I used this for some glossaries I added to children's books, and it was SO much easier than working with a "hanging indent" as I have used in the past.

Take a look at "Oswald Bastable" or "Phantasmion" if you are interested in the css.

https://www.mobileread.com/forums/sho...ight=bastables

https://www.mobileread.com/forums/sho...ht=phantasmion
GrannyGrump is offline   Reply With Quote
Old 12-10-2016, 12:16 AM   #6
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Notjohn View Post
I have this information in my files. Dunno who provided it. (Hitch, perhaps. "Pesky" is her sort of word.) Hope it's useful!

Hanging indents will work in both KF6 an KF8 if you use a media
query in CSS something like:

@media amzn-kf8
{
p.hang { text-indent:-36; margin-left:36;}
}

and use the following code in the body of the HTML file:

<p class="hang" width="-36">Your text here.</p>

The negative text-indent works in CSS for Kindle 2 (and later KF6
devices) but only without the margin-left attribute. With
Amazon's latest epublishing tools this coding produces cut-off
text in KF8 (you need that pesky margin-left).
I agree that pesky is my kind of word, but, I never have used the KF6 appellation. (Even though it was technically correct).

I do recall that for a while--and this was a while ago--we had to do exactly what you have there, but we've never used something like -36, either. We've used ems and/or percentages for dog's years...at least since '09. So...I'm going to say that's from Charlie. (Who did use KF6 as his term.) That's my guess.

We did have to set the margin offset, because there was a problem with...hmmm...Fires? Some of the readers, if you weren't careful with the offset, would literally have that first line of text running off the page on the left-hand margin. Nasty. But, man, that's been a WHILE. I don't remember it that clearly, now.

@Thirsty? Do you still need hanging indent css? I can dig ours up and get that to you, if you do?

Hitch
Hitch is offline   Reply With Quote
Old 12-10-2016, 12:28 AM   #7
AThirstyMind
A Thirsty Mind
AThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with othersAThirstyMind plays well with others
 
Posts: 92
Karma: 2546
Join Date: May 2011
Location: Lubec, Maine
Device: Kindle Fire, iPad, iPhone
Hitch... yes I would like the hanging indent css. Thanks. Although for this book's glossary I used another style. But I'd like to have that in my repertoire.
AThirstyMind is offline   Reply With Quote
Reply

Tags
hanging text, style sheet, word to html


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I repace a Style Sheet? phossler Editor 13 12-24-2013 11:43 AM
Print style sheet ronaldl Sigil 2 10-29-2012 04:32 PM
Alphabetize and clean a style sheet roger64 Sigil 6 06-11-2012 11:47 AM
Style Sheet editor? GraciousMe Sigil 6 06-04-2012 03:06 PM
Missing style sheet mauvais Barnes & Noble NOOK 3 12-05-2011 06:29 PM


All times are GMT -4. The time now is 12:59 PM.


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