Footnote number padding in LibreWriter

LibreWriter doesn’t provide (so far) a smart way to set a “styled” space between the number of a footnote and the text (of that footnote).

Therefore you should add a (or more than) space in each footnote. But it would be a bad way to solve the problem.

A workaround can be to set the footnote characters (in styles) with a) a border (with an invisible color, such a s white over a white background) and b) a right padding. You can see in the following image:

Librewriter for a pdf book

1. number pages

You can add number pages at the footer of your pages

  • in format -> page style -> footer -> Footer on
  • and then, in footer area (by clicking at the bottom) insert -> page number (select mirror to get different alignment for even and odd pages

2. titles in header

You can also create header, with, i.g., the book title (on the even pages) and the chapter title (on the odd ones):

  • in format -> page style -> header -> Header on (deselect same content for left and right pages)
  • and, as above for the footer, going in header area, insert, i.g. in a left page the field title, in a right page, insert -> fields -> Document -> (type: heading, format: heading content). Don’t forget to set the “up to level” (typically : 2, if you want tha names of headings of 2° level, as h2 in html), changing it from 1.

3. bibliografy

You can also add bibliography enter (i.g. in footnotes) and get an automatic bibliografi index at the the end of your file (book/article). These are the steps:

  • Set a “bibliografy entry” (or “citation”): insert -> table of content or index – > bibliografy entry (or “citation”) -> source: document content – new
  • there you have to set, if it is a book, at least the author, the title and the year, and a short name (in Italian, a sigla) to recall it afterwards quicky. (if Journal Article → Author, Title, Year, Journal).
  • Then you can create, typically at the end of your document, the bibliography index: insert -> table of content or index – > table of content or index or bibliography -> type: bibliography, and there you can edit the structure of the items (and their formatting)

Replacing Autokey in Wayland

Many Linux distros are leaving xorg (x11) for Wayland, as display server protocol. Unfortunately not all the applications are ready for Wayland.

In particular Autokey, a very useful application to expand text and automatize typing operations, is not (yet) compatible with Wayland.

A quite good replacement of Autokey is Espanso. But there are also some limitations:

  • Espanso has big problems in LibreWriter (abbreviations are often expanded with errors). Similar problems there were also with Autokey in LibreWriter, but Autokey was able to provide some workarounds.
  • Espanso, unlike Autokey, can provide a very small range of hotkeys (such as ctrl + alt + d): Espanso can use only hotkeys with ctrl (not with alt or shift) and a few letters. I.g. “x01” means “ctrl + a”. You can find the whole range of possible combinations here.

However, as long as the main typing operations are in LibreWriter, or Kate, you can use that applications possibilities to expand text.

in LibreWriter there are at least two possibilities (to expand an abbreviation):

  • tools – > autocorrect
  • tools -> autotext

In Kate you can use snippets to create something similar to Autokey.

I.g. to create a snippet to wrap selected text with the tag <h1>, you can add this code as snippet code:

${rangeCommand("<h1>%%1</h1>", "title")}

Choose the title as you prefer (obviously without spaces), and a key combination, i.g. ctrl+1.

Don’t forget to add, in the javascript section (the tab scripts) this code

function rangeCommand(command, def) {
    if (view.selectedText().length > 0) {
        return command.replace("%%1", view.selectedText());
    } else {
        return command.replace("%%1", def);
    }
}

In this way, you will be able to add a title <h1> to your selected text.

LibreWiter header and footer

This feature is very useful if you write a book: have headers page with the book title on left pages and chapter title on right pages, and page number at the bottom, for example.

  1. To add a header to a page, choose Insert – Header and Footer – Header, and then select the page style for the current page from the submenu.
  2. You can also choose Format – Page, click the Header or Footer tab, and then select Header on or Footer on. Clear the Same content left/right check box if you want to define different headers and footers for even and odd pages.
  3. Then you can add the field you want, such as page number or book title (with Insert -> Field).
  4. Inserting chapter title is a bit more complex: Choose Insert -> More fields and then click the Document tab. Click “Chapter” in the Type list and “Chapter number and name” (or “Chapter name”) in the Format list and select the level (typically the second one: “2”). Click Insert and then click Close.

LibreWriter styles strange behavior

It could happen that apply a (custom) style doesn’t work as expected, i.g. even you have in that style a margin-left this margin is not applied, or it is only temporarily.

To solve you can try removing unused custom styles. Or making that style non hierarchically depending from other styles.

off-line comparation of two documents

You can use LibreOFfice (OpenOffice), following these steps (see here):

«In order to compare documents you need to have the original document and the one that is edited. To compare them:

  1. Open the edited document that you want to compare with the original document.
  2. Select Edit > Compare Document.
  3. An open document dialog appears»

working with LO alphabetical index

In LibreWriter the best way to create and edit an alphabetical index is to use a concordance file, in wich you can add, edit or delete entries (otherwise you can only add entries).

As “alternative entry” you can set the name actually shown in your index.