LibreOffice Writer for Linguists and Linguistics
There are many high quality sites telling you how to use Microsoft Word for your specific linguistic typesetting needs (for instance, Maite Taboada's webpage, or this site by Ng E-Ching). Unfortunately, I have not seen any page specifically dedicated to LibreOffice Writer1 – which is a pity, since LibreOffice is free software (in both senses), and can be used by anyone free of charge.
Many of the tips for Word are valuable also for LibreOffice (and I would strongly encourage you to have a look), but making numbered examples (with glosses) works quite differently in LibreOffice, and I could not find an easy way of doing it in the (extremely scattered) documentation for LibreOffice. So, this is my attempt to providing some documentation for LibreOffice Writer.
CAVEAT EMPTOR: I have tested this under LibreOffice Writer 6.4.5.2 on OpenSuse Leap 15.2, and also with LibreOffice Writer 7.1 on Windows 10. I assume that these procedures are not very different in other operating systems and versions of LibreOffice, but this is only an assumption.
Creating Numbered Examples
Assume you have just written a paper with 100 examples, and you have written the numbers of the examples as plain text. Unfortunately, you notice that
- you really should add another example between examples (9) and (10) in the introduction. This would make things much clearer.
- Your section 2.2 (containing examples 44–52) should really become section 4.1.
You have lots of work to do! If only there were a way of adjusting the numbers of the examples automatically (and also the cross-references to them). Do not worry – this is possible, and the following will show you how to do it.
In order to create automatically numbered examples, we need a way of introducing a custom counter for this purpose. Here is how to do this:
- Click on INSERT → FIELDS → MORE FIELDS (This may be bound to <Control F2> on your computer, but on my computer, the window manager overrides the keyboard shortcut).
- Click on the VARIABLES tab.
- Under TYPE, choose "Number Range", and make sure that on the right column, you choose "Arabic (1 2 3)".
- Under SELECT, choose "Text" (not sure that this is necessary).
-
We need to give this new field a name. In the NAME field, write "NumEx" (for Numbered Example) or something like this.
- Finally, click on Insert
With this procedure, you should have introduced the numbered field for your numbered example in the file. Henceforth, you should not have to reintroduce this counter manually each time you make a numbered reference; NumEx is a choice that should appear from now on in the middle SELECT column of the VARIABLES tab (as can be seen in the screenshot above).
Referring Back to A Numbered Example
Having a numbered example is excellent, but you also want to be able to refer back to it, and in a way where it does not matter if you swap around text. This is how you can achieve this:
- Click on INSERT → FIELDS → MORE FIELDS (This may be bound to <Control F2> on your computer)
- Click on the CROSS-REFERENCES tab. You can also go directly to INSERT → CROSS-REFERENCE.
- In Type, select NumEx (or however you called your Field).
-
In Selection, you can see the instances of your NumEx fields. Choose the target of your cross-reference.
- In Insert reference to, you can choose various options. You probably want to choose Category and Number (which does not include the parentheses) or Reference (which does include the parentheses).
-
Finally, click on Insert
Now, the cross-reference will always refer to your chosen target, no matter where in the text you choose to place it.
Making Glossed Examples
When working with examples, there will often be cases where your reader does not know the language you are talking about (in fact, this might be the case for any language other than English). In this case, you need to make a glossed example.
I assume that you know how to gloss, but have a look at the Leipzig Glossing Rules anyway.
Making Glosses with Tables
If you are sure that you have only very short examples, where you will never need to deal with line breaks, the easiest solution is to use a table. This solution is easy. but if one of your examples becomes too long, you will need to do some copy-pasting of the table which is too wide. The advantage is that you will be able to control without problem the layout of your gloss (and apply small caps, for instance).
- Insert your number field as explained above (do not write those by hand!)
- Write your example – separating words by tabulations in the first line; in the second line, write your gloss – separating words by tabulations, and starting with a tabulation. In the third line, write the translation after a tabulation – but do not separate words by tabulations in the sentence.
-
Select the three lines (including the number field in the beginning). This is what it should look like:
- Click on TABLE → CONVERT → TEXT TO TABLE
-
On the popup-menu, deselect Equal width for all columns
At least at the time of writing of this post, one cannot deselect Equal width for all columns if you do not use tabulations but rather spaces as cell separations.
-
Click OK. The first two lines should now be properly aligned (more or less), but the translation is stuffed into a single cell, as is shown below.
-
In order to give more room for the translation, select the translation and the empty cells to its right. Then right-click on the selected area, and choose Merge Cells.
-
You may need to manually adjust the width of the colums. Either do that with the mouse, moving around the boundaries of the cells, or right click somewhere in the table, choose Table Properties and then modify the colum in Adjust Column Width. The end result will look as follows:
Making Glosses with Rubies
This is the solution that I would recommend,2 even though you will not be able to apply small caps. If combined with a proper style, you will not have to worry about long examples, and everything will just work out fine – as long as you can live with just lower and upper case element in the gloss.
First, you will need to enable Asian Language Support (this is only required once).
- Click on TOOLS → OPTIONS
- Click on LANGUAGE SETTINGS → LANGUAGES
-
In Default Languages for Documents, enable Asian. I left the default (simplified Chinese) in the drop down menu; this does not seem to matter.
Once this is done, you will not have to modify this again.
- Write out the example in the original language.
-
Select the example with your mouse – without the number.
-
Click FORMAT → ASIAN PHONETIC GUIDE.
-
In the pop-up window, add in the Ruby Text field the gloss for each word. In the Position field, select Bottom. Click Apply, then Close.
-
Now, your example should look as follows:
-
By default, your example will probably not look like this, and you will have a much smaller font in your glosses. In order to change this, type <F11>, which will show the Styles menu. Click on the A on top, then right-click on Rubies, and choose Modify.
- In the pop-up window, choose the Font tab, and set the Asian Text Font to a style and size of your liking.
- Finally, add a translation, and you are done. Do not worry about the grey underlining text. This will not show up in a pdf or a printed version of the paper.
Bibliography Management
Footnotes:
It is true that there is Linguistic Tools, but this LibreOffice addon seems to be require specific software and formats of XML-files from SIL, so it is not easy to use for people who do not know these, and is probably too much work for most of us.
This is the solution I found on the the LibreOffice help site.