[BUG] Weird issue when bold and italics on the same line when compiling to EPUB

Ma
Manni
Posts: 193
Joined: Mon Dec 12, 2011 10:18 am
Platform: Mac + Windows

Thu Oct 03, 2019 10:14 pm Post

It took me a while to understand what was happening (latest Scriver 3.1.3 11945 on Mac OS Mojave 10.14.6)

I have a list of recommended reading at the end of my book.

Each title in the list (not a style title, just the title and author in a no style paragraph) is formatted that way:

Title by Author, bla bla bla etc...

There is no issue in the binder, but when compiling I noticed that the text stopped abruptly at the end of the title line with the following: <p class="ps19">

I have other sections where the entries are only in bold, and there is no issue. The problem comes when adding the italics. as well.

For example, I have another section where I have just a film title on a line, with a two letter code in brackets, like this:

Title [AB]

If I have the whole title in bold, no problem, I get this, as expected:

Title [AB]


If I make the title in italics and not the code, like this:

Title [AB]


I have the same issue as above when compiling.

If I display the EPUB in iBooks, the app tells me that there is a mismatch in the formatting code:

Code: Select all

error on line x column y: opening and ending tag mismatch: div line 0 and p


Of course, I tried the obvious like getting rid of all formatting and adding the formatting again, that doesn't make any difference.

The only way to get the ebook to compile is to get rid of the italics within the bold.

I tried changing the font in compile, it doesn't make any difference.

So it looks like a weird bug to me. :?

User avatar
Jack Daniel
Posts: 98
Joined: Tue Nov 13, 2018 6:54 pm
Platform: Mac

Thu Oct 03, 2019 11:00 pm Post

I've honestly not had such a problem.

In fiction, occasionally I like to stress a particular word in dialogue so that the reader understands where the emphasis is being placed by the speaker (in situations where that would otherwise read ambiguously).

But I never use italics. Instead, I use the character style of Emphasis, which does pretty much the same thing (the word is italicized in epub/mobi as well as in the editor).

So I would try that, since I know it throws no errors such as this.

Also, make sure, if the last word in a paragraph is in Emphasis, that the entire line, including the white space after, is placed in Emphasis. Otherwise, this has been known to crash the compiler, although Keith may have fixed that by now.

Ma
Manni
Posts: 193
Joined: Mon Dec 12, 2011 10:18 am
Platform: Mac + Windows

Fri Oct 04, 2019 4:54 pm Post

Thanks but in this case I'm writing non-fiction and it is important to be able to have both bold and italics in the same line.

This certainly shouldn't cause the issue I'm reporting.

I'll try your emphasis trick and will see if it solves the issue.

Ma
Manni
Posts: 193
Joined: Mon Dec 12, 2011 10:18 am
Platform: Mac + Windows

Fri Oct 04, 2019 5:06 pm Post

I tried to apply the emphasis character style (Format/Style/Character Style/Emphasis) but that didn't work right away. First when you apply it it gets rid of the bold, then if you apply bold over it it looks fine in binder (similar to italics+bold) but compile only applies emphasis, so italics only.

To make it work, I had to add an Emphasis character style in my ebook compile format, and set it to bold and italics. That worked :)

This proves that it's nothing to do with the font (Adobe Caslon Pro) which does support both bold and italics.

I still think that Keith should fix this, but at least this workaround worked fine for now.

Thanks again for the tip. :)