Cannot edit the style of hmskin file

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

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Cannot edit the style of hmskin file

Unread post by itexnz »

As per the H+M documentation shown below I should be able to edit the styles in a hmskin file... but all the Write > Style tab option is always deactivated.

Currently the only way for me to achieve this is a hack... rename the hmskin file as a .zip, unzip, manually edit the hmxp file in notepad++

How it should be possible...
----
How to edit skin files
Skin files are actually normal single-file projects with some special limitations. You can open them and edit them like normal projects but you can only edit those components that are included in the skin, everything else is unavailable.

1.Select Open in the File menu and then select Help+Manual skin files (.hmskin) as the type of file to be opened. (If you don't select this you won't be able to see the skin files!)

2.Select an .hmskin file to load and edit. You can find some sample skins in the Skins folder in the Help+Manual program directory.

3.Now you can edit the settings of your skin. This is exactly the same as editing the corresponding sections of normal projects to configure your output.

Skins have no topics, you can only edit the relevant sections in the Configuration and Baggage Files sections in the Project Explorer and the text and table styles in Write > Styles.
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Cannot edit the style of hmskin file

Unread post by Tim Green »

Hi David,
As per the H+M documentation shown below I should be able to edit the styles in a hmskin file... but all the Write > Style tab option is always deactivated.
That's a misunderstanding. There's nothing about editing content styles in skins in the documentation because skins don't define your content styles. Those are always the provenance of your project, not the skin. There is a strict division of labor there: The skin is responsible for the layout of everything around the content, but not for the formatting of the content. The content of your project is formatted in your project, and the project is responsible for content formatting. The styles defined in your project are converted to a CSS file on publishing and that is exported and integrated into the WebHelp, but they are still part of the project, not part of the skin.

If the content styles were defined in the skin you wouldn't be able to use it for multiple projects, because every project can have a different set of styles with different structures and different names. That would have to be mirrored in the skin, which would effectively make the skin part of the project, which isn't what you want.

What you can do, although it is counterproductive, is make a copy of the content styles CSS file exported to WebHelp, edit it and add it to the Baggage Files section of your skin. The baggage is always written last, so doing that will overwrite the version generated by the project. However, that negates the entire styles system in your project. It is then no longer possible to make any styles editing changes in your project, because when you use the skin you will just be getting an old CSS stylesheet based on an old version of the project. No changes to existing styles will be available, and any new styles won't even exist. 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
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Re: Cannot edit the style of hmskin file

Unread post by itexnz »

I think we might have crossed lines of communication here - I'm using the /O option as per the H+M documentation via a script to secondary publish Word Docs with alternative formatted styling for a 3rd party (who want documentation with their own branding colours etc) and I can confirm that if I hack the hmskin file I do indeed get my output with my alternative colours for headings, table colours, etc.
/O=<filename>
-----
Local option, can be used multiple times per output format option, after the format option. The last file used has priority.
-----
Apply a project skin to the project when publishing. Enter the name of the .hmskin file for the filename argument.

Overwrites all variables, settings, values and styles in the project with those defined in the skin file. You can use this switch multiple times, specifying multiple skins. If the same attributes are defined in more than one skin the last skin in the command line always has priority.
-----
https://www.helpandmanual.com/help/inde ... syntax.htm


and this topic clearly states that the styles should be editable in a hmskin file under the heading "How to edit skin files"
https://www.helpandmanual.com/help/inde ... _skins.htm
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Cannot edit the style of hmskin file

Unread post by Tim Green »

Hi David,

Yes, that's possible. However, editing styles directly in .hmskin files isn't supported, because they're still designed for HTML only. Also, the styles referred to there are the CSS styles, not the integrated stylesheet. It will work if you hack the styles into it the way you describe, because skins are implemented as an XML overload. That means that all the XML in the skin will automatically replace the matching XML from the project. But you can't edit styles in a skin directly, and if you save a project with styles as a skin the integrated stylesheet will be stripped out.

Summary: You can do this and it will work, but only as a manual hack. :?
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
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Re: Cannot edit the style of hmskin file

Unread post by itexnz »

Best update the documentation then ;-)

Or consider this a feature request. Often I create "official"documentation for a parent company as branded PDFs and online help, and rebranded, reformatted, editable DOCX versions for partners and clients where they can add more content and client-specific screenshots if they need to.

Using hmskin files is the best way to achieve that.

It would seem that enabling the edit styles ui would be the easiest way to facilitate it.
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Re: Cannot edit the style of hmskin file

Unread post by itexnz »

PS...
back in v5 H+M definitely allows the editing of skin styles
2018-11-14_11-57-58.png
in V6 you could see the styles but not edit them

in v7 you cannot even see the list of styles

This probably explains why the documentation states it can be done, and decisions must have been made to restrict it over time - or some other development changes have just led to this happening as an unintended consequence. Clearly in the circumstances I have outlined for using the /O applying a skin to DOCX outputs (and being able to have manage multiple hmskin files for different clients), this is rather unfortunate.
You do not have the required permissions to view the files attached to this post.
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Cannot edit the style of hmskin file

Unread post by Tim Green »

Hi David,

Thanks for the feedback. 8) I'm going to change the reference to styles you tripped over in the command line syntax documentation. We're going to consider ways of using different content styles more flexible generally.
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
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Cannot edit the style of hmskin file

Unread post by Alexander Halser »

Hi David,

The text styles in HTML skins were unfortunate in older versions of Help+Manual. I am not sure if styles from skins were applied in version 6, but in version 7 they definitely had no (more) function. Consequently, we disabled style editing in skins.

A better place for global styles are respositories, which do support styles. I suggest you create a repository and bind the help project to the repository. This takes over the styles defined in the repository. Not just styles for HTML output, but also print styles for PDF and table styles.

The HTML skins contain the layout only, that's all that stuff that wraps around the formatted content. The skins must not, however, mess with the content itself or modify it in any way. This would be a chaotic mix.
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Re: Cannot edit the style of hmskin file

Unread post by itexnz »

Cool thanks guys.

Note I already use a global repository for my core editing and publishing tasks - but how would I script override which repository gets used if I want to publish re-styled DOCX versions for a partner/client? The reason I was using the HMSKIN option (even though that is really only designed for webhelp stuff) was that it also applied override styles to the DOCX files and I could specify that as the /O switch in batch for those occasions I needed to generate them. Note that I also have a lot of common topic snippets stored in my global repository.

I now have a separate repository setup for client formatting of styles (and might also want to add some client-specific snippet overrides in here too), but there does not seem to be a way to apply a second repository which would override the project's normal repository content. The current command line syntax in documentation does not show any command for that.

A repository switch should work similar to way the current /O switch works i.e. "Overwrites all variables, settings, values and styles [and topics if the same file name is present] in the project with those defined in the [repository] file. You can use this switch multiple times, specifying multiple [repositories]. If the same attributes [or topic files] are defined in more than one [repository] the last [repository] in the command line always has priority.
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Cannot edit the style of hmskin file

Unread post by Tim Green »

Hi David,

Style repository switching is unfortunately not trivial at the moment, as it involves physically rewriting all the styles defined in the project. It is not really something you want to be doing back and forth on an ongoing basis, at least not without great care and attention. Basically you need to take care that the current styles get deleted (never select "Keep" when making the switch), otherwise the new styles will be added with amended names to prevent overwriting, and that won't be what you want.

You were thinking of switching stylesheets in the same way that you can do it in a word processor like Word, and that isn't the way style repositories work in Help+Manual at the moment. Sorry about that.

By the way: I always try to say "style repository" when referring to this construct rather than just "repository" to avoid confusion with version control repositories. The terminology overlap is unfortunate and it's important to keep things clear... :?
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
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Re: Cannot edit the style of hmskin file

Unread post by itexnz »

ah bother. I guess I just have to keep using the /O hmskin option, because despite it not supposed to do what it does, it certainly overrides the styles in my project's linked hmxr repository for my occasional need to generate 3rd party DOCX outputs with the 3rd party's colours and fonts, it works.

I think the linking and overriding of hmxr repositories, at least in scripting, needs to be a thing. If it can work in scripting using a hmskin (which does not need to mess up of the styles saved in the project) there should be a way to do the same with hmxr repositories.

It should work like this, but only for scripting via an /O flag: (I agree that we wouldn't want a project to be changed in any way with styles been added to the project or anything)

Where an override hmxr repository has a number of styles with the same name as those in the project's saved linked repository, only those styles will be temporarily overriden.
Where an override hmxr repository has a number of topics with the same name as those in the project's saved linked repository, only those topics will be temporarily overriden.
Same with other configurable items in an override hmxr repository such as variables, only those that match will be overridden

Nothing needs to change in the project, nothing gets amended or rewritten or saved.

The other great thing about hmxr files if they could do this is that they are plain text and therefor small and diffable in version control systems so I can see changes. My other solution using hmskin files are binary zips, so cannot, but at least it works from a scripting point of view for the overriding DOCX styles part anyway.
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Cannot edit the style of hmskin file

Unread post by Tim Green »

Hi David,

Thanks for the detailed feedback. That's very helpful. 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.
Post Reply