Generate TOC
Hi AlanHK,
I know your problem and I like your ideas.
It would really nice to have the TOC-tool translate <br/> into a space.
But for the extended idea you must keep in mind, that a <h2> can look like: <h2>1</h2> or <h2>1.</h2> or <h2>–1–<h2> or <h2>*** 1 ***</h2>. Plus: most books have chapters like Prologue or Epilogue or About the Author. So you would need some kind of RegEx for the TOC Tool.
I'm not a programmer, but I don't think that's easy to implement.
Meanwhile my workaround is:
1. edit the TOC, if I want minor changes
2. RegEx the toc.ncx directly, if I want more changes
But if you have to recreate the TOC, you have to do these steps again.
If you want a solution, that survives the recreation of the TOC, you can (using RegEx) insert the title=""-property in the <h1> <h2> etc., so it looks like:
<h1 title="1. Some Text">1<br/><span class="Sub">Some Text</span></h1> or
<h1 title="Chapter 1">1</h1>
The TOC-tool will pick up the text from title="" and give you "1. Some Text" respectively "Chapter 1".
Last edited by Klecks; 09-16-2017 at 04:53 AM.
|