Configuring Several Tables

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

Moderators: Alexander Halser, Tim Green

Post Reply
jakerola
Posts: 1
Joined: Tue Jan 26, 2021 9:19 am

Configuring Several Tables

Unread post by jakerola »

My application outputs a number of HTML files containing the program API. I am able to import these files to H&M. Each of the files contain a table which is assigned a "default" table style, which I would like to change to "my_table_style", and table text should be assigned a dedicated table text style. Changing these manually is not feasible, since there are apporximately 100 files that are imported every time we launch a new program version. How can this be automated?

I have tried/considered the following:
  • Adding the table style in the original HTML as <table styleclass="my_table_style">, and table rows with <para styleclass="Table_Text"> . However, these tags are cleared when importing to H&M so the tables are reset to using the default style
  • Editing the table style with a shortcut. However, table styles cannot be assigned shortcuts
  • Creating an Autohotkey sequence to edit the table style with a keypress. However, there is no key command to change the "table style" field in table properties dialog, you would have to point to it with the mouse.
  • Editing the source XML file... a significant programming task that I would resort to only if there is no other option
My preferred solution would be to edit the definition of the "default" table style so that it matches "my_table_style". Is this possible?
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Configuring Several Tables

Unread post by Tim Green »

Hi "Jakerola",

I just checked this and in the current version 9 Help+Manual definitely does import a CSS class with a table, and if you define that class in your table styles in Write > Styles > Edit Styles it will definitely be used.

The style settings for tables are pretty basic, however, because they must be as generic as possible. The table style definitions also don't include styles for the text the table contains because that would be too restrictive -- after all, tables can contain anything and any number of different texts with different styles. What you can do is assign classes to the paragraphs in your HTML. Help+Manual will include those in the import and you can then define a style with that name in the project stylesheet and apply the style to the text after importing to clear out the inline formatting.

Since you are posting in the HM7 forum I assume you're using version 7, and that does not support table styles. In that case, your only option is to do a multi-file search and replace on your XML topic files with a tool like Notepad++ or PowerGREP.

You can download Help+Manual 9 and try it out on your files without purchasing as it will run in fully-functional free trial mode and won't interfere with your HM7 installation. (As an existing user you qualify for an approx. 50% discount on an upgrade to the current version.)
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