Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2014, 09:19 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
standalone and the editors

Hi

One of the good things about switching from one editor to another (here from Sigil to the calibre's Editor) is that you have to look at some things you never looked at before and took for granted. This is about the xml declaration:
- The calibre Editor does not use willingly named entities like &bsp;
So it does not use a DOCTYPE, and does not even need to include a useless standalone="no" in the XML declaration. Fine.
- This behaviour triggers a mistake in Sigil's display. For a reason: Sigil accepts the use of named entities (among others  ), which requires a DOCTYPE, and even adds systematically a standalone element when you open a document with it.

It seems like when a couple is fighting for the same cover on a cold night... The latter is always right. Happily regexes and a clever option in the Editor help us find a solution.

I only have one question about it. It's important for French as a 100 000 word book may include close to 10 000 nbsp; or their utf-8 equivalents.

If I keep using &bsp; in my books, I will of course need to insert a DOCTYPE, but do I need also to insert a standalone="yes" element in the XML declaration?

Last edited by roger64; 04-03-2014 at 09:38 PM.
roger64 is offline   Reply With Quote
Old 04-04-2014, 07:03 AM   #2
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
You only need it if it is expressed as an entity. The calibre editor turns it into the unicode character. You should be able to select it from the insert special character button or Edit, insert special character.

If you type the text form then it disappears but is there in the unicode form, which you can tell by cursoring along and looking at the readout at the lower right of your screen.
mrmikel is offline   Reply With Quote
Advert
Old 04-04-2014, 08:45 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
The utf-8 character for nbsp is displayed by the calibre Editor as a small orange rectangle. One can count it separately from the "traditional"   and perform a search/replace from one to another.

Take an average EPUB made with Sigil with named entities   and DOCTYPE: Opening it with the calibre's Editor, if you select "fix html" or "Beautify", or if you merge some chapters, the DOCTYPE disappears and the named entities   are replaced by the orange rectangle. The standalone element disappears also from the XML declaration.

It's possible to come back to the initial situation using some regexes but it is still unclear for me what to write exactly in the XML declaration: the choice being between standalone='yes' or nothing.

Last edited by roger64; 04-04-2014 at 09:38 AM.
roger64 is offline   Reply With Quote
Old 04-04-2014, 09:53 AM   #4
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
I am not an expert, so I wish I knew. This is why it is not a great idea to switch back and forth between the calibre editor and Sigil. It is also not as easy to search for, since they are not so visible. It appears a trade off.
mrmikel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KoboLauncher for standalone Qt apps sergeyvl12 Kobo Developer's Corner 517 12-02-2023 10:50 AM
fbreader-0.10.7 Standalone Installer pwarren iRex 70 03-01-2013 12:17 PM
Standalone FlightCrew capidamonte Sigil 8 04-25-2012 05:20 PM
Standalone flightcrew? bfollowell Sigil 4 06-30-2011 11:21 AM
iLiad Standalone Flash Player vols iRex Developer's Corner 3 03-02-2007 02:20 PM


All times are GMT -4. The time now is 12:21 AM.


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