Sub-project Variables in a master project

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Sub-project Variables in a master project

Unread postby Rob Davis » Tue Nov 27, 2018 11:44 am

Hi
I created many small projects to publish individual product installation guides. Each project has the same set of variable names (such as PROD_NUMBER, PROD_NAME, PROD_DESCR, etc.)
To do this, I created one product guide, and then cloned it many times - I suppose I could have just made one and used different search paths for all the variable information and pictures for each instance. Many of the pictures also have identical names - 'Step1_ann.ipp', Step2_ann.ipp'.

Now I have been asked to produce a product catalog that has all the little product guides as chapters.
When I try to include the small projects in the ToC of the Master project, I can't think of any way to 'index' the variables so that for each included sub-project, the correct set of variables is chosen.

If I explained the problem well enough (I'm not sure I did!), any suggestions?
Thanks
Rob
User avatar
Rob Davis
 
Posts: 104
Joined: Tue Sep 06, 2011 9:45 am

Re: Sub-project Variables in a master project

Unread postby Tim Green » Tue Nov 27, 2018 12:25 pm

Hi Rob,

There are a couple of problems inherent in this approach that mean you will probably need to edit both the variable and graphics names to make them unique in all your sub-projects.

You can get away with have the same variable names in all the projects, but only if they are going to have exactly the same definitions in all the projects. Then you define all the variables in the master project and the definitions from there will "win". Otherwise, what happens is that the HM parser goes through the project in order and gets the definitions of the variables from the first sub-project in which it finds them. After that, they are globally defined at the top level for the rest of the compile run, and those definitions will be used. :?

Images with the same names across child projects are taboo unless they are runtime-merged CHM files, where each CHM file for each child project remains separate and has its own separate assets, including images. In all other cases the child projects in the master have the same status as topics in a normal project. Everything gets compiled into the same output and all the images are pooled. That means that any images with the same names from different child projects will overwrite each other, and the last image with that name will then be displayed in all topics where that image filename is referenced... :x
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.
User avatar
Tim Green
Site Admin
 
Posts: 20355
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Sub-project Variables in a master project

Unread postby Rob Davis » Tue Nov 27, 2018 10:39 pm

Hi
That's bad - but it's about what I was expecting (still, a person can hope, can't they!)
Thanks for the quick response.
Rob

(Another possible solution would be if there was a way to include a .pdf as the content of a topic. Any chance?)

(And a wild suggestion - Is it worth opening a Wish-list item, covering the general topic of using H&M for publishing repetitive work like Spec Sheets, Technical Notes, etc, which have much common information, a common template, lots of similar variables, and might often be in a journal or catalog publication, as well as really being able to take advantage of SingleSourcing for printed, Web, and other formats?)
User avatar
Rob Davis
 
Posts: 104
Joined: Tue Sep 06, 2011 9:45 am

Re: Sub-project Variables in a master project

Unread postby Tim Green » Wed Nov 28, 2018 9:09 am

Rob Davis wrote:(Another possible solution would be if there was a way to include a .pdf as the content of a topic. Any chance?)

Not really. The problem with PDF is that it isn't really a document at all. Despite all the bells and whistles that have been added over the years, a PDF is really just raw printer data in a file, and a PDF viewer is a printer driver that prints to the screen instead of paper. This means that apart from the plain text, the contents of a PDF are nothing at all like any normal document file. Instead, it contains a series of commands for "drawing" and positioning things on paper using a print head, which is completely different from the way normal formatted documents are written to the screen on a computer. Trying to convert that back to a normal document format is like trying to unscramble eggs. That's why even Acrobat produces such awful results when you try to save a PDF with anything except very basic formatting to something like RTF.

(And a wild suggestion - Is it worth opening a Wish-list item, covering the general topic of using H&M for publishing repetitive work like Spec Sheets, Technical Notes, etc, which have much common information, a common template, lots of similar variables, and might often be in a journal or catalog publication, as well as really being able to take advantage of SingleSourcing for printed, Web, and other formats?)

That definitely sounds interesting. I would say go for it, with some details and an example of the kind of thing you would like to do with it. :)
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.
User avatar
Tim Green
Site Admin
 
Posts: 20355
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Sub-project Variables in a master project

Unread postby Rob Davis » Thu Nov 29, 2018 10:13 am

Urgent question:
When specifying a graphic to be included, can the full path be explicit or is it ALWAYS relative?
That is, if there are other files with the same name in other , more 'senior' folders in the search path, will H&M always take the first occurrence? No way to specify \folder\filename?


(Regarding the bigger question of this kind of content re-use, I'll try to bundle the whole scenario and put up some kind of proposal - but that will only be after the current crocodiles have been subdued!)
User avatar
Rob Davis
 
Posts: 104
Joined: Tue Sep 06, 2011 9:45 am

Re: Sub-project Variables in a master project

Unread postby Tim Green » Thu Nov 29, 2018 2:20 pm

Rob Davis wrote:When specifying a graphic to be included, can the full path be explicit or is it ALWAYS relative?

It's always relative. Actually, there is no path at all included with graphics file references, only the filename. Help+Manual searches the folders in the Project Search Path from top to bottom and uses the FIRST file it finds there with a matching name.

The paths in the search path are always relative provided they are on the same drive as the project. They are only absolute for folders located on other drives.

Note also that files with the same name but different extensions (introduction.bmp and introduction.jpg) should be regarded as identical as graphics formats often need to be converted, depending on the output format. : 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.
User avatar
Tim Green
Site Admin
 
Posts: 20355
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 7 guests