View Single Post
Old 09-16-2017, 03:20 PM   #8
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by DiapDealer View Post
I did say I could be wrong (it's an old, vague memory).
There was no space generated by the <br/> as long as I can remember. But your ancient memory is probably much olderer than mine!

Quote:
Originally Posted by AlanHK View Post
I can handle a few special cases manually. I almost always edit the TOC after generation to add or delete a few items at the beginning or end. (May use the "title=" hack to do that now.) Just preferably not every single entry.
The way I do it is using the title, then you can easily Regex what's needed, without effecting the displayed text:

Original: <h2 title="Chapter One The Example">Chapter One<br/>The Example</h2>

Search: title="Chapter One
Replace: title="1—

After: <h2 title="1—The Example">Chapter One<br/>The Example</h2>

If you work with a lot of books that have that format, you could probably make a Saved Search group to handle the word -> number conversion.

From there, you could easily tweak what symbol you need for that specific book:

Search: (title="\d+)—
Replace: \1:

After: <h2 title="1: The Example">Chapter One<br/>The Example</h2>

Using title means that Generate TOC won't throw your manual changes in the garbage if you run it again. Saves a lot of headaches.

Last edited by Tex2002ans; 09-16-2017 at 03:32 PM.
Tex2002ans is offline   Reply With Quote