04-19-2012, 04:45 AM | #31 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
@DaleDe, thinking about that idea, the Sigil.css issue, what would happen, for example, thinking through the mechanics, if someone had two stylesheets? (We often do, as we build Kindle8-compatible ePUBs for our publisher clients, which they upload via eBookbase [essentially, although not actually] rather than the KDP [and thus, the ePUB must convert perfectly to K8 MasterMobi], and our experience is that 2 stylesheets, for the K7 & 8, work best.) Would the Sigil.css file simply be a third Stylesheet--or, for that matter, without overthinking it, would it be a second for those books that already have them? I mean, we've all imported books with existing stylesheets, or used an xhtml file that was in Book A (like, an "About this Author" page) in Book B and imported the stylesheet along with it, so my initial thoughts are that as long as the Sigil.css didn't supplant the existing, I'd think that might be a usable compromise solution. Personally, I think it's a little overhyped as a problem, simply being an internal ss, which is fairly easy to find/fix, BUT, if people using BV are having issues, then maybe it does need some sort of compromise. My $.02, FWIW. Hitch |
|
04-19-2012, 10:00 AM | #32 |
Resident Curmudgeon
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
|
Why is it that Tidy feels the need to modify full paragraph styles? The styles Tidy is messing with are perfectly legal styles. There is no need to change them. All it does is make it harder to edit the ePub as a whole. And the changes are not consistent throughout each XML where Tidy changes.
SGC-1 in chapter 1 could be bold where SGC-1 in chapter 2 could be italic. So there is no way to search/replace to fix this. And if you wanted to change things on a global level, you might not be able to. All this does is make it harder to work with the ePub (depending on what you want to do). Can this monkeying around with the Styles by Tidy be removed? Is the source code out there such that it can be deleted from within Tidy? |
04-19-2012, 11:32 AM | #33 |
Grand Sorcerer
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
|
@Hitch, yes a Sigil.css file would be in addition to whatever style sheets were already present. The idea is just to help ensure that SGC-1 always means the same thing wherever it is used so that JSWolf's problem would not occur. I have the exact same problem myself and even inside the same file after multiple edits of the file. This makes any kind of global change very difficult.
Having everything Sigil does in one file and inspecting the file for content before picking a new name for something that already exists would make things much better. Easier changes, more consistent recognition when looking at the code view. Dale |
04-19-2012, 06:03 PM | #34 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
04-19-2012, 06:13 PM | #35 |
Well trained by Cats
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
|
I have seen a small number of SGC tags appear (without my using any BV formatting) on books WITH stylesheets.
I have not pinned down why, there? Almost all include Bold and or Italic and many times a heading with other than default (no) style. |
04-19-2012, 06:23 PM | #36 |
Grand Sorcerer
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
|
I suspect they are being generated as part of things like centering a paragraph, at least this is one example I have seen. Also bold and italics showing up as SGC instead of being generated as inline b and em tags. I am not sure why they appear. I can't remember an SGC tag being automatically placed in a CSS file, instead I always find them in a style section within the head section of the file itself. I haven't played with post 5.0 versions to know if this is continuing but it certainly was in 4.2. I know I used to do this in page mode (WYSIWYG) before I realized it would sometimes do me in.
Dale |
04-20-2012, 02:25 AM | #37 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I only it see it when the style could be encapsulated. Examples:
Code:
<p><b>This is bold.</b></p> <p><i>This is italic.</i></p> |
04-20-2012, 05:47 AM | #38 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Sigil indubitably currently creates internal styles for each xhtml file, as would be absolutely correct coding if an external stylesheet does not already have the particular desired style covered. @toxie: I've not had that happen, when we have a stylesheet in place. I've only seen italic and bold tags cause internal ss entries when no stylesheet exists. You've seen differently? In recent Sigil releases? FWIW, Hitch |
|
04-20-2012, 07:40 AM | #39 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
With Tidy turned off I'm seeing absolutely no auto-creation of any internal styles. I never use any of Sigil's built in formatting capabilites (headings, bold, italic, indent, etc...), so I've been assuming that's why. Plus, as Hitch has already mentioned, I always have my own stylesheet in place (and linked). Perhaps that's part of it—I've not tested. All I know is I've not run into any auto-generated, inline Sigil styles in quite some time.
|
04-20-2012, 07:58 AM | #40 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
However, for me it is not really a problem. I only see 1 or 2 of them (usually only italic) and that is easy to fix before splitting the document. It is all depending on the source of course. If the source has no stylesheet or is a crappy HTML conversion, this can lead to serious work. |
|
04-20-2012, 09:57 AM | #41 | |
Resident Curmudgeon
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:
|
|
04-20-2012, 10:05 AM | #42 | |
Resident Curmudgeon
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:
Code:
/*<![CDATA[*/ div.sgc-2 {font-style: italic; font-weight: bold} div.sgc-1 {font-weight: bold} /*]]>*/ </style> Here is the original code. Code:
<div class="ct"><b>CHAPTER ONE</b></div> <div class="cst"><b><i>June 22, 1911</i></b></div> Code:
<body> <div class="ct sgc-1"> CHAPTER ONE </div> <div class="cst sgc-2"> June 22, 1911 </div> I have found a bug in Tidy's styling. I went into the CSS and changed the styles .ct to include bold and .cst to include both bold and italic. Tidy still created styles instead of seeing that the styles it created are not actually needed ad just deleting the bold and italic codes for .ct and .cst. Last edited by JSWolf; 04-20-2012 at 10:18 AM. |
|
04-20-2012, 10:29 AM | #43 |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
04-20-2012, 11:22 AM | #44 | |
Grand Sorcerer
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
|
Quote:
Dale |
|
04-21-2012, 03:18 AM | #45 |
Resident Curmudgeon
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
|
We could have it done both ways. When the file(s) are run past Tidy and Tidy wants to change things to add in new CSS style(s), it could ask if that's what we want to do.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do you turn off default text-indent <p> in Nook | DAntkowiak | Barnes & Noble NOOK | 9 | 07-11-2013 10:43 AM |
Tidy use and issue | DaleDe | Sigil | 7 | 06-19-2011 07:22 PM |
tidy still helping me - sigh... | bobcdy | Sigil | 2 | 12-19-2010 07:14 PM |
HTML Tidy problems | pdurrant | Sigil | 2 | 04-08-2010 07:38 AM |