|01-24-2012, 09:27 AM||#3|
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
BTW Replace might be a better term, especially if you want to pass Flightcrew
You can't have naked text, so be careful
<div class="first"><p class="normal">Text</p></div>
<p class="normal first">Text</p>[/CODE]
I have trouble getting matching tag pairs to only Match in my REGEX
(same problem with excessive Span removal, It needs to match the correct partner.)
|01-24-2012, 10:14 AM||#4|
Join Date: Jan 2012
Device: Kindle / KOBO / PC
Hmmm! sounds a bit complicate. Simple is best when you plan to convert an epub to mobi.
You only really need <div> to open and close each xhtml file if it's basic fiction prose. i.e. one before the first <p> section, and one after the last. Note: not the cover page .htm, that's a bit different.
Actual paragraphs only need...<p class=MsoNormal> text in here </p>
<p> </p> for a paragraph break, i.e. blank line.
Simple coding yeilds better results for mobi conversion.
ps the little brush button (Tidy) will more often than not add superfluous tags and other bits and peices. Working with it off, if your making a file to convert, is advised. If you make a boo-boo you will get a "not well formed" error which will highlight the problem. You can then fix it manually, or automatic and clean up as required.
|01-24-2012, 02:41 PM||#5|
Join Date: Jun 2011
I don't want to replace <div>, I want to delete them. As it stands, they're merely coding clutter. Naked text won't be a problem.
Thanks to huebi for the simple solution. Same as Whackatagin, I'm usually reticent to let Sigil automagically fix "malformed code", but in this case it worked without a hitch.
|01-24-2012, 05:31 PM||#6|
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Div's are also annoying in a lot of places since some readers like to default to page-breaking on them, if they are used sparsely. Never really understood why they're useful in most cases. Anyway removing them is easy enough with something like
Last edited by Serpentine; 01-24-2012 at 05:43 PM. Reason: oops
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Changing or removing <div class="calibrenavbar">||ptsefton||Recipes||3||05-28-2011 08:30 AM|
|Regular expression for matching div tags?||kiwidude||Sigil||11||12-12-2010 06:11 AM|
|keeping or removing a div with multiple classes||JohnsonZA||Recipes||1||09-25-2010 10:33 AM|
|Remove spacing between paragraphs - what about div tags ?||NASCARaddicted||Calibre||5||11-07-2009 05:47 AM|
|Line indents using "<div>" tags||HarryT||Kindle Formats||11||04-29-2009 10:18 PM|