Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-31-2017, 12:10 AM   #1
ebookreadr
Enthusiast
ebookreadr began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Dec 2012
Device: nook
Small-caps Title keeps splitting

OK - I've given up trying to figure this one out..

Inside the story is a book title written in small-caps with a full sized 1st character. Here is my current coding:

code:
<span class="keeptogether">A<span class="smallcaps">N</span></span> <span class="keeptogether">A<span class="smallcaps">MAZING</span></span> <span class="keeptogether">B<span class="smallcaps">OOK</span></span> <span class="keeptogether">T<span class="smallcaps">ITLE</span></span>

The fonts look OK on my nook, but the words of the title sometimes split across two lines after the first character. Originally it had only the <span class="smallcaps">. Then I tried using the old <nobr></nobr> and that didn't prevent the splitting. I get that the current coding with</span></span> after the words sees the span classes individually and not as a unit - like:
<span1>x<span2>xxxxx</span1></span2>
instead of:
<span1>x<span2>xxxxx</span2></span1>

Any idea's how I can do this?
Thanks for any assistance.
ebookreadr is offline   Reply With Quote
Old 01-31-2017, 12:53 AM   #2
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
This sounds like a bug that affected ePub readers based on old versions of Adobe's RMSDK. It was fixed in RMSDK 10 released in 2014, but if your device is still using an older version then I don't think there is any solution other than to avoid using <span> inside words.

In your particular case perhaps you can avoid the problem by embedding a real smallcaps font in the book?
GeoffR is offline   Reply With Quote
Advert
Old 01-31-2017, 03:15 AM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,689
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
@ebookreadr: To exclude CSS coding issues have a look at any of the beautifully formatted books by GrannyGrump, for example, her latest release, and transfer one of them to your device. (She always uses drop-caps and small-caps in her books.)
If the small-caps in that book look OK, recycle her CSS.

Last edited by Doitsu; 01-31-2017 at 04:52 AM.
Doitsu is offline   Reply With Quote
Old 02-03-2017, 02:51 AM   #4
ebookreadr
Enthusiast
ebookreadr began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Dec 2012
Device: nook
Quote:
Originally Posted by Doitsu View Post
@ebookreadr: To exclude CSS coding issues have a look at any of the beautifully formatted books by GrannyGrump, for example, her latest release, and transfer one of them to your device. (She always uses drop-caps and small-caps in her books.)
If the small-caps in that book look OK, recycle her CSS.
After 4 hours of testing here is where it stands:
I created a single page word document using calibri fonts (including small-caps). I embedded the fonts in the document, then used Calibre to convert it to epub. I had the files embedded and in the Calibre Reader & Sigil small-caps were OK. Not in the nook (even when I check the "Publisher Defaults" box).
I also tried downloading the regular, italic, and small caps files for a font called "thesans-light". Replaced them as the embedded font using Sigil. Again, it look fine in Sigil and the Calibre reader, but the nook not only did not show the small-caps, the fonts are so light they can barely be seen.

It is now minutes from midnight and I am tired. I will work with the coding some more later. As I said earlier I am familiar, but still learning how to do this. The instructions for embedding multiple fonts (regular, italic, small-caps) are confusing - mainly because there are multiple ways to do things and as many opinions as to which is the proper way. I'll update this afterwards.
Thanks again for all the input.
ebookreadr is offline   Reply With Quote
Old 02-03-2017, 03:48 AM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,689
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by ebookreadr View Post
I had the files embedded and in the Calibre Reader & Sigil small-caps were OK. Not in the nook (even when I check the "Publisher Defaults" box).
The fonts might have looked OK, because they are also installed on your computer. You also might want to use Adobe Digital Editions for your tests, because most eInk readers with Adobe DRM support use the same rendering engine.

BTW, did you test any of the MR epubs created GrannyGrump on your Nook and did the embedded fonts work? If so there's most likely a problem with your CSS. For example, you might have embedded the fonts in the epub, but didn't properly reference the location of the font files.

These problems are usually caught by the IDPF Validator.
Doitsu is offline   Reply With Quote
Advert
Old 02-03-2017, 09:36 PM   #6
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
I've had similar problems where the html file in Sigil would split at the start or in the middle of a title. This is really a wrapping problem where the html editor automatically splits the title in Text view into chunks to properly fit it within in the Text viewer dimensions in the editor. So its the editor that adds the newline character that splits your smallcap title. This split normally occurs at the first available gap or space in the text or tag border before the 80 character limit is reached in the html editor. Unfortunately, you have no control over how the text editor automatically handles this.

You could perhaps try including the following property in your p tag inline styling for the offending title line:

white-space: nowrap !important;

I have no idea whether this will work but maybe worth a try because it should prevent any breaks or newlines occurring anywhere on that smallcaps title line. The Importance modifier(!important) is there to prevent the editor from overriding the 'whitespace' property. I also have no idea whether 'whitespace' is a supported style property in epub html. Do it something like this:

Code:
<p style="whitespace: nowrap !important;"><span class="keeptogether">A<span class="smallcaps">N</span></span> <span class="keeptogether">A<span class="smallcaps">MAZING</span></span> <span class="keeptogether">B<span class="smallcaps">OOK</span></span> <span class="keeptogether">T<span class="smallcaps">ITLE</span></span></p>

Last edited by slowsmile; 02-03-2017 at 10:05 PM.
slowsmile is offline   Reply With Quote
Old 02-06-2017, 12:09 AM   #7
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,209
Karma: 34984330
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
@ebookreadr -- I think at least *part* of your line-break problem might be in the Nook itself, although Nook may have fixed their firmware by now. I remember a long discussion about spans and small-caps that might give you some clues
https://www.mobileread.com/forums/sh...d.php?t=232395
Take a look at post # 26 by Hitch for some discussion about the Nook trouble.
GrannyGrump is offline   Reply With Quote
Old 02-06-2017, 09:41 AM   #8
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 slowsmile View Post
I've had similar problems where the html file in Sigil would split at the start or in the middle of a title. This is really a wrapping problem where the html editor automatically splits the title in Text view into chunks to properly fit it within in the Text viewer dimensions in the editor. So its the editor that adds the newline character that splits your smallcap title. This split normally occurs at the first available gap or space in the text or tag border before the 80 character limit is reached in the html editor. Unfortunately, you have no control over how the text editor automatically handles this.
It is not the editor at fault, but the rendering engine.
Toxaris is offline   Reply With Quote
Old 02-06-2017, 12:41 PM   #9
ebookreadr
Enthusiast
ebookreadr began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Dec 2012
Device: nook
Quote:
Originally Posted by GrannyGrump View Post
@ebookreadr -- I think at least *part* of your line-break problem might be in the Nook itself, although Nook may have fixed their firmware by now. I remember a long discussion about spans and small-caps that might give you some clues
https://www.mobileread.com/forums/sh...d.php?t=232395
Take a look at post # 26 by Hitch for some discussion about the Nook trouble.
Thanks – the link provided me with addition things to try such as:
<small></small>
This did not work on the nook.

Quote:
Originally Posted by slowsmile View Post
You could perhaps try including the following property in your p tag inline styling for the offending title line:

white-space: nowrap !important;

I have no idea whether this will work but maybe worth a try because it should prevent any breaks or newlines occurring anywhere on that smallcaps title line. The Importance modifier(!important) is there to prevent the editor from overriding the 'whitespace' property. I also have no idea whether 'whitespace' is a supported style property in epub html. Do it something like this:

Code:
<p style="whitespace: nowrap !important;"><span class="keeptogether">A<span class="smallcaps">N</span></span> <span class="keeptogether">A<span class="smallcaps">MAZING</span></span> <span class="keeptogether">B<span class="smallcaps">OOK</span></span> <span class="keeptogether">T<span class="smallcaps">ITLE</span></span></p>
This did not work on the nook either.
I agree that the nook is the problem. I thought that I had seen successful examples in other epubs, but maybe it was just because the titles were short and did not go beyond one line.
Someone had also mentioned that using justification may be causing the problem, but I changed the document to left alignment and all the various methods still split.
I will keep my eyes open and if I find anything new or someone comes up with something else to test. I will let you know what happens.
ebookreadr is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Small caps JLius ePub 10 06-09-2014 01:37 AM
Small caps Notjohn Sigil 9 02-23-2013 10:19 AM
Small Caps djulian Kindle Formats 2 04-05-2012 08:48 AM
small caps yuxi_kelly ePub 20 06-05-2011 12:04 AM


All times are GMT -4. The time now is 03:17 PM.


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