![]() |
@AlanHK...
Quote:
Quote:
|
Quote:
This is the way the chapter headings were coded originally. Code:
<body class="content">Then using the plugin combines h1 and h2 text in the TOC, and the h3 heads disappear. Quote:
I know there is no formatting in the NCX, at least no way I know of. The plugin offers space, em dash, en dash, tilde as separator. Many use period or colon, (Chapter 2: The Story Continues) but rather than add more and more symbols, etc., simplest just have a default and let user change it to whatever, preferably retained for next use. |
@AlanHK...
"I had a toc with 3 levels of headings, as mentioned. Using the plugin combined level 1 and level 2, deleted level 3. Only affecting the ncx file, to clarify, the HTML files aren't affected." I draw the line at combining h1, h2 and h3 simply because I doubt many people will want to combine 3 headings per NCX heading. In other words your idea of combining 3 levels -- h1, h2 & h3 -- is unrealistic because I'm guessing that not many people will use it. More likely, they will prefer to combine just h1 & h2 headings in the NCX TOC. Add to this that such a plugin change -- to combine h1, separator, h2 & h3 -- would also make plugin usage more complicated. As I've already mentioned, I like to keep it simple for the user. "Using Sigil's generate TOC tool gives 3 levels of headings. Then using the plugin combines h1 and h2 text in the TOC, and the h3 heads disappear." What you describe above is correct behaviour for the plugin because the plugin is only meant to combine just the h1 & h2 headings in the NCX TOC. The plugin does not combine or add h3. In other words, only combining h1 and h2 headings is what the plugin is supposed to do as is clearly stated in the plugin release notes -- it's certainly not a plugin error as you seem to be inferring. "I know there is no formatting in the NCX, at least no way I know of." Actually you can both generate and edit/change the headings in the NCX TOC quite easily in Sigil. Just click on Tools > Table of Contents > Generate Table of Contents or Edit Table of Contents and then right-click and edit each heading as you like. In this way you can edit/change each NCX heading in turn by manually typing in and adding h1, h2 headings with a separator and even, if you like, adding h3 headings appropriately to each NCX heading. And when your done, just press OK and your epub's NCX TOC will automatically update to your new NCX TOC heading format. And you could probably also use grep S&R within the toc.ncx file to achieve the same outcome or result. |
Quote:
That is damaging the book. If you more than two levels of headings, you can't use this plugin. Quote:
Any codes you type into the the TOC editor get encoded and you just get visible code, not changes on format. e,g, adding <i> </i> to a heading, what I see is the literal codes and looking in the NCX what it did was <text><i>TIME AND THE GODS</i></text> If I edit the NCX to make it <text><i>TIME AND THE GODS</i></text> and then do "Create HTML TOC", the tags were not there. And epubcheck says ERROR(RSC-005): Error while parsing file 'element "i" not allowed anywhere; expected the element end-tag or text'. Anyway, not asking to insert any formatting into the NCX. I leave that to the HTML TOC. Just a choice of separator character. |
@AlanHK...
"The error is not that it doesn't combine h1+h2+h3 but that it combines h1+h2 and DELETES h3. That is damaging the book. If you add more than two levels of headings, you can't use this plugin." I'll have another look at that problem. "<text><i>TIME AND THE GODS</i></text> If I edit the NCX to make it <text><i>TIME AND THE GODS</i></text> and then do "Create HTML TOC", the tags were not there. And epubcheck says: ERROR(RSC-005): Error while parsing file 'element "i" not allowed anywhere; expected the element end-tag or text'. " Why on earth would you ever expect Sigil's "Create HTML TOC" feature to allow you to format the text within the NCX TOC in the editor or directly within the toc.ncx file itself? Heck, the Create HTML TOC editor is a pure text editor for goodness sake -- it's not an html editor that will allow you to embed html code tags. Also, the toc.ncx file isn't an html file -- it's an XML file. You could perhaps add indents and alter the chapter headings to upper/lower/title case within the Create HTML TOC editor or within the toc.ncx file but that's about all you can do. |
Quote:
Quote:
|
@AlanHK
Quote:
And I'm not sure whether you actually realize it but, due to a fairly recent Sigil change, you now have two ways to specifically edit the NCX TOC in Sigil. You can edit the TOC in the normal way using Tools > Table of Contents > Generate TOC and when you press "OK" this feature always creates an NCX TOC from scratch. But you can also now directly edit the existing NCX TOC(in the toc.ncx) by just clicking on Tools > Table of Contents > Edit TOC. And again this feature also allows you to directly change/edit heading text only(not html) and add indents. And when you click "OK" it automatically updates all your heading changes in the toc.ncx file. |
Quote:
I've been using "Edit TOC" and also directly editing the NCX for years. We just seem to be not communicating well. |
Update(v0.1.2):
Fixed a problem with sub-headings h3 - h6 not displaying in the TOC NCX after running the plugin. Thanks to AlanHK. This plugin will now create a flat NCX TOC showing all headings formatted with h1 - h6. If you wish to add indents to your sub-heading entries in your NCX TOC, you can do this in Sigil using Tools > Edit Table of Contents in the normal way by selecting each of the relevant headings in turn and using the arrow keys on your keyboard to directly add/remove indents in the edit window as you prefer. |
| All times are GMT -4. The time now is 08:35 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.