![]() |
TOC Formatting Question
5 Attachment(s)
Is there any way to have Heading formatting carried over to the Editor TOC?
I have some superscript and subscript formatting in the H1 and the TOC editor does not apply it in in the Editor TOC Editor I made an inline TOC and it was not there either but I could re-apply it at least I know that there's 2 TOCs in an epub. ADE seems to use both, the NCX(??) on the left, and the inline one as the TOC (I'm assuming that Calibre assigns TOC as the semantic for the inline TOC file) Probably not possible to format the NCX(??) TOC, but for the inline file that Calibre generates, it'd be nice if character formatting from the Hx could be carried over. Right now, every time the inline TOC is regenerated, I have to re-apply any special formatting |
The same thing happens with Sigil. From start.xhtml I copied the stuff between the body tags into a new .xhtml file in a new epub3 in Sigil and generated the table of contents and the sub and superscripts are lost.
|
Quote:
If you are creating an epub3, you can use formatting in the nav document and you can see this if the nav document is in the spine and you are viewing that document. Otherwise, it will be displayed as a plain text document. |
Im afraid not. ToC title are canonically represented as plain text. the inline toc is generated from this canonical representation
|
@DNSB - thanks for explaining the NCX. I never thought about it being XML so that explains it
@KG - bummer. I prefer to use an inline TOC for a 'complicated' book, and fortunately most times there is no need to tweak the TOC text. |
Paul, I understand a bit about using a inline TOC for a 'complicated book' because you can include a lot more (first lines, long chapter titles) than works cleanly with the NCX.
OTOH The NCX TOC works outside the flow of the book. There is no Out and Back when simply viewing. The device keeps the NCX 'on the side' |
@theducks -- I agree there are advantages to both.
|
For inline TOCs, after generating them, I copy the STYLE section from a text file over the STYLE section in the inline TOC. The STYLE section in the text file is a template that I created a long time ago after formatting the STYLE section in an inline TOC the way I wanted it to be. This way, a simple copy and paste is needed each time I generate an inline TOC, instead of having to format it each time.
Here is my template that I have saved in a text file: <style type="text/css"> li { list-style-type: none; font-size: 0.85em; padding-left: 0; margin-left: 0; margin-bottom: 0.1em; } a { color: blue; text-decoration: none; } a:hover { color: red; } </style> </head> <body id="calibre_generated_inline_toc"> <h3 style="text-align: center;">CONTENTS</h3> |
If you have an internal ToC you want to be able to easily get to, you an add an entry in the ToC for this. In most cases, there's nothing special about an internal ToC and if that is the case, just drop the internal ToC. It's what I do.
|
Quote:
|
Quote:
It is saved right in the editor, and you can invoke it just by typing your predefined trigger (let's say: T), and then pressing CTRL+J. You can also define placeholders for your template. For instance, I have a snippet for SVG covers. I use placeholders for image url, height and width; you can jump throughout then with CTRL+J, saving you a lot of time. I think it is really useful. Also, you can pre-select some text and press CTRL+J, before typing your trigger. This way, your selected text will replace one of your placeholders (the one marked with *). |
Not sure if this applies
Ref: https://manual.calibre-ebook.com/cus...ates-et-cetera There is a file with the CSS that gets incorporated into an inline TOC I copied C:\Program Files\Calibre2\app\resources\templates\inline_toc_ styles.css to C:\Users\userid\AppData\Roaming\calibre\resources\ templates\inline_toc_styles.css and customized it. |
| All times are GMT -4. The time now is 06:55 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.