Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2010, 10:22 PM   #1
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Italics html question

I'm curious to know if this has always been the case but in the past I remembered if you did not close an italics or bold tag the rest of the following paragraphs would remain bolded or italicized until it hit a closing tag.

I'm noticing in some recent conversions that the Paragraph tag < / P> works as a < / I> and as a < / B>

Is there anyway to stop it from doing that? Some of the stories I'm converting have more than one paragraph of bolded or italicized text and the program I use adds the tag at the beginning and then at the end. But when Calibre converts nothing past the first < / P> remained italicized.

I'd appreciate any advice or help.
Amalthia is offline   Reply With Quote
Old 02-24-2010, 11:47 PM   #2
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
It's considered very bad form in HTML to have the scope of tags overlap at all. Something of the form <p><i>...</p>...</i> should never exist. Probably it would mean that the HTML in question wouldn't pass validation tests.

So if you have multiple italicized paragraphs, you should have something like:

<p><i>Paragraph one ..</i></p>
<p><i>Paragraph two ..</i></p>

or better:

<p style="font-style: italic;">Paragraph one</p>
<p style="font-style: italic;>Paragraph two</p>

(Or the same by means of a CSS class and an appropriate stylesheet.)

Something like:

<div style="font-style: italic;">
<p>Paragraph one</p>
<p>Paragraph two</p>
</div>

might be OK, but it might have other issues, so I'd steer clear of it.
frabjous is offline   Reply With Quote
Advert
Old 02-25-2010, 12:25 AM   #3
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by frabjous View Post
It's considered very bad form in HTML to have the scope of tags overlap at all. Something of the form <p><i>...</p>...</i> should never exist. Probably it would mean that the HTML in question wouldn't pass validation tests.

So if you have multiple italicized paragraphs, you should have something like:

<p><i>Paragraph one ..</i></p>
<p><i>Paragraph two ..</i></p>

or better:

<p style="font-style: italic;">Paragraph one</p>
<p style="font-style: italic;>Paragraph two</p>

(Or the same by means of a CSS class and an appropriate stylesheet.)

Something like:

<div style="font-style: italic;">
<p>Paragraph one</p>
<p>Paragraph two</p>
</div>

might be OK, but it might have other issues, so I'd steer clear of it.
I think for a long time I just got used to huge blocks of text being converted to italics if you forgot to close them off so I had thought that's how they were supposed to work. (and it still works like that in web browsers)

Thanks for the clarification. It looks like I'll have to watch out for multiple paragraphs with italics and make sure I check the italics after converting to HTML.
Amalthia is offline   Reply With Quote
Old 02-25-2010, 01:57 AM   #4
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,759
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
try using tidy html cleaner that works quite well in cleaning up html tag errors
I personally use notepad++ that has built in Tidy and is great for fixing html files
plus it can also auto generate css for you.
Dopedangel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about using Sigil to convert HTML ficbot Sigil 9 03-06-2011 08:12 AM
New to Calibre - Recipe/HTML question ClairePMR Calibre 3 07-23-2010 11:53 AM
Format Question html to ePub Fabe Calibre 3 04-21-2010 05:08 PM
Book Covers and Borders, Plus Italics Question KingOfMyWorld Calibre 1 02-18-2010 07:01 PM
html formatting question Nate the great Workshop 49 07-17-2009 10:33 AM


All times are GMT -4. The time now is 02:35 AM.


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