Copy link to clipboard
Copied
Since swithching from CS6 to CCInDesign 2020, when I export to flowing ePub, e2 or e3, The resulting ePub HTML is loaded with the following spans between almost every word: <span xml:lang="en-GB">. There must be 100,000 of these, too many to search and delete/replace. Also, added "magically" to my classes is <xml:lang="en-US"> as follows: <p class="aabody" xml:lang="en-US"> The same file exported fine using CS6, no such spans or class changes. Is it a setting or a bug? Below is ONE papragraph from the epub.
<p class="aabody" xml:lang="en-US"><span xml:lang="en-GB">I</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">slipped</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">back</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">through</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">ferns</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">along</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">ratty</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">edge</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">of</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">vacant</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">lot</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">watching</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">for</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">broken</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">bottles</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">and</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">beer</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">cans</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">crossed</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">street</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">farther</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">up</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">went</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">half</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">a</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">block</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">then</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">down</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">alley</span><span xml:lang="en-GB">.</span></p>
Is the language in your original file applied as a local override?
Copy link to clipboard
Copied
Is the language in your original file applied as a local override?
Copy link to clipboard
Copied
Language in my paragraph styles was noted as US English. Language was not applied locally or any other way. Dictionary was US Eglish. What's changed since CS6 that would cause this. The exact same file exported from CS6 without any of these spans. See the sample paragraph I added to my post. Interestingly, my dash syling is British, but no special style was applied to the dashes.
Copy link to clipboard
Copied
I rechecked, and in fact GB English was a localized "character attribute for some reason (Word import probably.) Never would have thought. But I saw that I did cheat by not removing all localized formatting from my paragraphs on this book. Bad me. It appeared to make no difference and I was in a hurry. InDesign CS6 didn't seem to care, but 2020 showed me, and how. But, InDesign 2020 does lie. Even with the "preserve local overides" box left unchecked it did include local overides. I'd say it is a bug. So beware, bug or not.
Thank you for pointing me in the right direction. Thank you. Thank you all.
Copy link to clipboard
Copied
Best report it then at https://indesign.uservoice.com (under "Bugs", not "Feature requests").
Is the per-word language a symptom as well, or is that only because it's that way in your file?
Copy link to clipboard
Copied
The local GB language character style was applied to the entire document (imported with the text from author's Word doc is my guess. I'll look into that). The fact that the style in the export was applied to every word AND space was InDesign's "decision". The reason that InDesign CS6 ignored this localized language style (good) and InDesign 2020 decided to populate my epub with a ton of code doubling the length of the HTML (bad), is still a question.
Since we are on the subject, similarly, when I apply italic character styles to a phrase or a sentence (not locally, but actual styles), InDesign (CS6 and 2020) chooses to apply individual spans to each individual italic word and space. This I've learned to live with. These I have been carefully stripping/simplifying in Sigil. Lynda.com warned of InDesign's extranious ePub code ages ago. It's still not resolved in 2020. In fact one of the reasons I decided to finally bite the bullet and upgrade from CS6 to 2020 was the anticipation that after 10 years ePub export would have evolved in InDesign so I wouldn't have to deal with all the extraneous code, mainly with the italics. Dream on.
I have never reported bugs, so thank you for the directions.
Copy link to clipboard
Copied
Are you sure you didn't inadvertently export it as a FXL ePub?
Copy link to clipboard
Copied
You mean "fixed layout" epub? I did it several times and each time it was "reflowable" epub. I tried both e3 and e3.
Copy link to clipboard
Copied
Maybe you need to start again. Did you apply Paragraph and Character Styles to all the text, no Master Pages, no folios, all images anchored?
Copy link to clipboard
Copied
Yes. I have done dozens of books using CS6. I use paragraph and character styles for everything. Nothing local. Things from master pages are not included. I also double check each style's export tagging. I have done nothing different other than using CCInDesign 2020. In fact I used the same file for a test on 2020 that I made into a beautiful eBook a few months ago using CS6. I never used earlier versions of CC. I just made the switch so I bypassed 2019.
Copy link to clipboard
Copied
What message do you get when you validate the ePub ?
Copy link to clipboard
Copied
E-pub checker said "Epub is valid." And it "looks" fine in ibooks. That may be, but I don't want all that useless code cluttering my epub. It cannot be good and is unprofessional. And as you can see from my sample, it's too much to strip out. I added a paragraph sample to my original post if you missed it.
Copy link to clipboard
Copied
I have just exported a different book to epub using InDesign 2020 and the <xml;lang> spans did not populate as on the initial test file. So now at least I can assume it is not a general v2020 bug but something related to a particular document or documents. Problem not solved. I am still left with the question as to why and how to overcome the proliforation of spans when exporting that document in v2020. Anyway, I am in less of a panic but still not a happy camper.
Copy link to clipboard
Copied
Flightdeck is a wonderful checker worth having a look at ($15 for one month):
Copy link to clipboard
Copied
Hey, John, if this is still happening to you, I found a work-around. I had 8k <span lang="en-GB" xml:lang="en-GB"> in an epub export this morning too, been struggling with it all morning. Working in Calibre, I did a find/replace "<span lang="en-GB" xml:lang="en-GB">" with " " and it cleaned out all the opening <span lang="en-GB" xml:lang="en-GB">. Then I used the Tools > Fix html option and it removed all the extra </span> codes... voila, fixed.
Copy link to clipboard
Copied
This works! was having the same issue with InDesign CC 2023. It created an empty lang="" and caused the file to be rejected with epub validators. So I used sigil to find and replace lang="" and it went through.
Thank you so much!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now