Character Styles

I am updating the template for the LO user guides and chapters and have come across the following note:
“In order to let character styles inherit the font size of the paragraph style, do not set the font size in the font tab of the Character style dialog.”
Could someone explain this note because you CANNOT set the font size to zero in Font in the Character Styles dialog. You can set the language used to NONE which is OK.
Regards
Peewee

1 Like

Just had a thought.
The font size in a character style is fixed when the character style is used in a paragraph. The character style does NOT use the font size set in the paragraph style, but uses the font size set in the Character Style dialog.
Regards
PeeWee

HI @PeeWee

I think the sentence is not exact or complete. In the Help we have (Font)

Reset to Parent

Values for the current tab are set to those found in the corresponding tab of the style specified in “Inherit from” in Organizer. In all cases, also when “Inherit from” is “- None -”, current tab values specified in “Contains” are removed.

Cheers
Olivier

Character styles should only contain the informations, which is special for this style. So have a look at
Character Style → Organzier → Contains
There shouldn’t appear any font size. If you choose a special size in the Font-tab you can’t use this special character style for your whole document. If your whole text content is set to 10 pt and character style is set to 12 pt it will writer 12 pt characters in 10 pt lines.

1 Like

Hello

I have attached two screen shots of the Character Style dialog - Organiser page and Font page. This should help solving the problem.

You can set the language to None for a Code character style so there is no interference with the language used in a paragraph style.

You cannot set the font size to None for the character style. This means the font size set in the character style changes the font size when the character style is used in a paragraph.

To maintain good format in a paragraph, the font size in a character style has to automatically match the font size used in the paragraph style. In other words, to be able to set font size to None.

Is there a solution?

Regards

Peter Schofield
psauthor@gmail.com
Technical Writer, LO Documentation Team

RobertG
December 31

Character styles should only contain the informations, which is special for this style. So have a look at
Character Style → Organzier → Contains
There shouldn’t appear any font size. If you choose a special size in the Font-tab you can’t use this special character style for your whole document. If your whole text content is set to 10 pt and character style is set to 12 pt it will writer 12 pt characters in 10 pt lines.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hello
After a little more testing, I think I may have found a solution, which is to ONLY use the default character styles available in LibreOffice.

The default character styles do NOT to have a size restriction and no font size is shown in Character Style dialog - Organiser - Contains. When a custom character style is created, the font size appears in Organiser - Contains. I tested this using Source Text, a default character style, and Code a custom character style. Can someone please confirm my findings.

If I am correct, the template used for LO chapters and user guides has to be changed to only using default character styles.

Regards

Peter Schofield
psauthor@gmail.com
Technical Writer, LO Documentation Team

Have a look at some of the character styles used for German Base-Handbuch:


Only the needed change of text content in any paragraph has been saved in the defined style.

Thank you Robert

I have managed to copy character styles from the German Handbook into the LO Template I am updating. I changed the font to Liberation Mono and it works with different font sizes. Even when you change the font size of a paragraph, the character style also changes to the new font size.

I shall now carry on updating the template using the German character styles as a base.

Regards

Peter Schofield
psauthor@gmail.com
Technical Writer, LO Documentation Team

One hint for the font: I changed all in German Base Handbuch from Liberation to DejaVu. First used Liberation also, but there were different font height when switching from Liberation Sans to Liberation Mono. So the distance between text lines (don’t know if this is the right word) expand when setting some code in a Liberation Sans text to Liberation Mono and removes back to “normal” distance next line.

Tested DejaVu and saw all fonts will need the same height if set, for example, to 12pt. No changing of distance between lines when adding a specific font style to some words.

@ohallot has indicate the procedure for reset the properties of a character style to the parent. in his reponse number 3
After reset the properties you can change any property but NO CHANGE THE FONT SIZE and press the OK button.

There is no option in the properties of a custom character style to specify “No font size”, but it can be done.
To make the font size of a custom character style match the font size of any paragraph:

  • New style:
    1- Create a character style with inheritance of “No Character Style”
    2- Change the font to Liberation Mono
    VERY IMPORTANT: DO NOT CHANGE THE FONT SIZE
    3- Change the font color, the background or anything you think is appropriate.
    Click the OK button
    You already have a character style that, when applied to any paragraph, adapts its font size of any paragraph

Note: Although you saw in the dialog that the font size is 12 pt, this corresponds to the default font size that Writer uses for a file created with the Default template. FORGET THAT SIZE.

– Style already created:
1- Open the properties dialog of the Code style
2- In the Font tab, press the Reset to parent button. You have to be in the Font tab because otherwise it has no effect.
— The Reset to parent button only resets the properties of the opened tab.
3 - The font will have returned to Liberation Sans, the size to 12 etc.
4 – Change only the font to Liberation Mono. DO NOT CHANGE THE FONT SIZE.
5 – Click on the OK button.

You now have the Adaptative character style.

Olivier has indicate the Reset to parent in his reponse (Number 3)


Hello bantoniof

I have just tried the two methods you suggest and they do work. However, I shall do some tests so that I can work out the procedure for creating character styles. This will make it easier for people to understand. It did take me a few attempts to make it work as expected.

Thank you
PeeWee

Hi

I come to the conclusion that the issue needs a usability review. I’m no expert but if I had a “inherit from paragraph” or "use paragraph " in all choices (drop-down) of the Font tab, I’ll catch quickly.

“Reset to parent” is not user friendly.

https://bugs.documentfoundation.org/show_bug.cgi?id=159099
Olivier

I think the clearest thing would be that in the font size drop-down menu, apart from the point sizes, there would be an “Adaptive” option.
or a box next to it labeled “Adaptive” that would clear the font size

Hello Bantoniof

The sections are not new.

I renamed the sections so that a user can easily understand what the purpose of each section is. There are instructions in the user guides to use understandable names when inserting objects into a document so that they are easily identified in the Navigator. Sections are an object that has other objects inside, including text.

Regards
PeeWee