Formatted dummy text

The work around user experience often requires to create a minimal working example. Either users report an issue or request enhancements, the comparison with the current situation is necessary. LibreOffice has a built-in feature to create dummy text (type dt and press F3) but this function inserts only unformatted text. So we created an extension that adds some styling to the dummy text.

Installation

Extensions are easy to install: you download the OXT file from https://extensions.libreoffice.org, then start Tools > Extension Manager, click Add and open this file. After reading and agreeing the license you have to restart the application.

Usage

The extension adds the new category “Dummy Text Formatted” to Tools > AutoText and assigns the shortcut to DTF. So when you enter these characters and press F3 you get this:

Formatted Dummy Text

Figure 1: Formatted Dummy Text

The text is based on the common dummy text now with headings (first and second level), paragraph styles (text body, citation), character styles (emphasis, strong emphasis), direct formatting (yellow highlight color, red font color), frame, image, table with “Elegant” tables style, chart, formula, and comments. Objects have captions, so inserting an index is just a click away.

DIY

Creating an autotext extension yourself is pretty simple. Enter the content into a Writer document, select what you want to put into the autotext, and start the dialog per Tools > AutoText. Select a category (ideally you create a new), enter a name (change the shortcut if you want), and create it per AutoText > New (or “New (Text only)” if you don’t want to use any formatting). Learn more at the LibreOffice help.

The new autotext is saved at the user space (for Linux ~/.config/libreoffice/4/user/autotext) within separate files respective the category names. So all of “My AutoText” is in mytexts.bau, for example. The BAU files are packed XML files, rename it to *.zip to access the content. Put the new BAU file into a folder “autotext”, add icon, license, description etc. as required by the extension. Use one of the existing extensions as a prototype (just rename OXT to zip to access the content). And finally upload the extension to share it with the community.

Leave a Reply

Your email address will not be published. Required fields are marked *