Text versus paragraph style in style dialog ?

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

Moderators: Alexander Halser, Tim Green

Post Reply
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Text versus paragraph style in style dialog ?

Unread post by Wolfgang Baer »

Hi,

in the write tab of H&M I can create styles.
E.g. they can be for paragraphs or for characters.
I now made styles for characters. It works like expected.

My remark is about how the styles are displayed in the GUI.
In the screenshots one can see that Char-Styles and Para-Styles
share the same icon. An improvement would be to use different
icons so the user knows what is what (workaround I used is to
add a T for text and P for para to the style name).
text-style.png
text-style_2.png
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23174
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Text versus paragraph style in style dialog ?

Unread post by Tim Green »

Hi Wolfgang,
My remark is about how the styles are displayed in the GUI.
In the screenshots one can see that Char-Styles and Para-Styles
share the same icon.
They already have different icons. However, all the styles in your screenshot are actually paragraph styles, because they also have paragraph attributes. You can tell that because they have paragraph style icons. They work as text styles as well because if you select any text that is less than the entire paragraph, then only the text attributes are applied (so the style works as a text style). If you select the entire paragraph, or nothing at all, then the paragraph attributes will be applied as well.

See "Defining a new text style" in this topic in the help for instructions on how to create a text-only style:

http://www.helpandmanual.com/help/index ... define.htm
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.
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: Text versus paragraph style in style dialog ?

Unread post by Wolfgang Baer »

Yes, I missed one part of the process. When creating a new style, the GUI shows the checkbox below.
text-style_3.png
My assumption was, that this creates a text style. Now I found in the manual that text styles only are text styles if they don't have a paragraph parent.

But: If I now make a "real" text style, it does not inherit all the Font attribute from the para mother anymore (or better it has no para mother).

So lets say if I need a style that ONLY changes the font of selected text to bold but inherits anything else form the para style, the text style seems not the way to go for this?
I tested it like this:
- made a para style with Arial
- then a text style with bold
- then changed the para style to Times
- Result: the bold text keeps it Arial attribute.

Seems to me that for my goal I need two para styles:
one mother with all base settings and a child that only changes the font weight to bold but leaves everything else untouched. This way all values of the child style follow the mother style except for bold.

But this would mean I cannot make only ONE bold text style and use it as complement for any para style. Instead I need to make a lot of BOLD children for all the para styles?

I admit, I am getting confused.
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23174
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Text versus paragraph style in style dialog ?

Unread post by Tim Green »

Hi Wolfgang,

I think you're making it a little more complicated than it needs to be. A text style only has font settings, so there is not really any need to base it on a paragraph style. You will only need to create a text parent style once, then it will be separate, and the only attributes you have to define are the font attributes. And if you really want a text style based on a paragraph style, that is also fine. As I pointed out, you can use any paragraph style as a text style by selecting the text you want to style. Then only the text attributes are applied, and all the paragraph attributes are ignored. :)
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.
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: Text versus paragraph style in style dialog ?

Unread post by Wolfgang Baer »

I'll try to explain again:

Imagine I have three main para styles:
Headlines with Arial
Body with Cambria
Skript with Courier

Within all three styles I might need some text to be bold (or italic or a different color etc.):

My idea for this to make para styles:
- Style_Heading_P (font = Arial)
- Style_Body_P (font = Cambria)
- Style_Code_P (font = Courier)

and text style:
- Style_Bold_T

Goal is:
If I assign Style_Bold_T to a selected string it should ONLY change the font weight attribute.
But it does not, it changes the weight AND the font face etc.

Result:
If e.g. Style_Bold_T includes Arial
it changes the selected string in Style_Body_P (font = Cambria) to Arial bold not to Cambria bold.

So questions is:
Is it possible to make a Text_Style that allows me to decide which font attributes will be changed.
User avatar
Tim Green
Site Admin
Posts: 23174
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Text versus paragraph style in style dialog ?

Unread post by Tim Green »

Wolfgang Baer wrote:Is it possible to make a Text_Style that allows me to decide which font attributes will be changed.
Ah, now I see what you mean. You can't define a text style that only includes the bold attribute and nothing else. It will always include all font attributes, and if any of them are different from the attributes of the selected text then they have priority.
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.
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: Text versus paragraph style in style dialog ?

Unread post by Wolfgang Baer »

Thanks for confirming. Now I can stop to try this.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Text versus paragraph style in style dialog ?

Unread post by Martin Wynne »

Hi Wolfgang,

If you are creating HTML-based output (i.e. not PDF or Print or Word), you can get what you want by modifying the CSS. Simply create a new style with any settings you wish, then over-ride the unwanted settings in the CSS.

For example if you set a style called boldy-boldy as Tahoma 11pt Bold, you would see this in the default.css file:

Code: Select all

span.f_boldy-boldy /* boldy-boldy */
{
 font-size: 15px;
 font-family: Tahoma,Geneva,Verdana,sans-serif;
 font-weight: bold;
}
You can then over-ride this in the topic page template (in the skin if you are using one) by inserting

Code: Select all

<style>
span.f_boldy-boldy
{
  font-size: inherit;
  font-family: inherit;
  font-weight: bold;
}
</style>
immediately above the </head> line.

Then whenever you select the boldy-boldy style you would see Tahoma 11pt Bold in the H&M editor. But in your output you would see only the underlying font made bold.

Alternatively you could modify the default.css file, and put the modified file in your Baggage files so that it replaces the one being auto-generated. The snag with this is that you would need to repeat the file edit every time you make any other changes to the styles.

You can do anything you like in H&M -- but only for the HTML-based outputs. For PDF and the others you are stuck with the RVF editor output.

regards,

Martin.
Wolfgang Baer
Posts: 25
Joined: Tue Jul 14, 2015 1:01 pm

Re: Text versus paragraph style in style dialog ?

Unread post by Wolfgang Baer »

Hi Martin,
that is a valuable information. I have not yet started to dig into to CSS because I only know about their purpose but have no experience in writing a style sheet. This is one of the next points on the to do list. For now I have decided to go the manual formatting way for things like bold. And of course it is for PDF output :roll: Some customers still want a printed manual, so I try to make a nice classic simple design for them. And I must say the PDF output of H&M 7 is really nice.
Post Reply