![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,964
Karma: 144284074
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.
|
![]() |
![]() |
![]() |
#4 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 179
Karma: 1021404
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#7 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
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.
|
![]() |
![]() |
![]() |
#8 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,886
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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 ![]() |
|
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 631
Karma: 7544528
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.
|
![]() |
![]() |
![]() |
#10 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,886
Karma: 59840450
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 |
![]() |
![]() |
![]() |
#11 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#12 |
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,814
Karma: 24285242
Join Date: May 2010
Location: Duisburg (DE)
Device: PB 623
|
![]() |
![]() |
![]() |
![]() |
#13 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
#14 |
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,814
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.
|
![]() |
![]() |
![]() |
#15 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |