LO Chapter Template 7-4

Hello Antonio

The idea of character styles is to make them more prominent in a paragraph for LO users to notice the words and what they are for. I am not sure what you mean with your message, but I find the present character styles OK and understand what they are for.

The Code character style matches the Code paragraph style. That is the reason for using 10pt. This allows for more characters to fit on one line in the paragraph style to help prevent long lines of code of line breaking.

The Keystroke character style uses the Liberation Mono font so it stands out for keyboard shortcuts.

Character styles are only used in the body of the text. Also, they are not used in titles or headings and will not appear in the Table of Contents.

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

Hello

I am sending this email only to you so as not to fill the post with comments.

To show the reason for the modifications that I think are necessary, I have created a template and uploaded it to the Nextcloud Contributors Resources folder. (Proposed_modification_Chapter_Template-7.4.ott)

-It is a copy of the template LO-UG-Chapter-Template-7-4.ott
-I have inserted a page at the beginning as an example
-I just created a new style (Keystroke_New) I have not made any more modifications

Hello

Will look at your suggestions when I return from my holiday, which will be on 18 November 2022.

Regards

Regards
Peter Schofield
Technical Writer, LO Documentation Team

Hello Antonio

With paragraph styles having different font sizes and text colouring, using a character style in a paragraph will help to emphasise a word, for example keystroke. A character style only changes the emphasis (bold or italic), or the font (Liberation Mono), or both emphasis and font and does not change font size.
It is recommended to not use a character style in a heading paragraph style, but to reword the heading so there is no need to use a character style.
Liberation Mono is installed with LibreOffice. This means that will not be any font problem when an LO document is opened on another computer.

It is recommended not to use Caution or Warning in a software user guide.
A Caution is used to give notice that there is a possible risk of damage and slight risk of injury if something is not done correctly.
A Warning is used when there is a high risk of injury and danger to life or a high risk of damage if something is not done correctly.
An LO user guide is a software user guide and there is only a need for Notes and Tips to be used.

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

sorry again for my bad english

– With paragraph styles having different font sizes and text colouring, using a character style in a paragraph will help to emphasize a word,…

I already knew that… But if you change the font size of a character style, it does NOT adjust to the font size of the paragraph style

– It is recommended not to use Caution or Warning in a software user guide…

The modified template is not going to be part of any guide, I have used it to warn whoever created the styles (I don’t know if it was you), and I think it is important enough because it damages the document layout.

– It is recommended to not use a character style in a heading paragraph style,

I also knew, the paragraph styles to which I have applied the character styles are just examples of how the current character style (KeyStroke, which does NOT adjust) and the one created as an example (Keystroke_New which adjust perfectly ).

– Liberation Mono is installed with LibreOffice. This means that there will not be any font problem when an LO document is opened on another computer.

The DejaVu font family is also installed with LibreOffice, at least in version 7.3 it is included in the installer

Hello Antonio

After a little testing using several computer displays I have come to the conclusion that there is no need to change the font for the character style Keystroke. The definition quality of a computer display and the zoom factor used for LibreOffice do affect what is displayed and what an LO user sees. There are subtle differences between DejaVu Sana Mono and Liberation Mono, but not enough to change the Keystroke character style in the chapter template.

Maybe you did not understand my explanation about a Caution. There is no risk of damage or injury when us LibreOffice software to create documents. Therefore, using a Caution is not required. There is only a need for Notes and Tips is a software user guide.

Hope that helps.

No need to apologise for your English. It is good. Not 100%, but good. Even my English is not perfect and I am native speaker.

Regards

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

Hello Peter

I see that you have not understood my suggestions, it is possible that I do not explain it well so I will try to be more concise and please read it carefully.

1.- The suggestion for the use of DejaVu Sans Mono is for the CODE character styles and their derivatives, (Literal, Number, String … ). This font has tighter kerning and is thicker, so at small sizes it is more readable. It was the font that LibreOffice put by default in the macro editor in previous versions. -This is just a suggestion.

2.- The font used for KeyStroke is correct, (but not the size)
When defining the character style KeyStroke, the font size has been changed and has been set at 11 points (a fixed font size has been created).
The size created by default is relative to the size of the default paragraph style, normally 12 points and This size should NOT be changed, although other attributes can be changed (color, highlighting etc.) – The size created by default is not really 12 points, it has no size (the size of the letter used in the default paragraph style is displayed, but no size is defined)

  • When changing the size of the font, it will have a fixed size. For example, if the size of Keystroke is changed to 11 points,
    when applying the character style to a word in a paragraph of 18 points, the text will have a size of 18 points in everything except the word that has the Keystroke character style, which will be 11 points.

  • If the size of the character style is not touched, that size will not be defined, so it adapts to any paragraph style,
    In the previous example, all, absolutely all the text of the paragraph will have a size of 18 points and the word in which the Keystroke character style has been applied will have the defined attributes, but the font size of the entire paragraph will be 18 points.

  • If at any time the font size for Keystroke is changed, and later you want it to adapt to any paragraph style, the logical thing would be to change its size back to 12 points (or the font size of the Default paragraph style), This is not possible, because the font size has already been converted to fixed and when applying it in the 18 point paragraph, it will not adapt.
    The whole paragraph will have a size of 18 points except the word with the keystroke character style, which will now be 12 points.

The solution is to create the Keystroke style again and not touch its size.

3- in the Code character style the font size has also been changed and it does not adapt as it sould be either.

Finally

  • I want indicate that although 18-point paragraphs are not used, the current style of KeyStroke does not adapt to the font size of the Footnotes nor in the Contents of the table.
  • I think this should be corrected.
    Saludos
    bantoniof@gmail.com

I disagree with your assertion about Caution notices in software user guides, that “It is recommended not to use” them. Recommended by whom? They are often used to indicate potential loss or corruption of data.

Jean

I agree with Antonio’s comments about character styles. They should not have a font size defined, for the reasons given. The problem described is most noticeable to me in tables but occurs elsewhere too.

Jean

I understand this comment suggests applying the size to the Code paragraph style and not the Character style. Code font size has deliberately been set to allow 80 characters on a line as a reasonable compromise for most code.

The suggestion about changing the current font type (Liberation Mono) to DejaVu Sans Mono in Code styles Obviously refers to both the Code paragraph style and the Code character style.

  • This is just a suggestion, which may be or may not apply.

Other than this suggestion I think this should be corrected.:
1- The Code character style has the same problem as the KeyStroke character style: It doesn’t scale to the font sizes of the paragraph styles because it is set to a fixed size of 10 points.
Note that the character style is also applied to paragraphs with a style other than code.

2- The character styles for syntax highlighting in macros (ch2_LibreOffice_Operator etc.) have the same problem because they inherit from the Ch2_LibreOffice style and Ch2_LibreOffice inherits from Code.

To resolve this issue in documents with Code character styles already applied:

  1. Rename the Code character style (for example with the name Old_Code (All text with the Code character applied to it now has the Old_code character style applied).
  2. Create a new Code style without changing the font size to fit all the paragraph styles.

– To change the already applied Code character style (Old_Code) in other non-macro paragraphs (Text Body etc.) Use the Find and Replace tool and replace all occurrences of the Old_Code style with the new Code style

– To change the styles on the text relative to the macros without having to change all the applied highlighting styles, the easiest solution is:
Modify the ch2_LibreOffice character style in the Organizer tab to inherit the new Code style.
All styles with syntax highlighting will seamlessly adapt to the paragraph style where they are applied.

Finaly remove te Old_Code character style when not be in use.

Code font size has deliberately been set to allow 80 characters on a line as a reasonable compromise for most code.
To present the 80 characters per line, the code paragraph style must be used, set to the appropriate font size (may be 10 pt).
When applying the character styles they will adapt if they are well defined.

Note:

  • The character style should be created based on the “Default Character Style”
  • Any property of a character style (kerning, highlighting, background, etc.) can be changed when the character style is created or afterward.
  • Do not change the point size of the font in the character style. So it will addapt to fit any font size in any paragraph style.

Hello Antonio

The Code paragraph style is Liberation Mono and font size is 10pt. This allows for a line length of 80 characters, which is

Regards

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

Peter,
I have got completely lost in this thread, so I want to make sure which file we are discussing for the chapter template. Is it LO-UG-Chapter-Template-7-4.ott in the Contributor Resources folder? (Your original post on this thread did not give a name.) Thanks!

It would be useful to share NextCloud links in posts.

HI @bantoniof

I was reviewing the template for other purposes and found your remarks on the Keystroke character style.

When editing a character style, you can press “Reset to parent”. Then the character style get properties from the paragraph style. You must then set each property as you wish for the character style. Properties not set will inherit from the paragraph style (e.g. font size).

So Keystroke can be reset to parent. Then set Liberation Mono, italic, but do not set the font size.

Admitedly this behavior is quite obscure.

Cheers
Olivier

Tahks for the observation, this is more usefull than create a new style from 0

The reset to parent style is applicable to paragraph styles, the font properties (also the size) are reset to the parent style.
But the same does not happen with the Character styles, such is the case of the Code and Keystroke character styles.
By default, character styles should be created based on “No Character Style”.
If at any time the size is modified, it cannot be reverted to the parent style because once it has inherited the attributes of “No Character Style”, it is detached from it.
It is not possible to indicate that the parent style is “No Character Style” again, because it does not appear in the list.
And consequently, the font size dont’ change.

Even if it is assigned, it changes the parent style to another defined style, I have not been able to get the font size to changed (with Reset to parent style).
– You can try to Reset to parent style to change the size of Code character style in the new proposal template.

Hi @bantoniof
“No Character Style” is not a real character style. It is explained in the Help as

No Character Style is actually the set of character properties of the current paragraph style. Choose No Character Style to reset the character properties of the selection to those of the paragraph style. You cannot customize No Character Style.

https://help.libreoffice.org/7.6/en-US/text/swriter/01/05130002.html?&DbPAR=WRITER&System=UNIX

That property is not trivial.

When creating a character style, you can choose “No Character Style” as your first choice for inheritance. But then "No Character Style is changed to “None”. As explained in the Help, your new style does not have any attribute set.

You can confirm the attributes set in the “Contains” area of the Organizer tab. You have there the attributes that were set for the style.

[UPDATE] To reset the attributes, click on the “Reset to Parent” button of the specific tab page to have the attributes removed from the Contains are of the organizer.

Olivier

What is indicated in the Help related page is in theory, but it does not work in any of the versions that I have on my computer.

  • I have tried it in Proposal-Template-24.odt
    With the Code Character Style as well as several new styles created.
  • Once the attributes have been changed, it is not possible to reset them to the parent “No Character Style”.

The biggest problem arises with the font size: if the font size is not changed, the character style adapts to the font size of any paragraph. but if it is changed, the character style becomes a fixed size that cannot be reset, and does not adapt to all paragraph styles.
– Which means creating a new style from scratch and not touching the font size.

– Indication in the help page
### 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.
https://help.libreoffice.org/7.6/en-US/text/swriter/01/05130002.html?&DbPAR=WRITER&System=UNIX

Instaled version:

Version: 7.5.8.1 (X86_64) / LibreOffice Community
Build ID: a3cc32c5bcaabeae7ab60e12c44c40a7d8d36345
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded

Paralell version:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded