View Single Post
Old 07-07-2020, 09:21 PM   #53
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 179
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
Quote:
Originally Posted by Hitch View Post
As far as I know, more than one person, like DNSB, has tried to automate that and so far, nobody has been successful. You're a formatter; you know full well that the circumstances are always different. If you assume that all your chapter titles will be a chapter number, in H1 and a subtitle in English (or whatever language), as an H2, then sure, you could probably engineer something--but I think that others have tried that and given up.

But, hey, if you find a way, good on ya.

Hitch
I had typed out a reply to this and then the stupid browser ate it.

Can't be bothered to try and remember all of it. In short: From what I've seen, previous attempts have been intended to fix or draw from the headings in the html files. DNSB will correct me if I'm wrong about his method. I agree, this is doomed to failure because too complex and unpredictable. No-one has said to me, "I (or someone) tried to automate copying the titles out of the toc.ncx or nav.xhtml and pasting them into the corresponding html files without touching the heading formatting at all, it's impossible for reason X."

KevinH understood precisely what I was trying to do and summed it up very succinctly (idea simplified since then to remove danger of breakage, now I just want to paste the titles into html comments instead of a title attribute or h1 tag) but apart from that the discussion has mostly been about how complicated / impossible it would be to make a plugin to fix the headings. Which is 1. 100% true, no argument from me, and also 2. 100% irrelevant, because I don't want a plugin to fix the bleeding headings, I want a plugin to copy the titles out of the toc.ncx or nav and paste them into an html comment in the corresponding files, which is an entirely different proposition and takes a detour around the whole problem of the unpredictable headings (that is a separate problem the way I see it and much better --and easier-- dealt with using regex).

You yourself mention the headings in the html file (h1, h2) which makes me think you haven't understood either what I've been getting at, which is understandable if you have only a passing / zero interest in the question and haven't been following the thread very closely, but in fact I am pretty sure I have found a way to do the specific thing I want to do, I just don't have the technical competencies to implement it. Maybe someday I will, in which case at least this thread will have forced me to think about precisely how to do this and what kind of problems need to be avoided.

Last edited by Mister L; 07-07-2020 at 09:27 PM.
Mister L is offline   Reply With Quote