Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2023, 05:34 PM   #16
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
Maybe the thread SHOULD go in Conversions. I manually work around the disparate <html...> lines in the Editor by either a search and replace or by simply copying/pasting (if I remember -- and, unfortunately, that remembering is an issue). So, that's why I started this thread here. But, I guess I'd prefer something to happen during either conversion or polishing to set those lines everywhere (either with Conversion/Polish settings or by setting up a template as I mentioned in my second post.

OTOH, if a template is set under the editor's Preferences > Editor Settings, I'd think that if the Editor re-creates a deleted file (like toc.ncx or toc.xhtml), the settings in that template should be used. But, I could be wrong.
enuddleyarbl is offline   Reply With Quote
Old 02-10-2023, 06:04 PM   #17
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,226
Karma: 5390614
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
The HTML ToC is not recreated after it's deleted. What are you doing that causes it to be recreated?
Yes it is. Test it.

"When editing the table of contents it recreates the toc.ncx."
Karellen is offline   Reply With Quote
Advert
Old 02-10-2023, 06:16 PM   #18
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,226
Karma: 5390614
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Is it a requirement to set the language on each and every xhtml page?
If yes, why doesn't EpubCheck flag this as a warning when it is missing?

I though the language was picked up from the opf file.
Karellen is offline   Reply With Quote
Old 02-10-2023, 07:25 PM   #19
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: 44,175
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont need the lang in every html file. The spell checker will use the lang from the OPF file when an html file does not have a lang.
kovidgoyal is offline   Reply With Quote
Old 02-10-2023, 07:54 PM   #20
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,226
Karma: 5390614
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Thanks @kovidgoyal
That's what I thought also.
Karellen is offline   Reply With Quote
Advert
Old 02-10-2023, 10:08 PM   #21
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
Quote:
Originally Posted by Quoth View Post
I spiel cheque in the LO Writer, extra Save As docx and import to Calibre.

Can't you exclude system files in Calibre spell checker?
Yes. "Exclude Files" at the bottom of the spellchecker page. I've tested it by telling it to exclude nav.xhtml, toc.xhtml and toc.ncx and that works well.
enuddleyarbl is offline   Reply With Quote
Old 02-10-2023, 10:22 PM   #22
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
Quote:
Originally Posted by kovidgoyal View Post
You dont need the lang in every html file. The spell checker will use the lang from the OPF file when an html file does not have a lang.
Thanks, Kovid. I was wondering where the default was set.

In the content.opf file, I found the dc:language entry and changed it to:
Code:
<dc:language>en-US</dc:language>
After restarting the editor, the spellchecker now specifies English (US) everywhere that the language wasn't specified (as you said). Unfortunately, the language IS set to plain EN in toc.xhtml and nav.xhtml. So, I still have to either manually change those or exlude them from the spellchecker.
enuddleyarbl is offline   Reply With Quote
Old 02-14-2023, 12:03 AM   #23
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: 44,175
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I dont follow. If you want to always use the US variant for en you do so by configuring spell check in the editor preferences, to use the US variant as the default for the EN language.
kovidgoyal is offline   Reply With Quote
Old 02-14-2023, 10:32 AM   #24
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
The problem is that I've begun setting the specific variety of English. For American English books, I use en-US. For British English books, I use en-br en-GB. When I was leaving things with the generic EN tag, there was no problem. But, once the html/xhtml files have either en-us or en-br en-GB set, the spellchecker will occasionally choke when it runs into a duplicate misspelled word in a file where the tag is set by default to the generic en, but the rest of the files are set to the specific regional flavor of en.

The work-arounds are to 1) manually change the lang= tags when the problem pops up in the spellchecker or 2) exlcude those particular file (usually nav.xhtml, toc.xhtml and toc.ncx - but I've occasionally had the issue with content.opf when I've misspelled words in my included metadata).

Currently, amongst the last things I do before spellchecking is do a Search/Replace across all text files something like:
Code:
Search: <html.+?>
Replace: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-us" xml:lang="en-us">
But, that "only" gets the text files and sometimes the issue pops up with the .ncx and .opf files. In that case, I'll add the exclusion in the spellchecker.

That works well.

It would be nice, though, if all files that get re-created in the Editor (i.e., the toc and nav files) would follow the language set (if any) in the template at Preferences > Editor Settings > Templates for New Files. Also, (but, I don't know if it's really reasonable) it might be nice if the language could be set throughout all files in a book at conversion time.

Last edited by enuddleyarbl; 02-14-2023 at 04:25 PM.
enuddleyarbl is offline   Reply With Quote
Old 02-14-2023, 11:23 AM   #25
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: 30,162
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
isn't it en-GB for the British Isle?
theducks is online now   Reply With Quote
Old 02-14-2023, 01:15 PM   #26
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,062
Karma: 89198465
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by theducks View Post
isn't it en-GB for the British Isle?
For anywhere using British English, or close to it. Obviously Ireland and New Zealand use very close to British English, South Africa, Australia, India, Canada less so.

GB = Great Britain. Brittany in France used to be Little Britain. GB is technically only Scotland, Wales, England and Cornwall. The Scottish Islands, Isle of Wight, Northern Ireland and Rathlin Island (Northern Ireland) are all both in the British Isles and the United Kingdom of Great Britain and Northern Ireland (full title).

Isle of Man (English & Manx language) and Channel Islands (English, French and a sort of Norman French language) are British territories, but not in UK or GB, though in the British Isles.

Ireland, the nation state, and its islands are in the British Isles. Oddly The Irish Republic is a customary title, it's Ireland in English and only Éire in Gaelic.

The area was called the British Isles before England even existed, but some now call them the Anglo-Hibernian Isles, or in the Anglo-Irish Agreement, "These Islands".

The UK was created only in 1800 as The United Kingdom of Great Britain and Ireland, though the Pope gave Ireland to English/Norman King Henry II in the 12th Century (The Normans conquered England in 1066). In 1922, when the UK part of Ireland was reduced to 6 of the 9 Ulster Counties, Westminster seriously considered becoming just Great Britian but renamed to the United Kingdom of Great Britain and Northern Ireland.
Quoth is offline   Reply With Quote
Old 02-14-2023, 02:20 PM   #27
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
Quote:
Originally Posted by theducks View Post
isn't it en-GB for the British Isle?
Eeeek. I think I grabbed en-BR from an Agatha Christie book. But, I can't guarantee that's a true statement. If I look at:

https://www.iana.org/assignments/lan...ubtag-registry

and search for "subtag: br" the best match is Brazil. Oops.

If I search for "subtag: gb" I find:

Type: region
Subtag: GB
Description: United Kingdom
Added: 2005-10-16
Comments: as of 2006-03-29 GB no longer includes the Channel Islands and
Isle of Man; see GG, JE, IM

I've got to fix my stuff. Thanks for the heads up.
enuddleyarbl is offline   Reply With Quote
Old 02-14-2023, 02:48 PM   #28
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,062
Karma: 89198465
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by enuddleyarbl View Post
Description: United Kingdom
Added: 2005-10-16
Comments: as of 2006-03-29 GB no longer includes the Channel Islands and
Isle of Man; see GG, JE, IM
From a Governmental/Political point of view GB never included the Channel Islands and the Isle of Man. They've never been part of the GB created as a political entity in 1707 nor part of the UK (created only 1801). The definition of UK changed in 1922.

The really stupid thing is websites and programs using National Flag Icons to designate language. German, French, English, Spanish and Portuguese are official languages outside of Germany, France, UK or USA, Spain and Portugal.

English (Ireland) is a real setting, but so badly supported it's better to select English (British) and edit the Regional Settings (€ rather than £, technically both are metric, but Ireland more so with Km rather than Miles on signs and litres of fuel rather than gallons). Occasionally USA is the only working choice, despite different gallons to UK, Fahrenheit, unique date systems, Letter rather than A4, USA cups and pounds rather than UK Stones, Pounds, Ounce and Webster's reformed anti-French spelling).

Last edited by Quoth; 02-14-2023 at 02:59 PM.
Quoth is offline   Reply With Quote
Old 02-14-2023, 02:51 PM   #29
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
I guess I can't blame Agatha for en-BR. It looks like it was just a senior moment on my part that I automated. <sigh>. I used the Quality Check plugin to search for lang="en-gb" and lang="en-br" in my library. My older ones all use en-gb. Only in the last couple of weeks does en-br show up. Oh, well. It keeps me occupied.
enuddleyarbl is offline   Reply With Quote
Old 02-14-2023, 05:42 PM   #30
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,784
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Quoth View Post
For anywhere using British English, or close to it. Obviously Ireland and New Zealand use very close to British English, South Africa, Australia, India, Canada less so.
That might have been true 50 years ago, but the gradual incorporation of te reo Māori into NZ English means it has now drifted further from British English than Australian English. As well borrowing Maori words, the cadence of the spoken language has also changed.

PM David Lange made Māori an official New Zealand language, he was a contemporary of Thatcher so that would have been in the 1980s. The current government has set an objective for te reo Māori to be taught in all primary schools by 2025.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add xml:lang to ePub abraum ePub 11 06-25-2021 06:06 PM
Add Read/Unread metadata from custom column to metadata jacket allanahk Library Management 4 11-12-2018 03:10 PM
Stop overwriting metadata jacket on conversion (instead add another one)? allanahk Calibre 2 11-11-2018 04:21 PM
Add Copyright to Book Jacket Axell Conversion 4 03-23-2017 03:16 AM
Any way to add Book Jacket w/ Save to disk? djrm Calibre 3 08-17-2010 11:52 AM


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


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