Can't Edit Styles because they are greyed out

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

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Steffen Heller
Posts: 29
Joined: Tue Oct 16, 2018 2:35 pm
Location: Austria

Can't Edit Styles because they are greyed out

Unread post by Steffen Heller »

Hello,

a rather simple question:

Basically, I am searching for an easy and quick way to change the font for one my styles.

For this I clicked on the style, chose Styles and Edit styles.
But then, all the settings (Font settings, Paragraph Settings, Border and background) were greyed out.

How can I change that and "unlock" a style to edit it?


Another idea:
If I open the main hmxp file in Notepad++ I can see that there are style classes with the same names.

Is this the same thing as the styles in H&M?
Will it have the same result to change a style in H&M or edit the hmxp file's source code?
Or is there a certain hierarchy that one always overwrites the other?
Thanks for helping
Steffen
My current Version: 7.4.0 Build 4590
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Can't Edit Styles because they are greyed out

Unread post by Tim Green »

Hi Steffen,

If your styles are greyed out in your project that means you have linked a style repository to the project. This allows you to use the same stylesheet for multiple projects to keep your styles consistent across all the projects. Then you need to edit the styles in the repository.
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
Steffen Heller
Posts: 29
Joined: Tue Oct 16, 2018 2:35 pm
Location: Austria

Re: Can't Edit Styles because they are greyed out

Unread post by Steffen Heller »

Okay, I see, using the repository is the way for me to go.
What I am specifically interested in is using the repositories to create different layouts for one set of data.

Would it be possible to
* change the existing repository from "Link the styles of repository" to "Copy the style of repository"
* go to "Edit Styles..." and change the "Normal" style and/or some other styles
* save everything as another repository
* switch between the old and the new repository and their styles as needed

I did that in a test project and it all seemed to work, but what I am concerned about is overwriting something that I cannot undo afterwards.

Did I understand correctly, that
* if the repository is set to "Link the styles of repository", there can be no style differences between repository and project because even if I made changes before, as soon as I switch back to "Link the styles of repository" these are undone.
* editing styles in the project does never affect the data in the repository
Thanks for helping
Steffen
My current Version: 7.4.0 Build 4590
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Can't Edit Styles because they are greyed out

Unread post by Tim Green »

Hi Steffen,

You can change a repository from link to copy, that is fine. After that there is no longer a live link between the repository and the styles in the project. Basically, the repository is used once as a template. Changes made in the repository after that will no longer be reflected in the project.
* go to "Edit Styles..." and change the "Normal" style and/or some other styles
* save everything as another repository
* switch between the old and the new repository and their styles as needed
That is also possible. You just need to make sure that you really switch when you make the change. When asked to delete the existing styles in the project you should do that. Otherwise the new link will give you both styles, with different names, and that will basically be a mess... 8)
* if the repository is set to "Link the styles of repository", there can be no style differences between repository and project because even if I made changes before, as soon as I switch back to "Link the styles of repository" these are undone.
* editing styles in the project does never affect the data in the repository
That's correct. If you apply the style repository styles they will replace all styles of the same name that exist in the project. You can only edit the styles in the project if they are not linked to the repository, and they never go back into the repository.
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
Steffen Heller
Posts: 29
Joined: Tue Oct 16, 2018 2:35 pm
Location: Austria

Re: Can't Edit Styles because they are greyed out

Unread post by Steffen Heller »

Hello Tim,

one point I didn't think about is that repositories do not only contain style information but also a lot of topic files.
In my case, there are some topic files that are stored in the old/existing repository and inserted from there with "Insert Snippet". Some of these topics were also changed after they became part of the repository, so the latest version of them only exists in the old repository (so my understanding).

=> If I create a new repository and link to that wouldn't I lose all the snippets and their latest changes from the old repository?

Sorry, if yet again, I jump from one approach to the next but could I achieve the same thing (two PDF documents with the same content/topics that only differ in some styles) also by simply changing the repository from link to copy, then edit some styles in the project, save the .hmxp file under a different name and then switch between the two different .hmxp files?

Well, the underlying question might be this:
What is the easiest way to create two different PDF versions (=versions with different styles) from the same project and easily switch between them?
Thanks for helping
Steffen
My current Version: 7.4.0 Build 4590
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Can't Edit Styles because they are greyed out

Unread post by Tim Green »

Hi Steffen,

Switching repositories back and forth is currently a little fiddly because of the way they replace styles in your project. However, at the moment that would be the only way to really switch the content styles for the project, since the PDF template (and HTML skins as well) really only switch the layout of the pages and other components around the content, not the content itself.

If you are using repositories for snippets as well then switching is something you won't want to do. Theoretically you could save all the snippet files in their own normal uncompressed project and insert them as normal from-file snippets, selecting them directly from the /Topics folder in that project. However, making the switch from the repository would mean re-inserting all your snippets.

However, there is another way: If all the styles in your projects are really identical -- i.e. have identical names and style tree structure, you can simply import them directly. You would store two dummy projects, one each as a container for the two versions of the styles. Then when you want to switch the styles in your project you go into Styles > Edit Styles and select the Import Styles From option and choose the appropriate dummy project as the styles source. That will then completely replace the stylesheet in the current project with the one from the selected project. But really only do this if it is OK to completely replace all the styles, and if all the style names and structure match! :)
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
Steffen Heller
Posts: 29
Joined: Tue Oct 16, 2018 2:35 pm
Location: Austria

Re: Can't Edit Styles because they are greyed out

Unread post by Steffen Heller »

Tim Green wrote: However, there is another way: If all the styles in your projects are really identical -- i.e. have identical names and style tree structure, you can simply import them directly. You would store two dummy projects, one each as a container for the two versions of the styles. Then when you want to switch the styles in your project you go into Styles > Edit Styles and select the Import Styles From option and choose the appropriate dummy project as the styles source. That will then completely replace the stylesheet in the current project with the one from the selected project. But really only do this if it is OK to completely replace all the styles, and if all the style names and structure match! :)
But for this to work, the dummy projects must also contain all the topics and snippets, is this correct?

Because when I tried, I could create a dummy project and I could load the stylesheet from the dummy project to the current project with "Styles > Edit Styles > Copy Styles From..." but for this option to be active I had to set the repository of the current project first to "Project does not use a repository" (otherwise the "Copy Styles From..." option was greyed out) and with this the connection to all the snippets was lost.

Please, correct if I am wrong.
Thanks for helping
Steffen
My current Version: 7.4.0 Build 4590
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Can't Edit Styles because they are greyed out

Unread post by Tim Green »

Hi Steffen,
But for this to work, the dummy projects must also contain all the topics and snippets, is this correct?
You have to disconnect from the repository, of course, because you are no longer using it. However, the snippets don't have to be in those projects. You can still go on using the snippets from the repository, just no longer with the "from repository" option because you are no longer linked to it. Instead, you use "from file" and select the snippet XML files directly from the \Topics folder in the repository. You can then go on editing the topics in the repository project.

Since you will continue to use the styles with identical names, the formatting will also be correct.
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