Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 02:04 PM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,489
Karma: 212177546
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
When is denest being used? Is it just when parsing/rendering the css, or is the css file actually being rewritten?

I'm wondering if "Go to Link or Style" is going to work properly on nested css if it's only being denested when parsing/rendering. I'm sure I'm missing something, but I would think it would be hard for the cursor to be placed properly if that's the case.
DiapDealer is offline   Reply With Quote
Old Yesterday, 02:33 PM   #17
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 575
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
I... don't understand any of the preceding. I'm going to venture a guess that it means your turbo encabulator was not effectively deploying its sinusoidal depleneration failsafes. But I'm gratified to learn that I wasn't going crazy or that my css had a secret bug that would require my going back and fixing hundreds upon hundreds of ePubs. My soul is at peace.

I assume that "Sigil master" is a dev tool, and that any fixes will be applied to 2.8.x, so I should stick with 2.7.6 for now, yes?
ElMiko is offline   Reply With Quote
Old Yesterday, 02:48 PM   #18
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,701
Karma: 6774572
Join Date: Nov 2009
Device: many
Sigil's "Go to link or style" will never work if the user has nested css and does not reformat its css to denest it using Sigil beforehand. But nested css is so rare right now that I am okay with that. The idea was if Go To Link Or Style ever fails, then the code should be denested first (given the last bugfix just now in master) that now works!

The CSSDenest code is invoked by the qCSSParser right before parsing the css. The CSSInfo code uses the qCSSParser to parse a css file to find the line number of each selector (not just classes). The Go To Link or Style runs the CSSInfo code (that uses qCSSParser and CSSDeNest to create a list of all selectors and their starting line numbers and positions in the file) to determine which line of the css file to move to.

At some point in the future, Sigil will autorun the CSSDenest process on first load of any css file and save it. It should change absolutely nothing if the CSS stylesheet uses no nesting (but the bug just fixed was that it added newlines). I was not 100% sure of the denest code and decided using it in qCSSParser was enough until nested css became more common and then moving it to the epub import and add existing stage.

Hope that makes things clearer.
KevinH is offline   Reply With Quote
Old Yesterday, 02:49 PM   #19
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,489
Karma: 212177546
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by ElMiko View Post
I assume that "Sigil master" is a dev tool, and that any fixes will be applied to 2.8.x, so I should stick with 2.7.6 for now, yes?
Yes. Especially if that feature is important to you. I'm guessing that we'll get a chance to fix a few more bugs before a new release. Thanks for the details to help track this one down!
DiapDealer is offline   Reply With Quote
Old Yesterday, 02:49 PM   #20
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,489
Karma: 212177546
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Sigil's "Go to link or style" will never work if the user has nested css and does not reformat its css to denest it using Sigil beforehand. But nested css is so rare right now that I am okay with that. The idea was if Go To Link Or Style ever fails, then the code should be denested first (given the last bugfix just now in master) that now works!

The CSSDenest code is invoked by the qCSSParser right before parsing the css. The CSSInfo code uses the qCSSParser to parse a css file to find the line number of each selector (not just classes). The Go To Link or Style runs the CSSInfo code (that uses qCSSParser and CSSDeNest to create a list of all selectors and their starting line numbers and positions in the file) to determine which line of the css file to move to.

At some point in the future, Sigil will autorun the CSSDenest process on first load of any css file and save it. It should change absolutely nothing if the CSS stylesheet uses no nesting (but the bug just fixed was that it added newlines). I was not 100% sure of the denest code and decided using it in qCSSParser was enough until nested css became more common and then moving it to the epub import and add existing stage.

Hope that makes things clearer.
Got it. That makes sense. Thanks!
DiapDealer is offline   Reply With Quote
Old Yesterday, 02:59 PM   #21
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,701
Karma: 6774572
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by ElMiko View Post
I... don't understand any of the preceding. I'm going to venture a guess that it means your turbo encabulator was not effectively deploying its sinusoidal depleneration failsafes. But I'm gratified to learn that I wasn't going crazy or that my css had a secret bug that would require my going back and fixing hundreds upon hundreds of ePubs. My soul is at peace.

I assume that "Sigil master" is a dev tool, and that any fixes will be applied to 2.8.x, so I should stick with 2.7.6 for now, yes?
Sigil's source code is stored in a github repository where many parallel development streams can be remembered automatically and periodically merged. The main "development stream" is referred to as the "master" branch.

Yes, that branch will be used as the basis for all development of the next Sigil release. That way the fix for your bug is never lost.

And yes, you have two choices: 1) revert to Sigil 2.7.6 or 2) wait for some kind soul that builds from current master to post an updated Sigil 2.8.0 version for you to use. DNSB has posted many such builds to help users in our new features request thread. We can also make a CI build available to you that includes the fix. If additional more dangerous bugs are found and reported in Sigil 2.8.0, then we usually make a fast-follow-on release to get that out there for users, but that is not planned for this bug since being off by a few lines when searching for a class name is not a dangerous issue.
KevinH is offline   Reply With Quote
Old Yesterday, 03:05 PM   #22
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,701
Karma: 6774572
Join Date: Nov 2009
Device: many
Or what DiapDealer just said!

ps. And yes, thank you for your detailed bug report with sample epub with instructions!
Those really help.

Last edited by KevinH; Yesterday at 03:48 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 04:24 PM   #23
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 52,291
Karma: 180577194
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For anyone who is interested, I've attached a link to a Sigil build for Windows with the DeNest bug fixed. In my testing, using either F3 or ctrl-click on a style in the XHTML file, opened the CSS file with the cursor at the start of the style.

Link to Sigil-2.8.0-Windows-x64-Setup.exe.
DNSB is offline   Reply With Quote
Old Yesterday, 04:37 PM   #24
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,701
Karma: 6774572
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DNSB View Post
For anyone who is interested, I've attached a link to a Sigil build for Windows with the DeNest bug fixed. In my testing, using either F3 or ctrl-click on a style in the XHTML file, opened the CSS file with the cursor at the start of the style.

Link to Sigil-2.8.0-Windows-x64-Setup.exe.
Thank you!
KevinH is offline   Reply With Quote
Old Yesterday, 04:57 PM   #25
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 52,291
Karma: 180577194
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
You're welcome.
DNSB is offline   Reply With Quote
Old Yesterday, 05:01 PM   #26
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 575
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by DNSB View Post
For anyone who is interested, I've attached a link to a Sigil build for Windows with the DeNest bug fixed. In my testing, using either F3 or ctrl-click on a style in the XHTML file, opened the CSS file with the cursor at the start of the style.

Link to Sigil-2.8.0-Windows-x64-Setup.exe.
When's your next show? You're a rockstar.
ElMiko is offline   Reply With Quote
Old Yesterday, 06:53 PM   #27
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 52,291
Karma: 180577194
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ElMiko View Post
When's your next show? You're a rockstar.
Since I already compile the latest updates for my use and testing, it takes very little time to upload the executable and create the link. I think of it as paying forward the help I received from many MobileRead members when I first joined.

It also makes it easier to find bugs such as the one you found with more eyes looking for issues.
DNSB is offline   Reply With Quote
Old Yesterday, 07:02 PM   #28
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,701
Karma: 6774572
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DNSB View Post
It also makes it easier to find bugs such as the one you found with more eyes looking for issues.
Absolutely. I tested the CSSDeNest code repeatedly but only looking to see if it ever broke valid CSS and I did not even think about it being used in Go To Link or Style! The extra introduced newlines never in any way interfered with the interpretation of the css, so it looked like it was good to go. I had no idea that the extra newlines even existed and that each newline would mess up selector position (line) calculations.

The more people using the latest version the better for finding bugs. Very few people heavily test betas so most bugs are initially missed given the complex interface of Sigil.

Last edited by KevinH; Yesterday at 08:47 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 09:08 PM   #29
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 575
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
I'm wondering now.... It used to be back in ye old days (0.7.2) that if your cursor was in an element with an as yet undefined class and you hit F3, it would jump to the element-level css.

So, for example, let's say I had <p class="sigil">, and "sigil" was not yet defined in the stylesheet, but the p element was. Putting the cursor on "sigil" and hitting F3 would not take you to the top of the stylesheet (as it currently does when the class is undefined) but rather it would take you to the next relevant defined component, namely the p.
ElMiko is offline   Reply With Quote
Old Yesterday, 09:18 PM   #30
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,701
Karma: 6774572
Join Date: Nov 2009
Device: many
As far as I remember the code, it should first look at element and class, then at class. But not just an element if a class attribute existed. Not sure what happens if no class attribute at all is provided. The issue is many complex selectors and compound selectors are possible matches which the old Sigil knew nothing about.

If you want to see what css is being applied by all selectors (not just classes), then open the Preview's Inspector and the full css that was used to define that element's style is shown and where each part is defined.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Title Case not working on "the" "a" "in" etc mike the leg Library Management 9 11-06-2023 09:27 AM
Bug: Automater substitution of "and" with "&" in author field mikebw Library Management 2 04-15-2019 03:39 AM
"Doghouse Diaries" and "PHD Comics" not working frakman1 Recipes 0 08-22-2014 11:32 AM
Creator taking control of the "first page" link in the "content" menu cyberbaffled Kindle Formats 2 07-11-2010 04:21 PM
BUG: GUI View button not working if Author tag contains "ë" ShellShock Calibre 1 11-15-2008 01:21 PM


All times are GMT -4. The time now is 06:58 AM.


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