Template Style Definitions

To help the volunteers create LO documents using the chapter and user guide templates, I have created a file called LO24-TemplateStyleDefinition. It is in English > Contributor Resources > Chapter Template folder.
The idea for the file came from B. Antonio Fernández
Please review and make comments.
Regards
PeeWee

Hello All.

Should there be a defined character style named code?

This style appears to be needed when using the Code Highlighter 2 extension - as described in the “Highlighting code words” section of the file New-UG-Chapter-Template-LO24-02PS.ott.

Regards,

Steve

Hello Steve

The Code Highlighter extension introduces its own character codes when it is used to format code lines. There are too many of these custom character codes in the extension to list in Character Styles for the template.

The paragraph style for code paragraphs is Example. This use the Liberation Mono that is required for code lines. Example is a default paragraph style and it was selected to reduce the number of custom paragraph styles in the template. The Code paragraph style was a custom style.

The section "Inserting code lines” is incorrect and will be changed to Example for the paragraph style. I will check all the procedure for formatting code lines and correct and reissue the template.

Regards
PeeWee

Hello Steve

Please disregard my previous reply.

I have just done a brief check and the paragraph style will be Code. The Liberation Mono is reduced to 10pt so that more characters can be used in a line of code.

Template will be adjusted.

Regards
PeeWee

Hi Peter,

I’m not sure I agree with the proposed approach.

You are correct that Code Highlighter 2 generates a set of character styles. These styles form a hierarchical set, with the top level of the hierarchy being the “ch2_libreoffice” character style. I think that we should define a “Code” character style (using the mono font that you mentioned), so that the “Parent character style” field on the Code Highlighter 2 dialog can be set to “Code”. This will ensure that the properties of the “Code” character style are automatically propagated to all “ch2_libreoffice” character styles.

Using only character styles should allow us to have coloured code fragments within normal paragraphs if needed, and this approach is currently used in parts of the Base Guide.

Regards,

Steve

Thank you for the info. Will modify the template to include your suggestion.
Regards
PeeWee

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

Thanks Peter.

Regards,

Steve

This document needs a lot of work:

  • The styles contained in the document do not follow the hierarchy explained therein.
  • Not all styles used in the documentation appear
  • The category to which the styles belong does not appear
  • Some styles do not have a defined hierarchy.
  • Captions styles do not correspond to how Writer typically works
  • Some styles need an explanation of why they are used

Hello Steve

Information on the Code Highlighter extension has been updated in the template using your suggestion.

A code character style was created, the Code Highlighter extension installed and used on a code example. It works very well.

Also, if you remove the highlighting, the character styles generated by the extension also disappear from the Character styles. In previous versions of the extension, this did not happen. A definite improvement.

Regards
PeeWee