Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-05-2012, 12:09 PM   #1
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 172
Karma: 1001484
Join Date: Aug 2007
Location: Indianapolis
Device: iPad 3, Sony PRS-1, Kobo mini
Fix "small caps" problem

So I have an ebook that has been formatted (not by me) so that each new chapter or section begins with a slightly oversized letter followed by several words, in all caps, but in a tiny font before the text returns to standard upper and lower case and a regular font size. It appears that the formatting is trying to emulate small caps but doing so really poorly. When I get to each new chapter I have to either squint or zoom just to read the first few words. It's getting a wee bit annoying. Is there a quick way in Sigil to fix this? Note that I really don't understand CSS yet...
MSWallack is offline   Reply With Quote
Old 06-05-2012, 12:12 PM   #2
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,828
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by MSWallack View Post
So I have an ebook that has been formatted (not by me) so that each new chapter or section begins with a slightly oversized letter followed by several words, in all caps, but in a tiny font before the text returns to standard upper and lower case and a regular font size. It appears that the formatting is trying to emulate small caps but doing so really poorly. When I get to each new chapter I have to either squint or zoom just to read the first few words. It's getting a wee bit annoying. Is there a quick way in Sigil to fix this? Note that I really don't understand CSS yet...
It depends on how the formatting has been done. It might be as simple as a change to the CSS controlling the 'smallcaps' text. Or you might need to edit each chapter start individually. It's impossible to say which case applies to your particular ebook.
pdurrant is offline   Reply With Quote
Old 06-05-2012, 12:14 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,204
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
In most cases, smallcaps are just a simple style in the CSS. If that's the case, check how it's done. It should be a font size of either 75% or .75 em to be correct for the default font size of 1em.
JSWolf is online now   Reply With Quote
Old 06-05-2012, 01:13 PM   #4
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 172
Karma: 1001484
Join Date: Aug 2007
Location: Indianapolis
Device: iPad 3, Sony PRS-1, Kobo mini
I opened the ebook in Sigil. Here is what the beginning of a chapter looks like (I've changed the text of the book itself...):

<body class="calibre">
<p class="calibre7" id="filepos13245"><span class="calibre11 bold">CHAPTER 1</span></p>

<p class="calibre9 sgc-1">&nbsp;</p>

<p class="calibre10"><span class="calibre12 bold">CHICAGO, ILLINOIS</span></p>

<p class="calibre9 sgc-1">&nbsp;</p>

<p class="calibre10"><span class="italic">I</span> <span class="calibre12 italic">SHOULDN’T HAVE</span> <span class="italic">come,</span> Bob Smith thought as he looked at the people around him. <span class="italic">I should have gone far away.</span></p>

<p class="calibre15">But he had answered the phone call.</p>
MSWallack is offline   Reply With Quote
Old 06-05-2012, 01:21 PM   #5
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,828
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
It looks like you just need to change the CSS for style calibre12.

But that will only fix the font size, of course. Since the ALL CAPS is hard coded, there's no way to change that (without errors) without changing the text itself.
pdurrant is offline   Reply With Quote
Old 06-06-2012, 12:24 AM   #6
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,609
Karma: 4122230
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
I created some EPUBs with small caps a while ago using sigil, and the code there looked like:

Code:
<small>I SEEM TO BE</small>
So, it looks like the same font is used for small caps and the standard text. It just has the <small> tags around the small caps. There are no issues with the font being tiny that way. I don't see how to automatically change your EPUB to follow that style, though.

Last edited by rkomar; 06-06-2012 at 12:28 AM.
rkomar is offline   Reply With Quote
Old 06-06-2012, 03:56 AM   #7
Doitsu
Wizard
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: 1,865
Karma: 4630359
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by pdurrant View Post
But that will only fix the font size, of course. Since the ALL CAPS is hard coded, there's no way to change that (without errors) without changing the text itself.
Since the current Sigil version supports PCRE, it'd would be possible to use a \L backreference to change the all caps text to lower-case characters.
For example, the following regular search and replace expressions would change all caps text to lower case text:

Search: <span class="calibre12 italic">(.*?)</span>
Replace: <span class="italic">\L\1</span>
Doitsu is offline   Reply With Quote
Old 06-06-2012, 04:05 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 5,994
Karma: 4346921
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
That cannot know when a letter must be uppercase anyway, as in a proper name.
Jellby is offline   Reply With Quote
Old 06-06-2012, 04:46 AM   #9
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,828
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by Jellby View Post
That cannot know when a letter must be uppercase anyway, as in a proper name.
Exactly so. When the information isn't there, there's no automated way to fix it.
pdurrant is offline   Reply With Quote
Old 06-06-2012, 10:24 AM   #10
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 543
Karma: 64420
Join Date: Feb 2010
Device: none
FWIW, I will add that my experience has been that this method of simulating small caps (i.e. font size 75%, or whatever, used with all caps in the text) does not work reliably in all epub readers (nor, IIRC, in kindle 3 and below).

One could (should?) embed an actual small-caps font, but some e-readers don't handle embedded fonts well either.
st_albert is offline   Reply With Quote
Old 06-06-2012, 10:45 AM   #11
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 30,828
Karma: 85467920
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Well, actually small-caps should be done by specifying font-variant:small-caps in the CSS for the text you want in small-caps. Unfortunately, ADE doesn't support this part of the OPS 2.0.1 specification yet, and ADE is what most readers use when rendering ePubs.
pdurrant is offline   Reply With Quote
Old 06-06-2012, 10:59 AM   #12
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 172
Karma: 1001484
Join Date: Aug 2007
Location: Indianapolis
Device: iPad 3, Sony PRS-1, Kobo mini
I just changed the CSS definition (it was .43em or such) to 1.0em and everything looks fine now. I'd obviously prefer "real" small caps than just all caps, but at least the text is readable without zooming or squinting (I guess I'm getting old...). Thanks for the help.
MSWallack is offline   Reply With Quote
Old 06-06-2012, 11:06 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,204
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by MSWallack View Post
I opened the ebook in Sigil. Here is what the beginning of a chapter looks like (I've changed the text of the book itself...):

<body class="calibre">
<p class="calibre7" id="filepos13245"><span class="calibre11 bold">CHAPTER 1</span></p>

<p class="calibre9 sgc-1">&nbsp;</p>

<p class="calibre10"><span class="calibre12 bold">CHICAGO, ILLINOIS</span></p>

<p class="calibre9 sgc-1">&nbsp;</p>

<p class="calibre10"><span class="italic">I</span> <span class="calibre12 italic">SHOULDN’T HAVE</span> <span class="italic">come,</span> Bob Smith thought as he looked at the people around him. <span class="italic">I should have gone far away.</span></p>

<p class="calibre15">But he had answered the phone call.</p>
Code:
.calibre12 {
  font-size: 75%
}
There, fixed.
JSWolf is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem "installing" "Kindle library extractor" dhdurgee Kindle Developer's Corner 7 11-24-2012 07:09 PM
small caps problem in Sigil goroke Sigil 16 08-05-2011 12:14 PM
RTF "small caps" conversion? sehlat Calibre 3 06-23-2011 07:24 PM
"A Problem Occurred" on the "Shop" page. swallman Nook Color & Nook Tablet 1 12-25-2010 12:34 PM
Is there a "fix" or work-around for Kindle doubleing size of small graphics? bfollowell Amazon Kindle 15 11-14-2010 07:27 PM


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


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