Emulating your work

I would like to create a series of web pages that have the same format as the LO Guide for Writer (https://books.libreoffice.org/en/WG71/WG7100-Preface.html). 
Would you tell me what software tools you use to create those pages or if it is a manual process? 
I am trying to determine the best way to organize and present a club's Constitution, Bylaws, Policies and Rules.
I currently have been capturing them using LO and would like to use the features of LO to create TOC, Indices, etc but have not figured out how to translate that into a well designed web presentation.
Any information and/or hints you would provide would be greatly appreciated.

Dan CarrTechnical Resources Advisory CommitteeNewfoundland Dog Club of America
www.ncanewfs.org

Hi Daniel

The publication of our books in HTML as pointed is still a manual effort carried by myself. Automation is not here yet but here are the trail to follow:

- Presentation at LibreOffice conference at
https://www.youtube.com/watch?v=iqcVbksGIto&list=PL0pdzjvYW9RFSMB71bqh_bT-SkX5FOS9x&index=47

Some written instructions
https://olivierhallot.blogspot.com/2021/03/exporting-libreoffice-guides-to-html.html

https://olivierhallot.blogspot.com/2021/03/exporting-libreoffice-guides-to-xhtml.html

- use the writer2html extension at
https://extensions.libreoffice.org/en/extensions/show/writer2xhtml

I hope it helps you, feel free to ask for more information, but please subscribe to our mailing list.

Kind regards

Olivier

Oliver,

if you decide that you want to attempt to automate some of these things, let me know and I can run some tests to see if it is practical to complete some of the tasks using macros (or similar). For example, verifying that frames or graphics are anchored as a character. Easier, obviously, if ALL graphics / frames must be anchored as a character. I never did attempt that with a macro, but worst that can happen is that I fail to do it in a useful way and the step is still manual.

Hi Daniel

The publication of our books in HTML as pointed is still a manual effort
carried by myself. Automation is not here yet but here are the trail to
follow:

- Presentation at LibreOffice conference at
https://www.youtube.com/watch?v=iqcVbksGIto&list=PL0pdzjvYW9RFSMB71bqh_bT-SkX5FOS9x&index=47

Some written instructions
https://olivierhallot.blogspot.com/2021/03/exporting-libreoffice-guides-to-html.html

https://olivierhallot.blogspot.com/2021/03/exporting-libreoffice-guides-to-xhtml.html

- use the writer2html extension at
https://extensions.libreoffice.org/en/extensions/show/writer2xhtml

I hope it helps you, feel free to ask for more information, but please
subscribe to our mailing list.

Kind regards

Olivier

Hello Andrew

Thanks for the kind offer!!!

There are a set of scripts that we welcome for the LibreOffice Guides sanity maintenance. Often we do this manually but automation hours of work. Here is the list:

- Remove all direct formatting, but flag where it occurred, for later inspection.

- Traverse the document and flag styles "not listed" in the official template style (legacy styles, Cut&paste imported contents...)
    + paragraph, character, frame, pages
    + add a comment on the offending object for manual removal

- Clean lists: ensure paragraph with bullets and numbering are actually a paragraph with the right list style.
    + Often I see "Text Body + direct bullet" rendered exactly as "List 1".
    + Bullet applied directly on "List 1" paragraphs (breaks list alignment).
    + outlines applied directly on paragraph (breaks list alig't)

- As you noticed, ensure all images are anchored "as character"
    + Paragraph holding the image must have paragraph-style "Figure"
    + Caption must have paragraph style "Caption"

- Apply table style to table
    + AFAIK there is only one style for all tables, except
    + tables used to align objects in the page

Kind regards,

Olivier

Oliver, I will start working my way down the list to see if I can find good ways to mitigate and attempt to develop common sense rules to automatically fix things.

QUESTION: Is there a nice list of "approved paragraph styles" that I can use to look for styles that are not on the approved list? I have been out of the documentation game for a while.

I randomly chose a small chapter to look and something longer. 
To start, I do NOT want to fix things, but to understand what I am seeing. My first macro writes a summary of what it sees along with the document URL. The URL points to a file on my hard drive.

First, I looked at embedded figures:

Document 1. Everything is fine except that the LOGO is anchored to a paragraph with the wrong style. I am not sure that we want the Logo to follow the conventional naming convention. Perhaps I can assume that all logos are named "LibreOfficeLogo" and skip it. Here is my firs summary:

*********** START SUMMARY DOCUMENT 1 *******************
file:///andrew0/home/andy/Documents/OpenOffice/LibreOfficeDocumentation/WG7202-WorkingWithTextBasics.odt
 
Figure (LibreOfficeLogo) anchored to paragraph style New Chapter
 
Figures not anchored as character: 0
Figures anchored to the wrong paragraph style: 1

*********** END SUMMARY DOCUMENT 1 *******************

The next document was longer and had some more interesting issues:
It looks like every chapter has the logo anchored to a paragraph named New Chapter. Perhaps the rule is that I do NOT attempt to change paragraph style for "New Chapter" and I do NOT look for a caption.  Note that I did not try to look at captions yet. For exporting purposes, we might want to still anchor these images as a character rather than "AT_PARAGRAPH". Note that "AT_PARAGRAPH" is an internal name to LO.

I do see a "Text Body" for Image2, which corresponds to the very last image, about "Writer Guide" on the last page. Another image that we probably do NOT want to change.

I see that this document has graphics50 and graphics39, which are in a table where the table paragraph style is "Figure" and there is no caption. So need to watch for that somehow rather than blindly modifying all tables to use styles "Table Heading" or "Table Contents"

I see that Table 27 is kind of like a caption for Figure 59 and all paragraphs are of style Caption. That can probably be changed with no problem.

*********** START SUMMARY DOCUMENT  2 *******************
file:///andrew0/home/andy/Documents/OpenOffice/LibreOfficeDocumentation/0312CG3-CalcMacros_ADP_JHW_CW_20100428.odt
 
Figured (Image1) is anchored AT_PARAGRAPH Anchored paragraph style name is: Guide Name
Figured (Image1) anchored to paragraph style Guide Name
Figured (LibreOfficeLogo) anchored to paragraph style New Chapter
Figured (Image3) anchored to paragraph style New Chapter
Figured (Image18) anchored to paragraph style New Chapter
Figured (Shape 1) is anchored AT_PARAGRAPH Anchored paragraph style name is: Figure
Figured (Image2) is anchored AT_PARAGRAPH Anchored paragraph style name is: Text body
Figured (Image2) anchored to paragraph style Text body
Figured (Image42) anchored to paragraph style New Chapter
Figured (Image60) anchored to paragraph style New Chapter
Figured (Image90) anchored to paragraph style New Chapter
Figured (Image102) is anchored AT_PARAGRAPH Anchored paragraph style name is: Caption
Figured (Image102) anchored to paragraph style Caption
Figured (Image113) anchored to paragraph style New Chapter
Figured (Image143) anchored to paragraph style New Chapter
Figured (Image168) anchored to paragraph style New Chapter
Figured (Image196) anchored to paragraph style New Chapter
Figured (Image213) anchored to paragraph style New Chapter
Figured (Image224) anchored to paragraph style New Chapter
Figured (Image253) anchored to paragraph style Text body
Figured (Image260) anchored to paragraph style New Chapter
Figured (Image282) is anchored AT_PARAGRAPH Anchored paragraph style name is: Caption
Figured (Image282) anchored to paragraph style Caption
Figured (Image288) anchored to paragraph style New Chapter
Figured (Image306) anchored to paragraph style New Chapter
Figured (Image335) anchored to paragraph style New Chapter
Figured (Image363) anchored to paragraph style New Chapter
Figured (Image387) anchored to paragraph style New Chapter
Figured (Image405) anchored to paragraph style New Chapter
Figured (Image424) anchored to paragraph style New Chapter
Figured (Object53) anchored to paragraph style Standard
Figured (Image431) anchored to paragraph style New Chapter
Figured (Image462) anchored to paragraph style New Chapter
 
Figures not anchored as character: 5
Figures anchored to the wrong paragraph style: 28

​​​​​​​*********** END SUMMARY DOCUMENT 2 *******************

Hello Andrew

Thanks for the kind offer!!!

There are a set of scripts that we welcome for the LibreOffice Guides
sanity maintenance. Often we do this manually but automation hours of
work. Here is the list:

- Remove all direct formatting, but flag where it occurred, for later
inspection.

- Traverse the document and flag styles "not listed" in the official
template style (legacy styles, Cut&paste imported contents...)
+ paragraph, character, frame, pages
+ add a comment on the offending object for manual removal

- Clean lists: ensure paragraph with bullets and numbering are actually
a paragraph with the right list style.
+ Often I see "Text Body + direct bullet" rendered exactly as "List 1".
+ Bullet applied directly on "List 1" paragraphs (breaks list
alignment).
+ outlines applied directly on paragraph (breaks list alig't)

- As you noticed, ensure all images are anchored "as character"
+ Paragraph holding the image must have paragraph-style "Figure"
+ Caption must have paragraph style "Caption"

- Apply table style to table
+ AFAIK there is only one style for all tables, except
+ tables used to align objects in the page

Kind regards,

Olivier

Hello Andrew
Apologies for the delay in answering you.

Actually the Doc team has a chapter template with all the styles described in detail. A great effort from Jean Weber and Bdave Barton to name a few members.

Links is

https://nextcloud.documentfoundation.org/s/3yHCCcrMT3Nc83F

Kind regads
PS. I'll comment your findings in a moment.

Hello Andrew

Comments in-line.

Oliver, I will start working my way down the list to see if I can find good ways to mitigate and attempt to develop common sense rules to automatically fix things.

QUESTION: Is there a nice list of "approved paragraph styles" that I can use to look for styles that are not on the approved list? I have been out of the documentation game for a while.

I randomly chose a small chapter to look and something longer.
To start, I do NOT want to fix things, but to understand what I am seeing. My first macro writes a summary of what it sees along with the document URL. The URL points to a file on my hard drive.

First, I looked at embedded figures:

Document 1. Everything is fine except that the LOGO is anchored to a paragraph with the wrong style. I am not sure that we want the Logo to follow the conventional naming convention. Perhaps I can assume that all logos are named "LibreOfficeLogo" and skip it. Here is my firs summary:

*********** START SUMMARY DOCUMENT 1 *******************
file:///andrew0/home/andy/Documents/OpenOffice/LibreOfficeDocumentation/WG7202-WorkingWithTextBasics.odt
  Figure (LibreOfficeLogo) anchored to paragraph style New Chapter
  Figures not anchored as character: 0
Figures anchored to the wrong paragraph style: 1

*********** END SUMMARY DOCUMENT 1 *******************

Correct, except that the anchoring should be as character. Style "New Chapter" should be applied to the first paragraph of the Chapter and has "Page Break Before". "LibreOfficeLogo" is a named image and name should be unique in chapter. NO caption here.

The next document was longer and had some more interesting issues:

Please bear in mind that the file in the link you posted is not accessible, and if I may, its filename indicates a very old document.

Considering the chapter on Basic macros of the Getting started guide, here is the link of the last published chapter:

https://nextcloud.documentfoundation.org/s/RwMEeyTpmDSyCem

You may also get all chapters from the wiki:

https://wiki.documentfoundation.org/Documentation/Publications

In that particular chapter, of which you are one of the major contributor, there some extra character styles suitable for displaying code listings. These styles are not in the template mentioned earlier (to be fixed).

Kind regards

Perfect, I'm ashamed that my Google foo did not allow me to find that.

This is exactly what I want.

⁣Get BlueMail for Android ​