Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 12-09-2013, 05:09 PM   #271
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,816
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 jackie_w View Post
Allow me to enlighten, then
1. Open the html file you want to split.
2. Press the little 'snapdragon' icon, 3rd from left, below the Preview pane.
3. Move mouse over Preview and a green horizontal line appears
4. Once it's in the place you want to split, left-click mouse.
5. Admire the ease and simplicity!

I was looking for something in Code View
(FWIW Preview is usually a easier place to do it)
theducks is offline  
Old 12-09-2013, 05:33 PM   #272
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by jackie_w View Post
The nbsp BookCheck error is (I think) because it is a named entity and the html file does not have a DOCTYPE.
Nope, all html files have Doctype sentence. I'm viewing a book that has been previously edited with Sigil which ALWAYS adds that sentence.

Quote:
Originally Posted by jackie_w View Post
The xpgt error may be because it isn't normally called by an @import into css but instead as a
<link href="../Styles/page-template.xpgt" rel="stylesheet" type="application/vnd.adobe-page-template+xml"/> statement in the header of each html file.
Well, I've found both methods in different books. HTML linking is more frequent but in this case CSS linking is used. But as I said the weirdest thing is that I ALWAYS comment out page-template references (in either CSS or HTML) because I hate additional margins on ebooks (which are nearly always included in page-template.xpgt).
arspr is offline  
Old 12-09-2013, 05:39 PM   #273
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@arspr: As is mentioned in the welcome text on the preview screen, page breaks, page margins and embedded fonts whose font-family names in the css dont match the font-family names inside the actual font will not work in the preview.
Sorry I missed that info. My fault.

Just a question, is this going to be final or do you plan to add a "full" preview sometime in the future?
arspr is offline  
Old 12-09-2013, 05:45 PM   #274
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by arspr View Post
Nope, all html files have Doctype sentence. I'm viewing a book that has been previously edited with Sigil which ALWAYS adds that sentence.
Maybe my reason is wrong but the solution is the same. If you click the 'Try to correct' option, the nbsp entities get converted to unicode, the DOCTYPE is removed and the errors go away. I've noticed that calibre never creates DOCTYPEs in conversions but I don't know the background to this decision.
jackie_w is offline  
Old 12-09-2013, 05:54 PM   #275
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by jackie_w View Post
Maybe my reason is wrong but the solution is the same. If you click the 'Try to correct' option, the nbsp entities get converted to unicode, the DOCTYPE is removed and the errors go away. I've noticed that calibre never creates DOCTYPEs in conversions but I don't know the background to this decision.
For sure, &nbsp;s are substituted. You've been discussing a lot about it. And then, as there are no more &nbsp;s, there are no more warnings about them.

BUT, the possible issue which Kovid should know about is that &nbsp;s cause a lot of warnings and I don't know if that is the intended behaviour because AFAIK &nbsp; is a perfect valid statement inside epubs, isn't it?

More over, Check Book only gives you one error per file, (I find this behaviour quite logical). In this way the very first &nbsp; masks any other possible "real" bug after it.

Last edited by arspr; 12-09-2013 at 06:00 PM.
arspr is offline  
Old 12-09-2013, 06:01 PM   #276
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
I've been playing around with the Tweak Book function. It looks very nice

A bug, it seems:

Shortcuts not sticking (tested with Split function). I add a shortcut and press "Done", and the shortcut is shown. I press "OK", but the shortcut does not work. Upon returning to the Shortcut window, the shortcut is gone. If there was a different shortcut before customizing it, the previous shortcut is shown.

edit: The shortcut DOES stick, but it only works and shows up after restarting ebook-tweak.

There are some questions:

1. Is it possible to make the font in the preview window smaller? CTRL+Scroll, or CTRL-minus does not do anything, and I didn't see any options. The font is huge.
2. Is there a way to open the table of contents to use it for navigation?
3. What purpose does the inspector serve? It seems to provide a lot of information, but I can't think of a use for it for ebooks; it could be useful for a big website, but most ebooks seem to be too simple to need it.
4. If someone has the preview disabled, is there still another way to split a file? While it is a very intuitive way of splitting, I can imagine that there are people who'd like a Sigil-like "Split at cursor" option in one of the menu's to use in combination with code view.

And a suggestion:

Move the toolbar in the preview to the top, or make it a toolbar that can be displayed below the menu, next to the other ones. Personally, I always find toolbars on the bottom of windows weirdly placed, but this is a matter o taste of course.

Last edited by Katsunami; 12-09-2013 at 06:06 PM.
Katsunami is offline  
Old 12-09-2013, 06:08 PM   #277
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by Katsunami View Post
3. What purpose does the inspector serve? It seems to provide a lot of information, but I can't think of a use for it for ebooks; it could be useful for a big website, but most ebooks seem to be too simple to need it.
Wow, I do use it a lot.

In complex ebooks with a lot of cascaded styles (redundancy here) you can easily check what settings are being applied, which are overridden and why you have that behaviour.

And it also helps you locating typos when you edit CSS styles. If it correctly appears in inspector you've really done it right.
arspr is offline  
Old 12-09-2013, 09:45 PM   #278
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Katsunami: The font size in the preview panel comes from the book. If the book specifies no font size then it comes from the font size settings in the calibre viewer. Decrease those if you want the font size smaller.

@arspr: named entities are illegal in XML without a doctype that defines those entities (apart from the five named XML entities). If a doctype is present then they will cause no errors, however, the checker in calibre will still report errors since otherwise it would have to download the DTD from the network and validate the entities with it, which is too slow. calibre removes all doctypes and converts all entities to unicode characters whenever it does any automated processing. That is not going to change. And no there is never going to be a "full" preview with support for page layout. When checking links in css calibre does not ignore links inside comments. I may change that in the future, or not. Depends on how common commented links in css files turn out to be.

If you want to search for any unicode character, simply copy paste it from the text into the find field. At some point I will add a character entry tool like sigil has, however, most operating systems already have tools to enter special characters, you should be able to use those. Also note, that you can enter named entities like normal in the editor. They will be replaced with unicode characters automatically when saving the book.

Last edited by kovidgoyal; 12-09-2013 at 11:14 PM.
kovidgoyal is offline  
Old 12-09-2013, 10:22 PM   #279
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually, regarding named entities, I think I am going to have the checker simply ignore them when checking for well-formed XML. Any named entities will be reported separately as an error (once per HTML file, with an option to auto-replace them with unicode characters with a single click).
kovidgoyal is offline  
Old 12-09-2013, 10:48 PM   #280
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Quote:
Originally Posted by kovidgoyal View Post
Actually, regarding named entities, I think I am going to have the checker simply ignore them when checking for well-formed XML. Any named entities will be reported separately as an error (once per HTML file, with an option to auto-replace them with unicode characters with a single click).
This sounds like the way to go.
mrmikel is offline  
Old 12-10-2013, 04:00 AM   #281
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I implemented the separate handling for entities, seems to work well. The XML parser ignores the entities, treating them as whitespace and they are analyzed and reported separately.

@arspr: I decided to fix links inside comments in stylesheets, for the next release.
kovidgoyal is offline  
Old 12-10-2013, 08:59 AM   #282
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Kovid, would it be out of order to put out a call for people to put their worst pieces of malformed junk that made Sigil barf into your new editor?

It might be a good time to test out how it responds to really badly formed junk, since it seems to be nearing initial prime time.
mrmikel is offline  
Old 12-10-2013, 09:01 AM   #283
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sure, junk that causes failures is most welcome.

Last edited by kovidgoyal; 12-10-2013 at 09:13 AM.
kovidgoyal is offline  
Old 12-10-2013, 09:04 AM   #284
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
LOL

That sounds so wrong...
Katsunami is offline  
Old 12-10-2013, 11:56 AM   #285
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
A REAL trouble I once suffered within a book and one that I've checked that the new Check Book doesn't inform you about either...

Remove the closing "}" from any style... It can drive you nuts as there's no information about something strange. And till the next closing "}" you have trouble in both styles. (I suffered it in the middle of font declaration statements and I got crazy till I located what the hell happened in the book.).

I think it could be a good idea that, if parser finds an "entry/entity" inside any other one, it should arise a warning.


Another one I haven't suffered but I think it can be REALLY easy to have. Remove the closing ";" from any property (but final one). Then you have trouble inside a style. And Check Book doesn't tell you anything about it.

This situation would be a good catch too.

Quote:
Originally Posted by kovidgoyal View Post
And no there is never going to be a "full" preview with support for page layout.
OK, I suppose page layout support is fully pointless. But, please, could you implement full font support? Fonts not being used because of their "conflictive" names can be REALLY distracting and completely user-unfriendly. I fear you are going to receive a lot of complaints, like my original one, about "My font doesn't render" despite all the warnings you put in the tool opening.



And another suggestion related to the ";" issue. Currently, Beautify CSS removes the last ";". As a safety measure I would do the opposite action, I would always add it even if not necessary...

Last edited by arspr; 12-10-2013 at 12:04 PM. Reason: Beautify and last ";" in CSS styles
arspr is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Sigil live varlog Sigil 136 10-25-2013 02:34 PM
how many tocs does Sigil make? Gregg Bell Sigil 17 01-31-2013 09:39 AM
How do I make all .pdf's in my calibre library open in calibre instead of preview morbo3000 Library Management 9 07-30-2011 10:39 AM
using sigil to make changes befote conversion alansplace Sigil 11 06-07-2011 07:50 AM
i can't make sigil run in fedora 14 nastarovia Sigil 1 01-20-2011 05:02 AM


All times are GMT -4. The time now is 10:49 AM.


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