Non-gui settings for templates, and indenting

  1. lists/numbering

    • I would like to know if it is possible to access the settings within the app or within a template for the indentation of lists/outlines/numbering.
    • I know it can be done via the GUI, but prefer to be able to script all my settings/setups.
      By way of example, on lists etc, the defaults are in 1/2, 1/4 etc of an inch. I prefer metric.
    • I have created my own template using 1.27 → 1.00cm etc, but it is kinda annoying clicking through 10 levels.
  2. Indents

    • I come from a WordPerfect 5.1 background, where there were 2 options …
      • The first was the tab key,
      • the second was the F4 key which added an indent - all text after the indent would align the to same column, much like a numbered list, but without the numbers, and specifically on/from the same line. I would like to have the same functionality (and would assign it to the F4 key if it works, but haven’t found how to do that yet)

Are these doable in LO?


I am not sure that I understand your question.

What you seem to request is a way to customise the default behaviour of Writer (or LO in general) so that all your preferences are active whenever you launch Writer (or other LO component).

There are two aspects:

  • General LO behaviour

    This is controlled by Tools>Options. Explore the various topics.

    In the case of units, see libreOffice Writer>General. The Measurement unit menu allows to select the preferred unit and Tab stops defines the default evenly distributed distance between tab stops.

  • Specific document preferences

    They are stored in a template which is an “ordinary” document with a specific extension (.ott). It contains your customised styles and initial content. Once it is made, use File>Templates>Save as Template to save it as a template known by Writer. Once done, File>Templates>Manage Templates and right-click on your template to make it default.

    Nota: If you operate under Windows, don’t create a new document directly from the desktop because this procedure never references your custom template. Open Writer first and File>New>Templates.

Since these preferences are set in principle only once, the necessity to redo the whole configuration is rather low and so is the scripting.

List numbering

If all your levels have the same formatting (i.e. same indents and tab stops), they can be set simultaneously in Format>Bullets & Numbering or Tools>Chapter Numbering (for chapter numbering) by selecting “virtual” level 1-10 instead of going through individual levels. This does not apply if indents vary with level. But, as said above, you do this only once in your custom template.


Text formatting in Writer is controlled by styles. Indents are set in paragraph styles. You use one paragraph style per “semantic category” of paragraph. E.g. nondescript paragraphs are styled with Text Body (and not be Default Style which is used to set defaults for all other styles). You can define other styles based on Text Body, changing only the attributes you’re interested in. The other attributes will be inherited from Text Body and will also inherit the changes you eventually make on Text Body without the pain of forwarding them.

There is already a built-in style First Line Indent with a pre-set 0.5cm in the first line. Customise it to your custom distance.
You then style the to-be-indented paragraphs with it. Never indent a first line with a tab.

If your question is about a whole paragraph indent, not only the first line, define your own paragraph style with the desired left indent (called Before text in the configuration dialog).

To avoid switching from keyboard to mouse and back, styles may be associated with shortcuts through Tools>Customise.

Ctrl+0 to 3 are by default assigned respectively to Text Body and `Heading 1* to Heading 3.

To discover all the possibilities, download and read the Writer Guide.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

What you suggest does offer me some of the solution I want, but I’d still like to know if it’s possible to access the tabstops and other settings of the new-default-template using non-GUI (eg. the toolbars etc are in XML files). I would primarily like to know if the same “logic” can be applied to documents/templates, and if so, how/where?

General LO and template behaviour - I have changed the settings to 1.00/centimetre, and then done the template import/default side of things.
When I create a new document (based on that “new” default template), the indents in lists etc still seem to stay on the old-defaults of 1.27, 1.91, 2.54 etc. I will try it again with your recommendations in place and confirm if it works as expected.

There is already a built-in style First Line Indent with a pre-set 0.5cm in the first line. Customise it to your custom distance. You then style the to-be-indented paragraphs with it. Never indent a first line with a tab.

Thank you this - I didn’t know about it

I found that if I add .zip to the end of the file name, and unzip it, it contains a bunch of .xml files which can obviously be modified as needed. eg. styles.xml has (amongst others)…
<style:paragraph-properties fo:margin-left=“1.499cm” fo:margin-right=“0cm” fo:margin-top=“0cm” fo:margin-bottom=“0.101cm” loext:contextual-spacing=“false” fo:text-indent="-0.499cm" style:auto-text-indent=“false” fo:background-color=“transparent”/></style:style>

Thanks @ajlittoz

the toolbars etc are in XML files

They may be but this does not solve your problem because the toolbars are not hte settings, they show what the settings are.

I suppose that writing macros could fulfill your goal, though they are usually written to format the current document not the preferences. However the API is quite rich. Personally, I have never written a macro not having felt the need for it till now (I prefer to concentrate on a neat design of my templates). Another guru shouil answer this question.

I’d rather discourage you from tampering with the XML unless you fully understand the ODF standard and how LO Writer implements it (some details may be implementation-dependent).

If you really want to have a look at the XML, it is more reliable to ask Writer to save the document as a “flat XML file” with extension .fodt. You avoid the inflate step and the deflate step after your modifications.