Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2016, 01:07 AM   #1
rbruce1314
Groupie
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 179
Karma: 1021404
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
Is there hidden coding?

I'll try to be brief, but at the same time precise.

Epub book generated from azw3 by Calibre. Editing in code view.

Most chapters have <p class="msonormal2"> as paragraph header.
A few have <p class="msonormalcxspmiddle1"> instead, seemingly at random.

My normal method of dealing with this (to install my choice of justify, text indent etc.,) is to modify just the one heading in the stylesheet, then bulk replace the 'alternative' para headings. It has always worked - till now!!

(Book is 'The Art of Detection' by J.S Spicer)

Went through above procedure as normal without fault till chapter 39. Did the find/replace as before, but this time nothing changed as I saw once back in book view. Previous (changed) chapters ok, subsequent chapters ok.

Workaround of course was to modify the stylesheet for the second type to match the first. That did change the text to my choice.

So - question - WHY? (hence the thread title).

And is there an answer? I'm completely confused as to it working in one chapter and not another.......

EDIT - I should have said that the differences in para codings was in the original azw3, not the calibre conversion....

Last edited by rbruce1314; 02-17-2016 at 01:13 AM.
rbruce1314 is offline   Reply With Quote
Old 02-17-2016, 04:15 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
There is no hidden coding in an ePUB, so there must be something else what caused this.

Based on the example, what I can say is that the original source is a Word document and that it was not cleaned before processed.

I must say that I do not fully understand your normal way of working. In this case I would add my own stylesheet and then replace the styles in the document with a corresponding style in my own stylesheet.
Toxaris is offline   Reply With Quote
Advert
Old 02-17-2016, 04:42 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: 75,243
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I agree. Dumping the style sheet created by a dirty Word conversion is a very good idea. Word conversions can be very messy if the original document is not properly created. msonormal means not properly created and the eBook is a mess.
JSWolf is offline   Reply With Quote
Old 02-17-2016, 06:06 AM   #4
rbruce1314
Groupie
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 179
Karma: 1021404
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
Quote:
Originally Posted by JSWolf View Post
I agree. Dumping the style sheet created by a dirty Word conversion is a very good idea. Word conversions can be very messy if the original document is not properly created. msonormal means not properly created and the eBook is a mess.
I'm the first to admit I'm no expert (just above novice level IMHO!!). So are you saying that msnormal (and the like) ALWAYS means an improperly created document? If that's so I'll certainly modify my way of working!!
rbruce1314 is offline   Reply With Quote
Old 02-17-2016, 07:36 AM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by rbruce1314 View Post
I'm the first to admit I'm no expert (just above novice level IMHO!!). So are you saying that msnormal (and the like) ALWAYS means an improperly created document? If that's so I'll certainly modify my way of working!!
It always means that the source is a Word document and that it is not cleaned. I would not go as far as to say it is improperly created, but it is not the easiest nor smartest way to go. The HTML export of Word is mediocre to say the least and needs a lot of cleaning. Not doing so can result in to unexpected and strange results.

Personally I would recommend my own Word add-in, which can create an ePUB directly in Word that is clean and have many other features that might be useful.
Others have good results with an export out of Atlantis Word Processor which can read docx, but not everything is supported (tables for one). Others again rely on Calibre to convert a Word document to ePUB. It does a fairly good job, but I personally don't like the styles and stylenames that Calibre uses. To each its own.
Toxaris is offline   Reply With Quote
Advert
Old 02-17-2016, 07:52 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,718
Karma: 196949708
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Toxaris View Post
Personally I would recommend my own Word add-in, which can create an ePUB directly in Word that is clean and have many other features that might be useful.
He's not just tooting his own horn either.
It's a great tool that a lot of people use/appreciate.
DiapDealer is offline   Reply With Quote
Old 02-17-2016, 09:10 AM   #7
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
If you have an old version of Word, the website word2cleanhtml dot com does an excellent job. I've used it on Open Office doc files as well, and the results are pretty good. I've never tried it on *.docx.
Notjohn is offline   Reply With Quote
Old 02-17-2016, 11:18 AM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,148
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by rbruce1314 View Post
I'm the first to admit I'm no expert (just above novice level IMHO!!). So are you saying that msnormal (and the like) ALWAYS means an improperly created document? If that's so I'll certainly modify my way of working!!
I would use the phrases:
Messy code
inefficient code
even Lazy user, when they use linefeeds to get a new 'page' and/or spaces to indent (I now Word has a insert Page break, even if I have used Wordperfect and OO writer )

If it works,
it is NOT Bad code
theducks is offline   Reply With Quote
Old 02-17-2016, 11:47 AM   #9
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
msnormal in itself doesn't mean to much. That is the standard word paragraph. But if you encounter many variations of that, or inline styles etc., then it is not the nicest code and someone didn't use word in a good way and/or didn't clean the output a little bit.
dickloraine is offline   Reply With Quote
Old 02-17-2016, 12:01 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,148
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
A msnormal# in usage is similar to calibre#
They are simply the NEXT style number

They also are usually paired with a (span class="none#
of which 1 needlessly has all the NORMAL (AKA default font attributes)

You can use Diaps 'Tag Mechanic' PI (it is part of the Toolbag, if you use Calibres editor) to remove THAT one
theducks is offline   Reply With Quote
Old 02-17-2016, 06:25 PM   #11
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,468
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 theducks View Post
A msnormal# in usage is similar to calibre#
They are simply the NEXT style number

They also are usually paired with a (span class="none#
of which 1 needlessly has all the NORMAL (AKA default font attributes)

You can use Diaps 'Tag Mechanic' PI (it is part of the Toolbag, if you use Calibres editor) to remove THAT one
Ducky, my one Twoo Wuv:

I'm pretty sure that I've never seen "msonormal#" wherein # equals a number. Not...not since before Word 2003. Usually, I just see an ad hoc name, when the user creates something on the fly, like "msonormal+bold" or "msonormal+italic+lineheight:1.3" or the like.

No?

P.S.: There really IS nothing wrong with msonormal, per se. Experienced ePUB Pilots frequently don't bother changing the name of the base style. However, it's usually easier for us to simply use the stylenames that we're accustomed to: body, narrative, whatever, so that seeing "msonormal" is a bit like hearing "DANGER, DANGER WILL ROBINSON!"



Hitch
Hitch is offline   Reply With Quote
Old 02-17-2016, 07:12 PM   #12
Freeshadow
temp. out of service
Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.
 
Posts: 2,794
Karma: 24285242
Join Date: May 2010
Location: Duisburg (DE)
Device: PB 623
Thumbs up

Quote:
Originally Posted by DiapDealer View Post
He's not just tooting his own horn either.
It's a great tool that a lot of people use/appreciate.
Not only seconding but expanding the statement above:
Toxaris made great tools that a lot of people use/appreciate.
Freeshadow is offline   Reply With Quote
Old 02-17-2016, 09:18 PM   #13
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,468
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 Freeshadow View Post
Not only seconding but expanding the statement above:
Toxaris made great tools that a lot of people use/appreciate.
Yes, you know what? I, too, should have said. Sorry, Tox, I was engrossed in something else. I use his tools ALL the time. Absolutely irreplaceable for wrangling naughty Word files!

Hitch
Hitch is offline   Reply With Quote
Old 02-18-2016, 06:37 AM   #14
Freeshadow
temp. out of service
Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.Freeshadow ought to be getting tired of karma fortunes by now.
 
Posts: 2,794
Karma: 24285242
Join Date: May 2010
Location: Duisburg (DE)
Device: PB 623
@ Hitch: In fact I thought about me and you as I wrote it. The first thing I had in mind was how great Tox turned the idea of a subsetting standalone tool we were arguing for into reality, and how happy you were that he did.
Freeshadow is offline   Reply With Quote
Old 02-18-2016, 01:46 PM   #15
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,468
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 Freeshadow View Post
@ Hitch: In fact I thought about me and you as I wrote it. The first thing I had in mind was how great Tox turned the idea of a subsetting standalone tool we were arguing for into reality, and how happy you were that he did.
That's exactly right. It's absolutely without peer for cleaning Word files, in my humble opinion. And with all due modesty--I oughta know! ;-) There are simply some oddball things that are easier to do IN the source file, than to clean up afterwards with regex. (For ex: marking bold, italics, and then wiping the file clean of cruft formatting. Then laying the bold, italics back down. Brilliant.)

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Colour coding CSS chaot Editor 5 03-05-2015 01:32 PM
Coding Errors vinny3777 Recipes 1 06-01-2014 04:29 PM
Kindle 8 coding Jamestoo Workshop 2 01-14-2012 11:34 AM
Seriously thoughtful Coding Help Requested poohbear_nc Lounge 10 08-24-2010 10:42 AM
python coding... alexxxm Sony Reader 8 01-31-2008 12:25 PM


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


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