![]() |
#1 |
Enthusiast
![]() 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. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#4 | |
Enthusiast
![]() Posts: 26
Karma: 10
Join Date: Dec 2012
Device: nook
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,689
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#7 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | ||
Enthusiast
![]() Posts: 26
Karma: 10
Join Date: Dec 2012
Device: nook
|
Quote:
<small></small> This did not work on the nook. Quote:
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. |
||
![]() |
![]() |
![]() |
|
![]() |
||||
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 |