Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-21-2010, 08:56 PM   #16
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Almiel View Post
Right! That's why when you do inline styles, sigil moves them up into the head of the document. I was just letting ws64 know that his example isn't valid... not to be a smarty pants: I just don't want someone reading that and thinking they can do styles that way, then wonder why they don't work.
And that someone would be me. I must admit I never realized you couldn't use inline styles, because Sigil always fixed it for me.

st_albert is offline   Reply With Quote
Old 08-22-2010, 02:07 PM   #17
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
If I can't write <p style='text-indent:.3in'> in a file intended as an epub, I will of course substitute <p> for the thousand or so iterations of that indent. But how do I then define the <p> in the stylesheet?

.p { text-indent:.3in; }

?

(Sorry, never paid much attention to stylesheets before!)
Oldpilot is offline   Reply With Quote
Advert
Old 08-22-2010, 02:32 PM   #18
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,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
p { text-indent: 0.3in; }

(note no dot) styles all <p> tags

p.noindent { text-indent: 0; }

styles only <p> tags with a "noindent" class, i.e., <p class="noindent">
Jellby is offline   Reply With Quote
Old 08-23-2010, 10:12 AM   #19
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
paragraph 'style'

Quote:
Originally Posted by Almiel View Post
FYI: You actually cannot use inline style tags in epubs. (Inline means using style="blahblahblah" inside of other tags.) I don't know why, maybe to decrease the amount of processing the readers have to do?...
Bother! All my Kindle editions use the paragraph tag <p style='text-indent:.3in'>

I'd like to hit upon a tag that works easily both for Kindle and for epub. Can I just substitute <p width='.3in'> or something similar? That would be a simple switch.

Thanks! Glad I found this forum. It's not so easy, making the conversion from Kindle to epub.
Oldpilot is offline   Reply With Quote
Old 08-23-2010, 11:28 AM   #20
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by Oldpilot View Post
Bother! All my Kindle editions use the paragraph tag <p style='text-indent:.3in'>
If you open an HTML file with paragraph tags like these into Sigil, it will automatically extract the styles into a CSS class and add the class to all the paragraphs.
Valloric is offline   Reply With Quote
Advert
Old 08-23-2010, 03:14 PM   #21
Ahmad Samir
Zealot
Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!Ahmad Samir , Klaatu Barada Niktu!
 
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
Quote:
Originally Posted by capidamonte View Post
FBReader ignores CSS too.
Well, AFAICS FBReader doesn't ignore all CSS rules. In fact I sometimes have to edit an epub to comment out some css rules so that I can control them on the fly from FBReader's settings (e.g. paragraph space before/after, line height.. etc).

FWIW I am running the latest svn snapshot of FBReader.
Ahmad Samir is offline   Reply With Quote
Old 08-23-2010, 10:53 PM   #22
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by Almiel View Post
FYI: You actually cannot use inline style tags in epubs. (Inline means using style="blahblahblah" inside of other tags.) I don't know why, maybe to decrease the amount of processing the readers have to do?...
Almiel, are you saying I can't just stick <hr width="35%"> in between two paragraphs in code view like WS64 suggested?

Why not? It does work. The horizontal rule shows up in both Calibre's viewer and on my iPod Touch.

Or are you simply saying it's not standard and could possibly cause issues with the epub file in the future?

I do not know coding which is why I like Sigil's wysiwig interface as well as the simple solution for a horizontal rule.
PatNY is offline   Reply With Quote
Old 08-24-2010, 06:35 AM   #23
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by Valloric View Post
If you open an HTML file with paragraph tags like these into Sigil, it will automatically extract the styles into a CSS class and add the class to all the paragraphs.
Thanks, good to know!
Oldpilot is offline   Reply With Quote
Old 08-24-2010, 08:20 AM   #24
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 660
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
Quote:
Originally Posted by PatNY View Post
Almiel, are you saying I can't just stick <hr width="35%"> in between two paragraphs in code view like WS64 suggested?

Why not? It does work. The horizontal rule shows up in both Calibre's viewer and on my iPod Touch.

Or are you simply saying it's not standard and could possibly cause issues with the epub file in the future?

I do not know coding which is why I like Sigil's wysiwig interface as well as the simple solution for a horizontal rule.
Like I wrote you should put the center part in the header.
Enhance the STYLE comment with the hr command, like this:

<style type="text/css">
hr {width:35%}
</style>

(you will probably see more statments there)

If you do that you can just use <hr /> in your documents, and everything is valid.
WS64 is offline   Reply With Quote
Old 08-24-2010, 09:09 PM   #25
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
Quote:
Originally Posted by WS64 View Post
Like I wrote you should put the center part in the header.
Enhance the STYLE comment with the hr command, like this:

<style type="text/css">
hr {width:35%}
</style>

(you will probably see more statments there)

If you do that you can just use <hr /> in your documents, and everything is valid.
You mean at the top of each html file? So if I have a separate file for each chapter in a book I have to add that to the top of each file in addition to adding in "<hr/"> between sections? If so, I'll use it sparingly and just stick with the asterisks for section breaks.
PatNY is offline   Reply With Quote
Old 08-24-2010, 10:37 PM   #26
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,818
Karma: 54830978
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 PatNY View Post
You mean at the top of each html file? So if I have a separate file for each chapter in a book I have to add that to the top of each file in addition to adding in "<hr/"> between sections? If so, I'll use it sparingly and just stick with the asterisks for section breaks.
Or put it in the stylesheet.

Code:
hr.ch{
	/* text-align: center; */
	color: black;
	background-color: black;
	width: 25%;
	height: 5px;
	border: 0
	}
note I defined a HR class of ch    /*chapter head */

<hr class-"ch" />

that allows for other uses of HR with different attributes

Also not that you can not center(or other alignment) a HR in (buggy)ADE this way :(
You need to wrap the in a centered <div class+"centered"> <hr />  </div>
theducks is online now   Reply With Quote
Old 08-24-2010, 10:41 PM   #27
capidamonte
Not who you think I am...
capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
capidamonte's Avatar
 
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
Quote:
Originally Posted by Ahmad Samir View Post
Well, AFAICS FBReader doesn't ignore all CSS rules. In fact I sometimes have to edit an epub to comment out some css rules so that I can control them on the fly from FBReader's settings (e.g. paragraph space before/after, line height.. etc).

FWIW I am running the latest svn snapshot of FBReader.

Okay, FBReader ignores nearly all CSS. What it doesn't do is present a document largely as it has been styled. Whatever it does obey is probably just a way to annoy those people who aren't annoyed enough by what it ignores.
capidamonte is offline   Reply With Quote
Old 08-24-2010, 11:16 PM   #28
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
theducks, thanks for the clarification and the code. That's easier.
PatNY is offline   Reply With Quote
Old 09-07-2010, 04:37 PM   #29
Nathanael
Groupie
Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.
 
Posts: 185
Karma: 1110435
Join Date: Jul 2010
Location: Shanghai, China
Device: Sibrary G5
Quote:
Originally Posted by capidamonte View Post
Okay, FBReader ignores nearly all CSS.
Also not true. FBReader is one of the viewers I use regularly to check my work. I use stylesheets for all my styling (even the stuff Sigil puts in headers eventually gets moved to a stylesheet), and FBReader adequately displays almost everything I do. No it doesn't support the full CSS spec, but I've yet to find a viewer that does (save for Ibis or Bookworm, but those are online apps).

Quote:
What it doesn't do is present a document largely as it has been styled.
Do you have specific examples? So far, I've been pretty satisfied with it.

--Nathanael
Nathanael is offline   Reply With Quote
Old 09-07-2010, 04:58 PM   #30
Nathanael
Groupie
Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.Nathanael ought to be getting tired of karma fortunes by now.
 
Posts: 185
Karma: 1110435
Join Date: Jul 2010
Location: Shanghai, China
Device: Sibrary G5
Quote:
Originally Posted by theducks View Post
Also not that you can not center(or other alignment) a HR in (buggy)ADE this way
Really? Now that's interesting. Since center is the default for <hr>, you shouldn't have to do anything to center it. Is ADE really that broken?

--Nathanael
Nathanael is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TOC Creation & Calibre vs. MobiPocket Themus Calibre 8 05-15-2010 11:32 AM
Epub to Mobi & TOC Nate the great Calibre 12 10-01-2009 03:33 PM
More TOC questions AlexBell Calibre 24 08-12-2009 02:59 AM
PDF & TOC on Calibre thibaulthalpern Calibre 3 04-18-2009 03:45 PM
Bood Designer - horizontal bars & TOC editing DoctorBri Sony Reader 5 09-17-2007 10:33 AM


All times are GMT -4. The time now is 09:37 PM.


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