Thread: TOC Formating
View Single Post
Old 01-28-2014, 03:01 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,135
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by eschwartz View Post
That is precisely the OP's problem. The ToC is in two parts, since two headers are used.

The appropriate way to do this is with ONE h3/h4 tag, it doesn't matter really which one, but as theducks said, put in a <br/> to split it in the main view into two lines, but the ToC will read it as one header.

Styling it for inline takes the problem and makes it worse. Not only is the ToC in two parts (which the OP doesn't want) you have destroyed the whole point of having two header tags, by forcing them to appear on one line.
If you don't want 2 lines in the TOC, how is using BR with a span Destroying anything?

When I am done, the Books chapter head looks exactly the same.

There is another solution that can be accomplished with a 2 line REGEX capture:

<h4> is the word "Book" and the book number e.g. Book (.+?)</h4>
<h3>(.+?)</h3)
<h4 title="Book \1 - \2">Book \1</h4><h3>\2</h3>
theducks is offline   Reply With Quote