Thread: regex question
View Single Post
Old 11-21-2014, 02:14 PM   #13
signum
Zealot
signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.
 
Posts: 119
Karma: 64428
Join Date: Aug 2011
Device: none
Regarding multi-line titles and auto TOC:

My preference is to have smaller-sized subtitles, to clearly point them out as subordinate to the main title. So, a typical set of headings would look like:

Code:
<h2>Main heading</h2>
<h3>Subtitle</h3>
where h1, h2, h3 and h4 are styled with at least a "text-align: center". They can all share the same css block. The magic comes when setting this up for an auto TOC generator. The key is to use the "title=" specification. Using the above example, the headings then look like:

Code:
<h2 title="Main heading: Subtitle">Main heading</h2>
<h3 class="sigil_not_in_toc">Subtitle</h3>
The auto TOC generator will use what's in the "title=" in preference to what is in between the ">stuff<" angle bars. BTW, it's been my experience that extra html such as "< br / >" in the "title=" gets stripped out by the auto TOC generator. H2 and h3 can be anything you like, as long as you get the "title=" right. The stuff between the angle bars gets displayed as desired and the "title=" only shows up in the TOC.
signum is offline   Reply With Quote