Base Guide BG7309 - Macros

Hi all

I have reviewed the Base Guide Macro chapter BG7309, with the following additions

- Accepted all suggestions by Steve Fanning
- cleanup of anchors, frames, styles, Basic and Python code using Andrew Pitonyak source code coloring extension.
- Added section on ScriptForge by flywire (fixed typos and code formatting. A second review is advisable as some commented lines were left in the code)

The file is in WIP folder for further review with track changes enabled.

BG7309-Macros_SF_24Jan2022_OH_15Mar2022.odt

I also added a version in the Published folder and hooked to the master document. A temporary PDF was also updated.

Cheers

I've updated the Base Guide Macro chapter BG7309, with the following
changes:
- resolved outstanding ScriptForge Demo python coding issues and
accompanying text
- reran syntax highlighting code
- updated to LibreOffice_7.x_Template

I couldn't resolve these template issues which need to be fixed:
- All code has extra space between the lines, template Paragraph style
"Code" seems to need "Do not add space between paragraphs of the same
style" option selected
- html renders code lines with coloured background but extra space between
lines as white (contrary to writer and pdf), setting above should fix
- all the code comments and text in strings are in size 10pt font and the
other code is 11pt
- will need a final check for orphan paragraphs which should be considered
within template styles

Inconsistencies in GS7313-GettingStartedWithMacros.odt with template:
- Basic code commonly (inconsistently) uses 10pt instead of 11pt in template
- code blocks have captions

The file is in WIP folder for further review with track changes enabled.

BG7309-Macros_SF_OH_FW_24Jan2022_13Apr2022.odt

HI Team

I have accepted all suggestions from flywire and udpated the Published-Rev0 folder.

- Code lines are now with "code" style (no need to overcomplicate things)
- Extra LiBo* paragraph styles removed.
- Fixes here and there.

Regards
Olivier

HI Team

I have accepted all suggestions from flywire and udpated the Published-Rev0 folder.

- Code lines are now with "code" style (no need to overcomplicate things)
- Extra LiBo* paragraph styles removed.
- Fixes here and there.

Regards
Olivier

Tweaking the template can resolve almost all code colorization presentation
issues as explained below. (Process issues can be worked on separately.)

Key findings:
* Process is a bit of a black art
* LibreOffice_7.x_Template.ott has no Character Styles for colored computer
code
* Code Colorizer Formatter
https://extensions.libreoffice.org/en/extensions/show/71 is used but an
extension bug ignores the configuration dialog Font name, Text sizes and
Tab width
* Fortunately, the extension does not define styles defined in a document
* The Getting Started Guide 7.3 code looks good but Character Styles for
colored code seem to have been manually reformatted
* Adhoc processes will continue to occur in the absence of a standard
process as demonstrated in the Getting Started Guide 7.3 which essentially
duplicates character style trees with _LOCodeBase and OOoComputerCode

Suggested template workaround changes for existing extension:
* Use Paragraph Style Code Font Size of 10pt (extension mixes sizes and end
of line comment bug affects following line)
* Use Paragraph Style Code Spacing Do not add spacing to paragraphs of the
same style (reduces BG7309 page count by 15% and looks better)
* Use Character Style OOoComputerCode parent of Code (to carry style
through as intended)
* Character Style Code descendants must only configure color

Furthermore, define the following Character Styles in the Documentation
template instead of the extension:
OOoComputerCode
_OOoComputerBase
_OOoComputerComment Grey
_OOoComputerBaseNoLocale
_OOoComputerSpecial
_OOoComputerLiteral Red
_OOoComputerNumber Red
_OOoComputerKeyWord Blue
_OOoComputerAltKeyWord Blue
_OOoComputerIdent Green

The LibreOffice color palette should be used, for example, assuming no
color shades: (Grey), Orange Accent, Blue 1, Green 1. Other styles might be
needed for Bash, SQL, Java, and XML.