Quote:
Originally Posted by Tex2002ans
The real question is: Does this belong in a TOC at all?
I would strongly lean towards No.
|
Well, you might lean towards no, but sometimes the publisher disagrees, and in many cases I also disagree.
Either way, to be honest, at this point I would prefer for the real question
of this thread to be whether or not there is any hope of seeing a plugin just as we've described. Everything else, at this point, is sort of extraneous to the discussion.
Quote:
Originally Posted by Tex2002ans
Sometimes that's what you have to do. Especially if you get some hideous code that's inconsistent spaghetti gobbledeegook like you brought up in this thread.
I'm going to pull a JSWolf and say clean the code up and make it consistent first, then your life will be much easier with the Regex going forward.
|
Trust me, I don't need to be told to clean up the code.

But part of doing a good job is having the right tools for the job. As I've already said, I DO USE REGEX to clean up the code including to prepare the TOC generation, however I am convinced there is a better way to do that specific thing. It's a separate question to cleaning up the code. Unfortunately I'm not (currently) capable of making the tool I need. If no-one else is interested, that's fine, I'm not going to keep pushing it, it just seemed to me that we got a bit distracted by discussions about regex so I wanted to check where things stood.
Quote:
Originally Posted by Tex2002ans
|
You're kind of making my point for me here to be honest... Do you see how complicated this is, when the work has already been done and the correct titles
are already in the file?? Wouldn't it be easier to just click on a plugin and copy them over to each chapter?
Thanks for those suggestions though, and if I get stuck on something in future I will take a look. The small-caps titles were last week so I don't need that at the moment, I'm working on a different project now. Either way, I don't really want to fiddle around with a different site to fix the cases of 2 words every 3 chapters because frankly at that point it's just faster to do it by hand. Plus it looks like that site is in English, most of the books I work on are in French.
Like I said, I do know how to do this the hard way, I am trying to find a
better way.