Documentation/How Tos/Selecting all Footnotes in a Document
Contents
Selecting all Footnotes in a Document
Selecting all footnotes in a Document at once, in OpenOffice.org Writer < 2.4 (via Shift key or similar) remains an issue.
Though it is not directly supported, there is a couple of workarounds, depending on the goal you want to accomplish.
There are two main reasons for selecting all footnotes:
- To change their properties (font, style or other)
- To export them, possibly to create a list or bibliography.
(*Make backup of your original document, before performing changes you are not familiar with.)
To Change Footnote Properties (Font, Style or Other)
It is fairly easy to accomplish, by changing the global properties of the style your footnotes have (by default it should be Style: Footnote). There is no need to expressly select all the footnotes for that.
- Choose Format > Styles and Formatting.
- Right click your style (footnote) - change.
The changes in the properties will have a global effect.
For more details, see the Assigning Styles With the Keyboard Wiki entry.
In case your footnotes do not have a common style, look at the next section and possibilities offered by regular expressions.
To Export all Footnotes (Possibly into a List/Bibliography)
There are two workarounds how to extract all footnotes from a document into a list.
The first is actually again a cheat, since it does not select all footnotes, in order to obtain the result. It is however listed first, because it is easier and provides usually good results, that means it does not mess up the formatting in the process.
The second method allows you to actually select/highlight all footnotes.
By Changing the File Format of the Document
The basic idea is to Save as the document containing the footnotes, in some other format (for example txt) and then retrieve them with a simple text editor, and copy and paste them back into the OpenOffice.org document.
Before doing it, group all your footnotes at the end of the document.
- Tools > Footnotes
- Footnotes tab - Position > End of document. It looks already perfect, unfortunately you still cannot select all footnotes.
- Choose File > Save as and select your preferred file format
Often, the smart choice to do this is to save to .html and not to .txt, since the .html (and .rtf) keeps the formatting such as italics or bold.
The .html file can be opened with any web browser and copy&pasted back into your original document, after which you can select all of your footnotes, as any simple text. This is probably the default way you want to export your footnotes. Use the following method only if you need something more specific.
By Selecting all Footnotes in a Document
To actually select all footnotes at once, the Find and Replace Dialog offers you an elegant workaround.
- (Ctrl-F), or Edit > Find and Replace
- Expand the More Options Menu in the dialog and check Search for Styles.
- Select the style (footnote) you are looking for in Search for.
- Click Find All and Writer selects all instances of the text having the specified style.
By copying and pasting the highlighted text you can extract all the footnotes at once, with the obvious loss of new paragraphs. (The paste will be a continuous text block, but will keep the respective formatting - unfortunately the Paste special, Ctrl-Shift-V does not help...)
You can however, clear out the new lines issue and obtain an impeccable list in a matter of seconds, by using the power of regular expressions.
To Insert Lines/Delimiters between Footnotes with Regular Expressions
If you are new to regular expressions, skim over the following examples, then get back and spend 15 minutes reading some intro on regular expressions.
Even with a few basics, you can already do a lot. See Regular Expressions in Writer
(*15 minutes reading, to get an introductory idea about regular expressions and you will be rewarded with a lifetime of luxury and professionalism in text searching)
1. Highlight your new (continuous) list
2. Edit - Find and Replace Dialog
3. Expand the More Options and check Current Selection Only & Regular Expressions
Carefully look at your footnotes and try to find some sort of pattern in the text, that identifies the beginning of a footnote.
Example: Given in the Document is a specific format to provide sources for citations in footnotes: SURNAME, Name: Title..., Year. The beginning of such a Footnote can by found by looking for a pattern ".SURNAME" that equals "(a dot)(capital letter)(more capital letters)" which equals further to the regular expression "\.[A-Z][A-Z]"
4. Type the needed regular expression into the Search for field and click Find All. That should highlight all the instances.
5. In the Replace with box you can enter the string you want the highlighted text to be changed for.
The trick is to manage to insert a new paragraph between two characters (that is an addition, not a replacement). To perform this task in the above example, after highlighting the above mentioned parts in the text, you would check again Current Selection only and Search for "\." which would be Replaced all with the expression ".\n" (replacing all the dots, in the previous selection, for a dot AND a new paragraph)
The example is meant to give you an idea on how the proceed. The actual possibilities of regular expressions are limited only by your imagination (and by the fact that Writer does not yet support regular expressions in the Replace with field)
If the footnotes show the slightest sign of regularity, there is a way to exploit it with regular expressions and save yourself some work.
By using the same principle you can extract your footnotes independently of their style, that is identify them with a regular expression.
Example: Footnotes like: "This is a very interesting source. <www.openoffice.org>"
Can be summarized as "(Capital letter)(possibly more letters)(dot)(<)(letters)(>)" (Ideally your regular expression identifies all of your needed expressions, but not any other expressions.) Therefore by searching for all "^[A-Z].*\. <.*>$" in Find and Replace would be a good beginning how to highlight all of these terms at once.
Content on this page is licensed under the Public Documentation License (PDL). |
nl:NL/Documentation/How_Tos/Selecting_all_Footnotes_in_a_Document