Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-04-2013, 09:42 AM   #1
holdit
Connoisseur
holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.
 
Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
Adding a css page to an e pub

I have a question regarding this subject, I know how to add a stylesheet but in this case I see the default font for this e pub is Times New Roman.

I'm trying to add an underline to certain words and I need to know how to set up the stylesheet as I only know how to do this by adding a different font. Do I still have to add the font and the style to css in the e pub doc in order to see an underline in the default font as I see it in Sigil but do not see it in the published e pub and mobi.

??
thx
holdit is offline   Reply With Quote
Old 04-04-2013, 10:34 AM   #2
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
If you need underline, you can add the following in your stylesheet:
Code:
.under {
text-decoration: underline;
}
In your file you need to mark the words you want underlined with for example:
Code:
<p>The word <span class="under">underline</span> is underlined.</p>
Toxaris is offline   Reply With Quote
Old 04-04-2013, 10:36 AM   #3
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by holdit View Post
I have a question regarding this subject, I know how to add a stylesheet but in this case I see the default font for this e pub is Times New Roman.

I'm trying to add an underline to certain words and I need to know how to set up the stylesheet as I only know how to do this by adding a different font. Do I still have to add the font and the style to css in the e pub doc in order to see an underline in the default font as I see it in Sigil but do not see it in the published e pub and mobi.

??
thx
Please Show the relevant CSS code you used.

BTW TNR, while fairly common, is a licensed font and may not be distributed without permission. (fairly common: not all devices support this natively)
theducks is offline   Reply With Quote
Old 04-04-2013, 10:59 AM   #4
holdit
Connoisseur
holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.
 
Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
I went ahead and added the font ZTimes New Roman to the Font folder of the E pub in Sigil. Added a stylesheet and created 3 styles, underline, underline bold and centerBold.

These are now visible in the published e pub and mobi

when I went to validate first I got the msg that "the font is in the manuscript but not used"

so I removed the font from the folder and now it says OEBPS/styles/fonts / timesNewRoman.ttf is reachable but not present in the manifest.

this is true as I deleted it but I was looking for instances of the font mentioned and cannot find anywhere in the e pub.

heres the .css code I used


@font-face {
font-family: Times New Roman;
font-style: normal;
font-weight: normal;
src:url("Fonts/Times New Roman.ttf");
}


p.letterULine {
font-family: "Times New Roman";
font-weight: normal;
font-style: normal;
font-size:1.5em;
line-height: 1.20em;
text-decoration: underline;
font-variant: normal;
text-indent: 0em;
text-align: left;
color: #000000;
margin: 1em 0 0 0;
-webkit-hyphens:none;
}

p.letterULineBold {
font-family: "Times New Roman";
font-weight: bold;
font-style: normal;
font-size:1.5em;
line-height: 1.20em;
text-decoration: underline;
font-variant: normal;
text-indent: 0em;
text-align: left;
color: #000000;
margin: 1em 0 0 0;
-webkit-hyphens:none;
}

p.letterBold {
font-family: "Times New Roman";
font-weight: bold;
font-style: normal;
font-size:1.5em;
line-height: 1.20em;
text-decoration: none;
font-variant: normal;
text-indent: 0em;
text-align: left;
color: #000000;
margin: 1em 0 0 0;
-webkit-hyphens:none;
}

p.letterCenter {
font-family: "Times New Roman";
font-weight: normal;
font-style: normal;
font-size:1.5em;
line-height: 1.20em;
text-decoration: none;
font-variant: normal;
text-indent: 0em;
text-align: center;
color: #000000;
margin: 1em 0 0 0;
-webkit-hyphens:none;
}
span.emphasis {
font-weight: normal;
font-style: normal;
}
holdit is offline   Reply With Quote
Old 04-04-2013, 11:36 AM   #5
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by holdit View Post
I went ahead and added the font ZTimes New Roman to the Font folder of the E pub in Sigil. Added a stylesheet and created 3 styles, underline, underline bold and centerBold.

These are now visible in the published e pub and mobi

when I went to validate first I got the msg that "the font is in the manuscript but not used"

so I removed the font from the folder and now it says OEBPS/styles/fonts / timesNewRoman.ttf is reachable but not present in the manifest.

this is true as I deleted it but I was looking for instances of the font mentioned and cannot find anywhere in the e pub.

heres the .css code I used


@font-face {
font-family: Times New Roman;
font-style: normal;
font-weight: normal;
src:url("../Fonts/Times New Roman.ttf");
}

Common Sigil type error
theducks is offline   Reply With Quote
Old 04-04-2013, 11:41 AM   #6
holdit
Connoisseur
holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.
 
Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
Ok, So do I re add the font to the folder in Sigil? Or disregard the error and publish the file the way it is?

R
holdit is offline   Reply With Quote
Old 04-04-2013, 11:45 AM   #7
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by holdit View Post
Ok, So do I re add the font to the folder in Sigil? Or disregard the error and publish the file the way it is?

R
The font is OK
Edit your CSS to include the ../
Everything is relative to the container. that is why you have to back down the trunk to go out on another branch.
Text, Images,Styles,Fonts are all branches
theducks is offline   Reply With Quote
Old 04-04-2013, 03:26 PM   #8
holdit
Connoisseur
holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.holdit ought to be getting tired of karma fortunes by now.
 
Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
Fixed, thx

R
holdit is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
e-pub to pdf:- page size conundrum MrB Conversion 2 10-03-2012 09:42 AM
creating E pub page thumbnails ralphiedee ePub 6 04-06-2012 11:28 AM
PRS-T1 Adding two fonts into the CSS? WarGhSt Sony Reader 1 02-02-2012 01:41 AM
adding a CSS to a file BeccaPrice Calibre 8 09-18-2011 03:52 PM
Adding new chapter, what about CSS link? spaze Sigil 3 02-24-2011 05:35 AM


All times are GMT -4. The time now is 12:32 PM.


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