Wednesday, March 21, 2018

Adding multimedia to the Help pages of LibreOffice

I have patched some pages of LibreOffice Help with a new feature: You Tube videos.

Now help content authors can create a video on the subject and insert in the page. The video can he hosted in an external server such as You Tube (tested) or any other  (not tested).

The implementation was done enabling the <object> tag in the stylesheet transform. In the old and offline the <object> tag was ignored:

<!-- OBJECT (UNUSED) -->
<xsl:template match="object" />

So now I enabled it in online_transform.xsl with

<!-- OBJECT -->
<xsl:template match="object"><xsl:call-template name="insertobject"/></xsl:template>

<xsl:template match="object" mode="embedded"><xsl:call-template name="insertobject"/></xsl:template>

and I handle the <object> in the insertobject template. The template can select what to do with each object type.You can see an example in the following page:

The video is added as a companion resource of the hep page, it does not intend to replace the correct writing of the hep pages.

The implications are significant. Not only a video can support the contents of the help page, but also other kind of objects can be  acesssed in the helppages.

For example, a help page on autofilter that has a table with data serving as example, can have an object of type spreadsheet inside the page and the user can click on it to open the example spreadsheet and see the live example.

The implementation of other kind of object is not finished but can be easy. In the case of objects like spreadsheets or text documents, the files can be placed in the media/ folder of the help.

Another implication when adding such richness in our help pages is the maintenance of the multimedia, given the fast improvements of the software.  Special care is needed not to add multimedia that depends on a specific release. Instead, the multimedia in the help should focus more generic use of the modules. For example, a tutorial on how to create a pivot table or to create a table of contents in a text document.

Happy multimedia.