Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-27-2011, 01:45 PM   #106
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Captalize first word

This seems to be a related area to ask this question.

Is there a way (regex???) to captalize the first word of a paragraph?

The ePub uses
Code:
<span class="smcap">word<span>
This does not work for MOBI, but
Code:
<small>WORD</small>
would work fine if each word was all caps.

I have tried all I know () and searched all manuals and google with no luck. In a book with 50 chapters, manual changing works but is stupifying.

What say the experts?
crutledge is offline   Reply With Quote
Old 02-27-2011, 02:01 PM   #107
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
OK... sorry for the delay in replying to your post (#103) cybmole. Had to spend time on other stuff for much of today.

I'm going to have to amend this bit of my understanding of how CSS works in practice.

When something I'm working on goes against what I'd expect to see, I:
  1. suspect human error (faulty syntax, missing punctuation, etc).
  2. check that something else isn't causing the unexpected result.
  3. create a test file that isolates the suspected cause, so that I can test if that's really what's causing it, beyond any doubt.
I apply this process to my own work, as well as to what others are working on. From the posts you wrote yesterday, cybmole, it seemed like you were changing lots of stuff in the HTML and CSS, but only copying and pasting a small fragment of each in your posts here, so it wasn't possible for me or theducks to check a or b. I suggested you create a test file to verify what was happening. I've done that today, so we can all be clear on what's going on.
  1. Firefox 3.6, Internet Explorer 8 and Sigil 0.3.2 all appear to rely on the order in which the CSS styles occur in the stylesheet, and ignore the order in which the classes are listed in the CLASS attribute.
  2. Calibre 0.7.46 does the same with the EPUB file.
  3. Adobe Digital Editions 1.7, however, does the opposite - it ignores the order in which the styles are listed in the stylesheet, and relies on the order in which the classes are listed in the CLASS attribute.
So... it would seem that the best approach would be to do both - ensure that, in the style sheet, more general styles come first, followed by specific variations, and, in the HTML, list multiple classes starting with the more general and ending with those relating to specific variations on the general style.

I'm really really surprised by this. You seemed to think, cybmole, that theducks and I were just tossing out info we weren't sure of as if it was hard fact, but I never say "xyz is true" unless I got the info from an excellent authority or verified it for myself - if I'm unsure about something, I say so (and while I don't want to put words into someone else's mouth, I'm pretty sure theducks would say the same thing).

I'm sorry that it turns out we were misleading you on this one, cybmole. I'm still trying to figure out if I always had this wrong, or if something changed at some point in how CSS is handled, and I simply never picked up on it.

I've attached the following files:
  • The test HTML file I created (uploaded as a text file).
  • The resulting EPUB file.
  • Screenshots of how these files display in the applications I listed above.
Attached Thumbnails
Click image for larger version

Name:	cssorder3-html-firefox.jpg
Views:	228
Size:	126.9 KB
ID:	67474   Click image for larger version

Name:	cssorder3-html-ie8.jpg
Views:	226
Size:	97.1 KB
ID:	67475   Click image for larger version

Name:	cssorder3-html-sigil.jpg
Views:	214
Size:	116.4 KB
ID:	67476   Click image for larger version

Name:	cssorder3-epub-calibre.jpg
Views:	235
Size:	89.0 KB
ID:	67477   Click image for larger version

Name:	cssorder3-epub-ade.jpg
Views:	227
Size:	65.3 KB
ID:	67478  
Attached Files
File Type: epub cssorder3.epub (2.1 KB, 196 views)
File Type: txt cssorder3.txt (2.6 KB, 272 views)
DMSmillie is offline   Reply With Quote
Advert
Old 02-27-2011, 02:51 PM   #108
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
I really appreciate you looking into this & confirming what I was finding.

I have only a general programming background - no great knowledge of css as such, but an understanding of how interpreters work in general, & of how specific implementations of anything can vary from a theoretical absolute spec.

I was unable to post more than the extracts because of forum copyright rules - I tried to post the relevant bits each time but as you say I could have been omitting relevent changes.

I did follow up on some of the recommended reading, after asking for suggested books / sites but I never found anything specific/definitive on whether css order should matter, or not; also for actual final reading I convert to .mobi for Kindle which is a whole new ball game.

I am happy that we've truly bottomed this issue out for now & can finally put the thread to rest - I've certainly learnt a lot from is so thathnkyou both for your help & patience.
cybmole is offline   Reply With Quote
Old 02-27-2011, 02:55 PM   #109
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by crutledge View Post
This seems to be a related area to ask this question.

Is there a way (regex???) to captalize the first word of a paragraph?

..

I have tried all I know () and searched all manuals and google with no luck. In a book with 50 chapters, manual changing works but is stupifying.

What say the experts?
this should in a different thread - in fact there are threads on this , either here or in calibre forum. other discussions conclude there is no way to change capitalisation via regex. - but please use a new thread, this one is long enough already!
cybmole is offline   Reply With Quote
Old 02-27-2011, 03:44 PM   #110
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Quote:
Originally Posted by cybmole View Post
I really appreciate you looking into this & confirming what I was finding.
It's fine - I really do prefer to know and understand what's going on with stuff like this.

Quote:
Originally Posted by cybmole View Post
I have only a general programming background - no great knowledge of css as such, but an understanding of how interpreters work in general, & of how specific implementations of anything can vary from a theoretical absolute spec.
Heh... I know what you mean. I spent most of my time from 2001 to 2008 figuring out how browsers actually interpret HTML and CSS in order to provide accurate advice to web developers looking to make their websites more accessible.

Quote:
Originally Posted by cybmole View Post
I was unable to post more than the extracts because of forum copyright rules - I tried to post the relevant bits each time but as you say I could have been omitting relevent changes.
Yes - I didn't intend that to sound quite so like a criticism. Was just meant to be pointing out that it meant there was no way for me or theducks to check or verify if something elsewhere in the HTML or CSS might be impacting on what was happening.

Quote:
Originally Posted by cybmole View Post
I am happy that we've truly bottomed this issue out for now & can finally put the thread to rest - I've certainly learnt a lot from is so thathnkyou both for your help & patience.
Well, I learned something new, too so thank you for highlighting the issue, cybmole.
DMSmillie is offline   Reply With Quote
Advert
Old 02-27-2011, 07:45 PM   #111
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,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
No problem here. (and I learned something. The CSS -class rules are not as solid as I believed )


I rather gathered that there was copyright issues, that you were being very good about honoring the boards' rules

I always test on my reader (after all, that is the intended target ),
I am used to things that look great ('my way') in Sigil, Calibre-viewer, don't always look so good in ADE

I don't even toss in targeting a covert to another format
theducks is online now   Reply With Quote
Old 02-27-2011, 08:48 PM   #112
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
If the only difference is position and not hierarchy then what you observe would have to happen. i.e. The software has not way to determine the cascade since they are all at the same level then it must have some deterministic way to choose which one to use. Whether or not the specs include a definition the software has to choose. You have determined that the software does choose. What else is to be expected?

Dale
DaleDe is offline   Reply With Quote
Old 02-28-2011, 02:46 AM   #113
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by theducks View Post
No problem here. (and I learned something. The CSS -class rules are not as solid as I believed )


I rather gathered that there was copyright issues, that you were being very good about honoring the boards' rules

...:
yes when I learn a new styling trick I like to practice on lots of different sources.

my latest challenge is swapping hyphens for &mdash; but many books use the same character for both contexts, so I don't yet see how to automate i.e. spot the difference between a well-hyphenated word-and a separate clause.

if you have any good ideas for that we should start a new thread.
cybmole is offline   Reply With Quote
Old 08-11-2011, 01:15 AM   #114
freewheeing
Junior Member
freewheeing began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2011
Device: Kindle 2
Quote:
Originally Posted by DMSmillie View Post
Actually, Amazon doesn't provide any - leaves it entirely up to the author to decide how they want to format their books. It results in many posts to the Amazon Kindle publishing forums asking how books should be formatted, from prospective authors feeling unsure about what is "best".

Having said that, however, if you submit essentially unformatted HTML via the KDP interface, or email it to your Kindle for automatic conversion, Amazon's system will default to formatting it with a paragraph first line indent and no space between paragraphs.
Well, I was fine with paragraphs spacing until you guys started talking about it. :-) Actually, I'm in academia and have always preferred a line to indents because it's easier to read and grade a hundred papers on a weekend that way. The indents throw me off.
freewheeing is offline   Reply With Quote
Old 08-11-2011, 07:39 PM   #115
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,897
Karma: 128597114
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 freewheeing View Post
Well, I was fine with paragraphs spacing until you guys started talking about it. :-) Actually, I'm in academia and have always preferred a line to indents because it's easier to read and grade a hundred papers on a weekend that way. The indents throw me off.
The easiest to read format for a book is paragraph indents of 1em-1.2em. 5% as most publishers use is too big. No line spaces. Just the next paragraph. That will look good.
JSWolf is offline   Reply With Quote
Old 08-11-2011, 08:50 PM   #116
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 crutledge View Post
This seems to be a related area to ask this question.

Is there a way (regex???) to captalize the first word of a paragraph?
This will be simple when Sigil implements the PCRE Regex engine.



Quote:
Originally Posted by freewheeing View Post
Well, I was fine with paragraphs spacing until you guys started talking about it. :-) Actually, I'm in academia and have always preferred a line to indents because it's easier to read and grade a hundred papers on a weekend that way. The indents throw me off.
Spaced paragraphs are entirely correct for technical works, and are definitely superior for works where the text is interspersed with a lot of equations or figures, which cause the text to be spaced out anyway and each paragraph represents a single, clearly-defined message. You read a paragraph, digest what it's said, then move on to the next. Since the standards used on the web were designed by people coming from a technical background, this method became the default.

Narrative text, on the other hand works differently. The 'sense' of the text isn't partitioned off so neatly in individual paragraphs, but flows between them, and paragraphs often merely represent differing aspects of the same underlying sequence. Think of a conversation, for instance: the individual paragraphs only make sense when read in context with the surrounding text. Using indents rather than vertical space respects this and helps the reader digest the text as a coherent sequence rather than as a set of packaged ideas.

Narrative text does use paragraph spacing at a scene break, where the author wants to convey the sense that this is now a new narrative sequence.
charleski is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indents! Please Help! Ephraim Sigil 8 11-23-2010 03:43 PM
Margins and Indents sloecoach Calibre 2 09-26-2010 04:41 PM
Display of Hanging Indents crutledge Workshop 1 09-25-2009 06:09 PM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 10:37 AM
Hanging indents? llasram Kindle Formats 11 01-05-2009 10:59 AM


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


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