View Single Post
Old 03-19-2015, 06:50 PM   #52
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: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi,

Yes, these are improvements that I could make but I have a few questions ...

Would it be better to use something along the lines of the following to restrict it to just nav ordered lists?

nav#toc ol {
list-style-type: none;
}

Do you include this in its own stylesheet which you then include as normal in a link tag in head of nav.xhtml?

When you replace the old toc.xhtml with nav.html, do you put the nav first in the spine or last?

Also how would you identify the name of the toc.xhtml file to remove since it is not forced to be called toc.xhtml nor need it be stanalone? Some decide to incorporate the toc directly with other intro material?

Perhaps a settings file, that allows the user to specify if he or she wants to remove the toc.xhtml and if so what exact file you want removed and where in the spine order they want it placed. Alternatively since the nav.xhtml is built from the toc.ncx and not the toc.xhtml, the user could simply remove it before invoking the plugin.

Not sure what would be best.

Kevin





Quote:
Originally Posted by Fedwin View Post
Thanks for this plugin. I am loving it!

One thing I noticed is that the nav that gets created doesn't remove the styling from the ordered list. I've been adding a link to the stylesheet and then adding this to the stylesheet:

ol {
list-style-type: none;
}

http://www.idpf.org/epub/301/spec/ep...-nav-def-model

›2.2.4.1 The nav Element: Restrictions

› The ol element represents an ordered list. In the context of this specification, the default display style of list items must be equivalent to CSS list-style: none (Reading Systems with no CSS support must not show list item numbering). Authors may specify alternative list item styles using CSS, but these would obviously be ignored by Reading Systems that do not support Cascading Style Sheets.


I also end up manually changing the links to the original toc.xhtml to link the nav.xhtml file, since I always delete the toc.xhtml and leave the toc.ncx.

I have no idea if it is possible, desirable, or practical to automate these things or if you have any interest in doing so if it is. I just mention it so that an incredible plugin could be ever so slightly more so.

Thanks again. I am very happy that Sigil and this plugin exist.
KevinH is offline   Reply With Quote