set "Topic has a separate header" default to unchecked?

HM5 served us well, now its time has come and it has been replaced... If you have HM5 questions, please post them here.

Moderators: Alexander Halser, Tim Green

Post Reply
David Burson
Posts: 12
Joined: Thu Jan 27, 2005 10:59 pm

set "Topic has a separate header" default to unchecked?

Unread post by David Burson »

Hi,

Can I set the default for "topic has a separate header" to be unchecked? Or do I have to remember to uncheck it manually for every topic I create?

Also: is there a way to set "topic has a separate header" to be unchecked for all existing topics, or do I have to manually select each topic and uncheck the box?

Thanks,
David
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: set "Topic has a separate header" default to unchecked?

Unread post by Tim Green »

Hi David,

You need to do this individually, there is no option for doing this globally. The rationale behind this is that except in exceptional cases, one would generally consider a topic without a header to be an error. That is why the option is there at all, for those exceptional cases. Currently we don't see a reason to change this -- so far, you are the only user who has ever asked for this in nearly fifteen years... 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
redhat78
Posts: 8
Joined: Tue Jan 25, 2011 3:08 pm

Re: set "Topic has a separate header" default to unchecked?

Unread post by redhat78 »

He is certainly not alone in this, I had the same question.
The solution that came to mind was to remove the <%topic header%> information from the default template.
David Burson
Posts: 12
Joined: Thu Jan 27, 2005 10:59 pm

Re: set "Topic has a separate header" default to unchecked?

Unread post by David Burson »

Thanks Tim and redhat78,

A little more info about my situation, which I think may be one that could become more common:

My final output is a Qt Help .qhc file, displayed with Qt Assistant. I tweak a few H&M configuration settings, including commenting out everything in the <IF_TOPIC_HEADER> tag. I publish WebHelp, which nicely produces the .htm files for each topic, which I need as input into the Qt Help generator. I wrote a little app to do a couple xslt's on the H&M table_of_contents.xml and each topic .xml in my H&M source, to produce the Qt Help Project file (.qhp) which includes both the toc and the keywords.

It works great: I can work entirely in H&M for my topics, keywords, and toc, publish WebHelp, and run a .bat file that calls my app to build the .qhp and ultimately calls the Qt Help compiler (qcollectiongenerator) to create the final .qhc.

When Qt Assistant displays my .qhc file (which is what our end users will see), they can have any number of topics open at once, in a tabbed style similar to Visual Studio. What I put in H&M's "<Title> Tag:" field in the Topic Options is displayed in the tab for that topic.

With the tabbed format, having another topic header looks hokey. As redhat78 pointed out, that's easy to take care of as far as the final output is concerned.

Unfortunately, though, the topic header is still visible in every topic while working in H&M, unless someone working on the topic remembers to uncheck the "Topic has a separate header" box. My concern is someone could easily edit the topic header, not realizing that will never show up in the final product. Yes, we can just try to be careful and remember that if we want to change the topic header without changing the toc we actually need to change the "<TITLE> Tag" field in the Topic Options tab. But it would sure be nice if we could have a way to default all topics to NOT have a separate header.

Thanks,
David
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: set "Topic has a separate header" default to unchecked?

Unread post by Tim Green »

Hi David,

Sorry for my brief reply above, it was very early in the morning and I was feeling a bit grumpy. We'll look into the possibility of a global turn-off, we're just a little concerned about users causing problems for themselves when they do this accidentally. We already have quite a few users who are not using headers at all even though they are on automatically -- they create every header in every topic manually, including the links to the previous and next topics.. :cry:

You can globally turn off the headers in all your topics by doing a search and replace on the XML topic source files to remove the <header> and </header> tags and everything between them.

To do this you need a multi-file search and replace tool that can do complex searches across multiple lines, generally known as a "grep tool". Unfortunately, the otherwise excellent free Notepad++ can't really do this, even though it does multi-file searches. It has an ancient Posix ERE regular expression engine that is pretty useless for anything except simple single-line searches. I use PowerGREP, which is a little expensive but worth every penny many times over. It's probably the best GUI-based grep tool on any operating system. Alternatively, you can also use FAR HTML from Rob Chandler, which does complex multi-file searches without regular expressions, so it is easier to use if you're not familiar with the rather arcane syntax of regex. Rob has a very generous free trial period and FAR also includes lots of other useful tools for help authors. Also highly recommended. There may be other less expensive or free Windows grep tools available, but the couple I've tried have been old and pretty awful.

If you're using a grep tool with modern regex syntax the regex for locating the headers for removal is this, with the option for dots selecting new lines activated:

Code: Select all

\s*?<header>.*?</header>
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
David Burson
Posts: 12
Joined: Thu Jan 27, 2005 10:59 pm

Re: set "Topic has a separate header" default to unchecked?

Unread post by David Burson »

Thanks Tim,

I really appreciate the help and explanation. I understand the conundrums in software design due to the basic principle, "nothing can be foolproof because fools are so ingenious." I'm sure I've played the part of the fool at times...

I was considering doing something similar to what you describe. But since the default for a new topic will have the header, what I'd really need is something similar to your grep tool solution, but that compares the actual value of the separate header to its default value, and flag any that are different. That way I could manually review those to see if the change is something we want, but is just in the wrong place (should be in the "<TITLE> Tag" field in Topic Options).

At this point, we are aware of the issue so the risks seem reasonably small, especially with the hope that within a year we might have a global turn-off option that would solve our problem very simply. So I think I'll wait until we feel the pain before taking the time to create a solution to protect ourselves from ourselves.

By the way, no need to apologize - you are one of the more pleasant grumpy people I've ever corresponded with :wink:

David
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: set "Topic has a separate header" default to unchecked?

Unread post by Tim Green »

Hi David,

The only "switch" in the XML source is the presence or absence of the <header></header> tag pair. If it's there the checkbox is ticked, if it's not it's not ticked. We're going to discuss the possibility of a "default off" for the header but I can't promise anything. One possibility would be to grey the header box out instead of hiding it completely, I suppose...
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
David Burson
Posts: 12
Joined: Thu Jan 27, 2005 10:59 pm

Re: set "Topic has a separate header" default to unchecked?

Unread post by David Burson »

Hi Tim,

Thanks for considering the possibility of allowing us to set the default to "off" for the header.

I'm imagining a new option somewhere in the Configuration section where we can select the default for "Default for Topic has a separate header." I'd expect H&M to ship with that value set to "Yes" or "On". With a value of "Yes", H&M would work exactly as it does now. With a value of "No", H&M would work exactly as now, except when a new topic is created, the "Topic has a separate header" box would not be checked.

I think greying the header instead of hiding it would work fine for us - that should be sufficient to prevent accidental or ignorant mistakes. It would be nice if, in addition to greying it, you made it much smaller vertically so it won't feel like it is in the way. Maybe when the header is off a tool tip could direct people how to turn it on (or how to set the default, or both) - not necessary for us, but might be helpful for someone else.

That's my 2 cents!

Thanks again,
David
ajtthethird
Posts: 3
Joined: Fri Sep 05, 2008 3:55 pm

Re: set "Topic has a separate header" default to unchecked?

Unread post by ajtthethird »

Hi,

I was wondering if you ever did create a default setting to globally switch off topic headers in a project.

I'm still running Help & Manual 5 and I have book projects that sometimes have in excess of 100 chapters (topics) - I have to select each topic and uncheck the box to switch the header off - it can be very laborious and time-consuming.

I've recently downloaded version 7 to see if this has changed but I can't seem to find a switch or anything that might turn headers off by default. It seems a fairly obvious thing to me.

I appreciate any help you might be able to give, thanks,
Andrew
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: set "Topic has a separate header" default to unchecked?

Unread post by Tim Green »

Hi Andrew,
I was wondering if you ever did create a default setting to globally switch off topic headers in a project.
No, we haven't added that and there hasn't really been any appreciable demand for it.

The question is, what output do you want to eliminate the headers for? If it's HTML-based output it would be easy to edit the HTML template in a skin to exclude the header. Similarly, you can also exclude the headings for any level in PDF by editing the PDF template.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
ajtthethird
Posts: 3
Joined: Fri Sep 05, 2008 3:55 pm

Re: set "Topic has a separate header" default to unchecked?

Unread post by ajtthethird »

Hi Tim,

thanks for getting back. My clients are publishers and they require EPUBs with no headers on the chapters. I'll have to continue with what I have.

Thanks,
Andrew
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: set "Topic has a separate header" default to unchecked?

Unread post by Tim Green »

ajtthethird wrote:thanks for getting back. My clients are publishers and they require EPUBs with no headers on the chapters. I'll have to continue with what I have.
In Help & Manual 5 you can't edit the template for ePUB output but in the new Help & Manual 7 you can. There you can remove the header portion for your topic pages just as easily as in a normal WebHelp template.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply