Difference between revisions of "Documentation/How Tos/Selecting all Footnotes in a Document"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (To Change Footnote Properties: (checkpoint save))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Documentation/NeedsRework}}
+
{{NeedsRework|EN}}
  
 
== Selecting All Footnotes in a Document ==
 
== Selecting All Footnotes in a Document ==
Line 12: Line 12:
 
#To export them when creating a list or bibliography
 
#To export them when creating a list or bibliography
  
{{Documentation/Tip|Remember to backup your document before performing unfamiliar changes.}}
+
{{Tip|Remember to backup your document before performing unfamiliar changes.}}
  
 
== To Change Footnote Properties ==
 
== To Change Footnote Properties ==

Latest revision as of 21:05, 14 July 2018

Edit-find-replace.png This article should be checked for accuracy and conformity to style.

Selecting All Footnotes in a Document

Selecting all footnotes in a document at once, in OpenOffice.org Writer <= 4.1 (via shift key or similar), remains an issue.

Though it is not directly supported, there are workarounds, depending on your goal.

Two reasons for selecting all footnotes are:

  1. To change their properties (font, style, or other)
  2. To export them when creating a list or bibliography
Tip.png Remember to backup your document before performing unfamiliar changes.


To Change Footnote Properties

You can change the font style, font size, color, and other properties of the footnote numbers and text. Change the properties of all your footnotes at once by making changes to the default styles.


To change the properties of the footnote numbers:

  1. Choose Format > Styles and Formatting
  2. Click the Character Styles tab
  3. Select Footnote Characters in the list, right-click it, and choose Modify
  4. The Character Styles window will open allowing you to change the properties of your footnote numbers. This includes changing the font, font effects, position, and background. You can also revert to the standard formatting by clicking the Standard button.
  5. When you are finished making your changes click OK. Your footnote numbers or characters will be updated to the new properties.


To change the properties of footnote description text:

  1. Choose Format > Styles and Formatting
  2. Click the Paragraph Styles tab (Note: in version 3.4.1 there is a bug causing only a short list of paragraph styles to be displayed. A workaround is to click one of the other tabs and then click the Paragraph Styles tab again. The whole list will now load.)
  3. Select Footnote in the styles list, right-click it, and select Modify
  4. The Paragraph Style: Footnote window will open from which you can change a number of properties on your footnote text, for example, applying italics. You can also revert back to the standard format by clicking the Standard button.
  5. When you are finished changing the footnote text properties click OK. Your footnote descriptions will all be updated to the new properties.


Also, see the Assigning Styles With the Keyboard Wiki entry.

To Export All Footnotes

You might want to export your footnotes as their own list, possibly for a bibliography. For smaller documents you can highlight and copy and paste each footnote separately, combining them together in a new document. However, if you have a large document with a lot of footnotes, you may wish to use one of the following two methods for copying and arranging all your footnotes into a new bibliography document.


Saving the Footnotes to HTML Format

By saving your document in HTML format, you can open the document with any web browser. This will allow you to highlight your footnotes and copy and paste them into a new document while maintaining the text's style and formatting. Begin by saving a backup copy of your document, in case you accidently save over your work while trying to export the footnotes.

First, group and copy your footnotes:

  1. Choose Tools > Footnotes/Endnotes
  2. Click the Footnotes tab and under Position choose End of Document then click OK
  3. Choose File > Save as and select HTML as the file type. Name your file and click Save
  4. Open the HTML file you just made in your web browser and scroll to the end of the page where your footnotes are listed
  5. Highlight all the footnotes and copy the footnotes to the clipboard by pressing Ctrl+C


Now paste your footnotes into a new document and arrange them:

  1. In Writer choose File > New to start a new document
  2. Paste the footnotes you copied to the clipboard by choosing Edit > Paste Special or using the shortcut Ctrl+Shift+V. (We are using the Paste Special command because using the standard Paste command will paste your footnotes within webpage divisions and not allow you to edit and arrange them freely. Using Paste Special will paste just the text.)
  3. Delete the footnote numbers at the beginning of each footnote. This will allow us to use sorting to automatically arrange the footnotes alphabetically. If the numbers are left there the sorting will sort it by number.
  4. Highlight all of the text and choose Table > Convert > Text to Table
  5. In the Table Options window, under Separate Text At, choose Paragraph. Under Options, uncheck Border. Click OK. The footnotes are arranged in a table with invisible borders.
  6. Highlight all text again and on the Table toolbar click the Sort button. Note: if you do not see the table toolbar you can open it by clicking View > Toolbars > Table.
  7. In the Sort options window click the check box for Key 1 and select Alphanumeric in the Key Type drop-down box. Choose Ascending under Order and click OK. Your footnotes will be sorted alphabetically.
  8. Once again, highlight all the text in the table
  9. Choose Table > Convert > Table to Text and select Paragraph under Separate Text At. Click OK. This removes the table and keeps your listed information intact.


By Selecting all Footnotes in a Document

To actually select all footnotes at once, the Find and Replace Dialog offers you an elegant workaround.

  1. (Ctrl-F), or Edit > Find and Replace
  2. Expand the More Options Menu in the dialog and check Search for Styles.
  3. Select the style (footnote) you are looking for in Search for.
  4. 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).
Personal tools
In other languages