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 07-29-2011, 03:36 AM   #1
goroke
Member
goroke began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
small caps problem in Sigil

I've been fighting with this for a couple of weeks, now... I had given up for a while and done the usual work-around, but tonight I got annoyed and started trouble-shooting -- and I found what is tripping the problem.

I have this huge CSS that I use for almost everything, and I keep adding things in as I run into new styles I want to use. When I added the code for small caps, most of the page went small caps; it didn't stop with the </span> tag. And it was random, changing as I zoomed in and out. And it wasn't just the display on Sigil -- when I opened the saved file in Calibre's e-book reader, the same problem carried over. The code for this is standard:

span.smcap
{
font-variant: small-caps; }

So I built a new style sheet, definition by definition, and with a bare minimum everything looked fine with the small caps. When I added in my basic paragraph definition, the problem was there again. It's not a complex definition. Here's the code:

p
{
margin: 0em;
margin-top: 0em;
margin-bottom: 0em;
text-indent: 1.5em;
text-align: justify; }

First I removed the margin and indent lines all at once, but the problem was still there. So I put them back and took out the justification line -- and the problem disappeared.

So now that I know the what of the problem, can anyone explain the how? And is there any way to fix this?
goroke is offline   Reply With Quote
Old 07-29-2011, 06:07 AM   #2
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
I also get this if I use small caps.

They display fine when I read the book in my readers, I believe this is just a display issue in Sigil due to (I think) it's use of Qt.

It's nothing to worry about as your book will be fine. Just wish it could be fixed though as it makes checking the book quickly a bit difficult.
ghostyjack is offline   Reply With Quote
Advert
Old 07-29-2011, 07:09 AM   #3
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: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Change the smallcaps to, say, red colour. If everything looks fine, there's nothing wrong with the coding and it's just a display issue in Sigil/Calibre.
Jellby is offline   Reply With Quote
Old 07-29-2011, 09:09 AM   #4
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by goroke View Post
when I opened the saved file in Calibre's e-book reader, the same problem carried over.
Sigil and calibre use the same HTML renderer. If there is a display problem in one it will also be in the other.
user_none is offline   Reply With Quote
Old 07-29-2011, 12:09 PM   #5
goroke
Member
goroke began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
Ah, okay... is there any chance this will be corrected in future versions?

And let me say right here how much I love working with Sigil!
goroke is offline   Reply With Quote
Advert
Old 07-29-2011, 12:21 PM   #6
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: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Code:
span.smcap {
   font-variant: small-caps
}
Does not work in ADE. So if your ePub is going to eventually be used with ADE, you'll have to do it another way which is to change the font size to 75% and use caps in the text unless you are embedding fonts and you can then use a smallcap font.
JSWolf is online now   Reply With Quote
Old 07-29-2011, 12:33 PM   #7
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
If I remember correctly small caps is not part of the EPUB spec. So support for it I'd hit or miss depending on the viewing application.
user_none is offline   Reply With Quote
Old 07-29-2011, 01:41 PM   #8
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: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by user_none View Post
If I remember correctly small caps is not part of the EPUB spec. So support for it I'd hit or miss depending on the viewing application.
I thought it was just a bug in ADE. Maybe not.
JSWolf is online now   Reply With Quote
Old 07-29-2011, 02:21 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I joust looked at OPS 2.0.1 spec and it says Font-Variant small-caps support is required
theducks is offline   Reply With Quote
Old 07-29-2011, 09:39 PM   #10
goroke
Member
goroke began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
Well, I did some poking around, and the one reader that handles all the formatting correctly is the EPUB plugin for Firefox. Several others simply ignore the small caps, which is okay... it's the weird display in both Sigil and the Calibre reader that had me freaked out.

Since I am mostly self-teaching on epub coding, the project I am working on (two volumes of H. G. Wells) are for my own on-screen reading enjoyment -- though after scanning and copy-editing two versions of The Time Machine, I may never actually want to read the thing again.
goroke is offline   Reply With Quote
Old 07-30-2011, 04:18 AM   #11
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: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
Code:
span.smcap {
   font-variant: small-caps
}
Does not work in ADE. So if your ePub is going to eventually be used with ADE, you'll have to do it another way which is to change the font size to 75% and use caps in the text unless you are embedding fonts and you can then use a smallcap font.
That becomes a code mess if you haved MIXED CASE SMALL-CAPS.

Unless the small-caps are critical, I prefer leaving the font-variant and hoping it will be supported at some point in the future. ADE supports hyphenation and ligatures now, so maybe it's not a lost cause.

Quote:
Originally Posted by user_none
If I remember correctly small caps is not part of the EPUB spec. So support for it I'd hit or miss depending on the viewing application.
It is a required part of the spec. text-transform is not, though.
Jellby is offline   Reply With Quote
Old 08-03-2011, 07:07 PM   #12
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: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I'll have to give small-caps a go in ADE 1.8 preview an see if it actually works.
JSWolf is online now   Reply With Quote
Old 08-04-2011, 12:49 PM   #13
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by JSWolf View Post
I'll have to give small-caps a go in ADE 1.8 preview an see if it actually works.
It doesn't
charleski is offline   Reply With Quote
Old 08-04-2011, 01:50 PM   #14
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
I am not surprised it still doesn't work. It isn't flashy enough to fix...
Toxaris is offline   Reply With Quote
Old 08-05-2011, 03:19 AM   #15
goroke
Member
goroke began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
Well, after reading all the suggestions, and thinking about it, I came up with a kludge that may be inelegant, but is the best solution I can think of...

I rewrote my CSS code to:
.smcap
{
text-transform: uppercase;
font-size: 75%; }
.smcap-for_real
{
font-variant: small-caps; }

Then I went back into the pages and changed all my <span class="smcap"> tags so they only wrapped around the letters to be affected. Right now, it appears as though more reading programs support the "text-transform" code than the correct "font-variant:small-caps" code. Then, if the readers should, in the future, not freak out over small-caps, then I can just change one line of code in the CSS and it will do things the proper way. Of course, those devices that don't support the "text-transform" code will see things in normal mixed case (with some font-size reduction on the "small caps"), but I guess you can't have everything...

Last edited by goroke; 08-05-2011 at 03:21 AM.
goroke is offline   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
RTF "small caps" conversion? sehlat Calibre 3 06-23-2011 07:24 PM
small caps yuxi_kelly ePub 20 06-05-2011 12:04 AM
Small problem with Newegg GA Russell Ectaco jetBook 10 10-30-2010 12:03 AM
iLiad Welcome back - small(?) Problem FGFuzax iRex 14 10-01-2010 12:29 PM
DR1000 FW2.0 - RC2 - font-variant: small-caps ThR iRex 0 06-29-2010 05:31 AM


All times are GMT -4. The time now is 06:16 PM.


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