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

From Apache OpenOffice Wiki
Jump to: navigation, search
(16 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Writer]]
+
{{NeedsRework|EN}}
[[Category:How to]]
+
{{Documentation/NeedsRework}}
+
  
== Selecting all Footnotes in a Document ==
+
== Selecting All Footnotes in a Document ==
  
Selecting all footnotes in a Document at once, in Open Office Writer < 2.4 (via Shift key or sim.) remains an issue.
+
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 is a couple of workarounds, depending on the goal you want to accomplish.
+
Though it is not directly supported, there are workarounds, depending on your goal.
  
There are 2 main reasons to select all Footnotes:
+
Two reasons for selecting all footnotes are:
  
#To change their properties (Font, Style etc.)
+
#To change their properties (font, style, or other)
 +
#To export them when creating a list or bibliography
  
#To export them, possibly to create a list or bibliography.
+
{{Tip|Remember to backup your document before performing unfamiliar changes.}}
  
 +
== To Change Footnote Properties ==
  
(*Make backup of your original document, before performing
 
changes you are not familiar with.)
 
  
 +
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 Footnote properties (Font, Style etc.) ==
 
  
  
It is fairly easy to accomplish, by changing the global properties of the style your Footnotes have (by default it should be Style: Footnote).
+
To change the properties of the footnote numbers:
There is no need to expressly ''select'' all the Footnotes for that.
+
  
*Type F11, or '''Format - Styles and Formatting'''
+
#Choose '''Format > Styles and Formatting'''
 +
#Click the '''Character Styles''' tab
 +
#Select '''Footnote Characters''' in the list, right-click it, and choose '''Modify'''
 +
#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.
 +
#When you are finished making your changes click '''OK'''. Your footnote numbers or characters will be updated to the new properties.
  
*Right click your Style (Footnote) - Change.
 
The changes in the properties will have a global effect.
 
  
For more details, see the [[Documentation/How_Tos/Assigning_Styles_With_the_Keyboard|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 Regexp.
+
To change the properties of footnote description text:
  
 +
#Choose '''Format > Styles and Formatting'''
 +
#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.)
 +
#Select '''Footnote''' in the styles list, right-click it, and select '''Modify'''
 +
#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.
 +
#When you are finished changing the footnote text properties click '''OK'''. Your footnote descriptions will all be updated to the new properties.
  
== To Export all Footnotes (possibly into a list/bibliography) ==
 
  
There are 2 workarounds how to extract all Footnotes from a Document into a list.
+
Also, see the [[Documentation/How_Tos/Assigning_Styles_With_the_Keyboard|Assigning Styles With the Keyboard]] Wiki entry.
  
The first is actually again a ''cheat'', since it does not Select All Footnotes, in order to obtain the result.
+
== To Export All Footnotes ==
It is however listed first, because it is easier and provides usually good results, i.e. does not mess up the formatting in the process.
+
  
The second method allows you to actually select/highlight 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.
  
=== By Changing the File Format of the Document ===
 
  
The basic idea is to ''Save as'' the document containing the Footnotes, in some other format (f.e. txt) and then retrieve them with a simple text editor,
+
=== Saving the Footnotes to HTML Format ===
and copy and paste them back into the Open Office document.
+
  
Before doing it, you should group all your footnotes at the end of the
+
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.  
document.  
+
*'''Tools''' - '''Footnotes'''
+
*'''Footnotes tab''' - '''Position''' > '''End of document'''
+
  
It looks already perfect, unfortunately you still can't select all of them.
+
First, group and copy your footnotes:
  
Therefore
+
#Choose '''Tools > Footnotes/Endnotes'''
*'''Save as''' - Your preferred File Format
+
#Click the '''Footnotes''' tab and under '''Position''' choose '''End of Document''' then click '''OK'''
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
+
#Choose '''File > Save as''' and select HTML as the file type. Name your file and click '''Save'''
etc.
+
#Open the HTML file you just made in your web browser and scroll to the end of the page where your footnotes are listed
 +
#Highlight all the footnotes and copy the footnotes to the clipboard by pressing '''Ctrl+C'''
  
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, and use the following method only if you need something more specific.
 
  
=== By Selecting all Footnotes in a Document ===
+
Now paste your footnotes into a new document and arrange them:
 +
#In Writer choose '''File > New''' to start a new document
 +
#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.)
 +
#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.
 +
#Highlight all of the text and choose '''Table > Convert > Text to Table'''
 +
#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.
 +
#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'''.
 +
#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.
 +
#Once again, highlight all the text in the table
 +
#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.
  
  
To actually select all Footnotes at once, the Find and Replace Dialog offers you an elegant workaround
+
=== By Selecting all Footnotes in a Document ===
*(Ctrl-F), or '''Edit''' - '''Find and Replace'''
+
*Expand the '''More Options''' Menu in the dialog and check the '''Search for Styles'''.
+
*Select the Style(Footnote) you are looking for in '''Search for'''.
+
*'''Find All''' and Writer selects all instances of the Text having the specified Style.
+
  
By Copy and Pasting the highlighted text you can extract all the Footnotes at once, with the obvious loss of new paragraphs.  
+
To actually select all footnotes at once, the Find and Replace Dialog offers you an elegant workaround.  
(The Paste will be a continuous text block, but will keep the respective Formatting - unfortunately the Paste special, Ctrl-Shift-V doesn't help...)
+
#(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.
  
You can however, clear out the new lines issue and obtain an impeccable list in a matter of seconds, by using the power of REGEXP :)
+
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 Regexp ====
 
  
If you are new to Regexp, skim over the following examples, then get back and spend 15 minutes reading some intro on REGEXP.
+
==== 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 [[Documentation/How_Tos/Regular Expressions in Writer|Regular Expressions in Writer]]
 
Even with a few basics, you can already do a lot. See [[Documentation/How_Tos/Regular Expressions in Writer|Regular Expressions in Writer]]
  
(*15 minutes reading, to get an introductory idea about Regexp and you will be rewarded with a lifetime of luxury and professionalism in
+
(*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)
text searching)
+
  
*Highlight your new (continuous) list  
+
1. Highlight your new (continuous) list
*'''Edit - Find and Replace Dialog'''
+
*Expand the '''More Options''' and check '''Current Selection Only''' & '''Regular Expressions'''
+
2. '''Edit - Find and Replace Dialog'''
  
Carefully look at your footnotes and try to find some sort of pattern in the Text, that identifies the beginning of a Footnote.  
+
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:
 
  Example:
  Given in the Document is a specific format to provide sources for citations in Footnotes:
+
  Given in the Document is a specific format to provide sources for citations in footnotes:
 
  '''SURNAME, Name: Title..., Year.'''
 
  '''SURNAME, Name: Title..., Year.'''
 
   
 
   
 
  The beginning of such a Footnote can by found by looking for a pattern  
 
  The beginning of such a Footnote can by found by looking for a pattern  
  "'''.SURNAME'''" that equals "'''(a dot)(Capital letter)(more Capital letters)'''"
+
  "'''.SURNAME'''" that equals "'''(a dot)(capital letter)(more capital letters)'''"
  which equals further to the Regexp "'''\.[A-Z][A-Z]'''"
+
  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.
  
#Type the needed Regexp into the '''Search for''' field and '''Find All''' 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.
#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 (i.e. an addition, not a replacement).
+
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,  
 
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''' "'''\.'''"
+
you would check again '''Current Selection only''' and '''Search for''' "'''\.'''"
 
which would be '''Replaced all''' with the expression "'''.\n'''"  
 
which would be '''Replaced all''' with the expression "'''.\n'''"  
 
(replacing all the dots, in the previous selection, for a '''dot AND a new paragraph''')
 
(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 actuall possibilities of Regexp are limited only by your imagination.
+
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)
(and by the fact that Writer does not yet support Regexp in the '''Replace with''' field)
+
  
If the Footnotes show the slightest sign of regularity, there is a way to exploit it with Regexp and save yourself some work.  
+
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, i.e identifying them with a Regexp.'''
+
'''By using the same principle you can extract your footnotes independently of their style, that is identify them with a regular expression.'''
  
 
  Example:
 
  Example:
Line 125: Line 131:
 
  Can be summarized as  
 
  Can be summarized as  
 
  "(Capital letter)(possibly more letters)(dot)(<)(letters)(>)"
 
  "(Capital letter)(possibly more letters)(dot)(<)(letters)(>)"
  (Ideally your Regexp identifies all of your needed expressions, but not any other expressions.)
+
  (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.
 
  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.
  
 
{{PDL1}}
 
{{PDL1}}
 +
[[Category:Documentation/How Tos/Writer]]
 +
[[nl:NL/Documentation/How_Tos/Selecting_all_Footnotes_in_a_Document]]

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