Difference between revisions of "Bibliographic/Hints and Tips"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Fixed a typo, changed 'are' to 'is')
Line 66: Line 66:
  
 
'''A:''' There is no direct and simple mechanism. But there is a an indirect method - You can use the [http://www.math.umd.edu/~dcarrera/openoffice/misc/bibtex/filter.html bibtex export filter] mentioned below, to export the bibliographic data from you document. Then to import that BibTeX data into the database you could use the bibutils data conversion programs and method also described [[Bibliographic_Hints_and_Tips#How_to_use_Zotero_to_format_your_OOo_Bibliography | below]]. I have not tested this very well so I do not know how accurate the conversion process will be. [[User:Dnw|David Wilson]]
 
'''A:''' There is no direct and simple mechanism. But there is a an indirect method - You can use the [http://www.math.umd.edu/~dcarrera/openoffice/misc/bibtex/filter.html bibtex export filter] mentioned below, to export the bibliographic data from you document. Then to import that BibTeX data into the database you could use the bibutils data conversion programs and method also described [[Bibliographic_Hints_and_Tips#How_to_use_Zotero_to_format_your_OOo_Bibliography | below]]. I have not tested this very well so I do not know how accurate the conversion process will be. [[User:Dnw|David Wilson]]
 +
 +
===Importing bibtex (or other) formats to the Bibliography manager using JabRef===
 +
 +
This was a better solution for me than the scripts mentioned below (since I am on a windows machine and couldn't get them to work anyway).  This is described in the [http://jabref.sourceforge.net/help/OpenOfficeHelp.html JabRef documentation] (http://jabref.sourceforge.net/help/OpenOfficeHelp.html) and works well.  ''Note - I had a problem with exporting to the spreadsheet because of a random character having slipped into my bibtex file. If the export doesn't work - check the records for wierd chars and delete them.''
 +
  
 
==How to load Zotero reference data into Openoffice.==
 
==How to load Zotero reference data into Openoffice.==
Line 108: Line 113:
  
 
If you are more adventurous and want to add this import function as menu items in Writer you could try loading these [[Bibliographic Import Macros | OOoBasic macros]].
 
If you are more adventurous and want to add this import function as menu items in Writer you could try loading these [[Bibliographic Import Macros | OOoBasic macros]].
 +
  
 
==How to use Zotero to format your OOo Bibliography==
 
==How to use Zotero to format your OOo Bibliography==
Line 176: Line 182:
  
 
You can then assing the macro to a toolbar, shortcut-key or menu item.
 
You can then assing the macro to a toolbar, shortcut-key or menu item.
 +
 +
  
 
==Your question is not answered here ?==
 
==Your question is not answered here ?==

Revision as of 13:16, 21 May 2007

Back to Bibliographic Index

How do I preserve my Bibliographic Table format settings ?

When you have done all that hard work in setting up the bibliographic table with all the field entries and formatting set to your document style, I suggest that you select and copy the Bibliographic table and save it in a other document.

The reason I suggest this is that, if you accidentally delete the Bibliographic Table, then all your work in formatting the table will be deleted too. To use your Bibliographic Table formatting in an other document, just copy that table into new document, it does not matter that the references are different, just right click over the table and select 'Update Index/Table' for it to be regenerated with that documents' citations and your previously defined Bibliographic Table format.

I edit my citations but the changes are not applied.

When you modify a citation (Bibliography Entry) by double-clicking on the citation, and selecting edit and modifying the entry. You also need to click on the 'Modify' button to apply the changes before you select the 'Close' button.

How do I correct the citations in my document?

If you have inserted a citation (Bibliography Entry) may times in a document and need to correct it. Correcting it in the database is not enough. The changes are NOT automatically made in the document. In fact each citation has complete copy of the citation data and must be correct for each citation. You have several options:

1. Find each citation, delete it and reinsert it (after correcting it in the database). If you need to synchronize all your citations in the document with the ones in the database, you can use a keystroke macro recorder supporting auto-repitition of macros (e.g. JitBit Macro Recorder). Record a macro for the "Insert Bibliography Entry" dialog to insert a single bibliography entry (and clicking "Yes", if it ought to be updated), finishing with progressing to the next entry. This macro can then be applied in a repetitive manner to the dialog to synchronize all citations. However, note, that this way you may pollute your document by adding all bibliography entries from the database.

2. Find each citation, double-clicking on the citation, select edit, make the corrections, close the edit panel, click the 'Modify' button to apply the changes before you select 'Close'.

3. If you have too many citations to change in this way then you can edit the save file. Make a backup of your file. Rename your xxx.odt file xxx.zip, open the zip archive and extract the contents.xml file, open that file in a writer. Very carefully do a global find and replace for your corrections. Save the contents.xml back into the zip archive. Rename xxx.zip xxx.odt. Hoping you have not destroyed your file, open it and check.

Having your bibliography index automatically numbered

To use numbered references like e.g. [1], which is common for scientific documents, you can change the formatting of the reference anchors / entries in the document by setting "Number entries" under Insert->Index and Tables->Index/Table. Your actual generated bibliography however will not be automatically numbered just by checking this field. This also cannot be activated in the "Entries" dialog (while the idea of inserting the "Number" Type in front of an entry looks tempting, this will not yield the correct result). Instead, you have to activate numbering on the corresponding bibliography style. In most cases this will be "Bibliography 1". Activate "Numbering" on the Paragraph Style pane.

How can I Join multiple references?

Is there any (automatic) way to coalesce multiple bibliographic references onto a single one? I mean, something like [1-3,56,99] instead of [1][2][3][56][99]. As far as I have seen, there is no option in OOo to do that.CP 19:40, 22 May 2006 (CEST)

Answer Yes, but not as automatically as you may like. There is an option in Inset->Indexes and Tables->Indexes and Tables:Type=Bibliography an option under the heading 'Formatting the entries' a pick-list for 'Brackets'. You can select NONE.

If you select Brackets=NONE then [1][2][3][56][99] becomes 1 2 3 56 99 and you can then manually insert the brackets and the commas to get the desired [1,2,3,56,99]. However there is currently no automatic support for specifying a range of citations like [1-3]. The problem is that if you manually deleted the citation 2 and put in a dash, the citation 2 may disappear from the Bibliography list if there are no other references to it. However, you could place citation 2 in a 'Hidden Paragraph' to ensure it stays in the Bibliography list for that document. See some instructions on Hidden Paragraphs. David Wilson

Converting footnotes to endnotes

It is easy to convert footnotes on the same page to endnotes at the end of the document by changing the 'Position' option on the Tools->Foot notes..->Tab=Footnotes panel.

However, if you do this, there is some good advice from Judith Butcher, Copy-Editing, The Cambridge Handbook, (Cambridge: CUP, 1975)-

"More information may have to be given in the notes now that they will not appear on the same page as the relevant text. A book title and a page number - or just a publication place and date - may be sufficient in a footnote if the other details are mentioned in the text; but it is irritating to have to keep checking back to the text from the endnotes if one is looking through the notes for a book mentioned earlier." p156

How can I import or export Bibliographic data?

OpenOffice 2.0.4 Writer now includes a BibTeX export filter for citations in a document. You can access it at

File->Export->File Format='Bibtex (.bib)'.

If you are using a earlier version of OpenOffice OpenOffice you can add it yourself - bibtex export filter. If you need to convert other bibliographic formats use bibutils.

David Wilson has written a bibliographic database filter to export the data in RIS format OOoRISExport.py . It is my first python program so is not very good but seems to work. See the wiki page OOoRISExport.py for details

If you can download/export RIS (reference manager) format references from your data source, then the utility RISImport.py may work better than a BibTeX utility. It is a Python script for importing RIS format reference(s), RISImport.py. Possibly of some value as it hashes out some RIS details on mapping between fields, and suggests "sensitive" mapping for different reference types." For more hints see How to load Zotero reference data into Openoffice below.

If this is not suitable then an option is to use a third-party bibliographic application that will export to an OpenOffice Bibliographic database in the text bibliographic database CSV format. (OpenOffice looks for a database called Bibliography with the correct fields - it does not care what type of database it is.) I have used Jabref and B3. Bibus is another possibility. David Wilson

You may also use refbase to export your references directly to an OpenOffice Bibliographic database in OpenDocument spreadsheet (.ods) format.

Avoiding duplicate bibliographic records in the database

The RISImport.py bibliographic data import program does not check for duplicates. If there is more than one bibliographic database entry with the same identifier the OOo bibliographic functions will only find the first occurrence. To avoid this confusion I suggest that you modify your database table to add unique index using the identifier as a key. This will prevent the adding of duplicate entries. Instructions on how to do this and how to increase the size of the database fields can found in HOWTO-increaseFieldSizes-V2.odt

Import from .odt-file

Q: I have an OOoWriter document containing large amount of citations and very big bibliographic table. Can I automatically add all bibliographic entries to my database? fLegmatik

A: There is no direct and simple mechanism. But there is a an indirect method - You can use the bibtex export filter mentioned below, to export the bibliographic data from you document. Then to import that BibTeX data into the database you could use the bibutils data conversion programs and method also described below. I have not tested this very well so I do not know how accurate the conversion process will be. David Wilson

Importing bibtex (or other) formats to the Bibliography manager using JabRef

This was a better solution for me than the scripts mentioned below (since I am on a windows machine and couldn't get them to work anyway). This is described in the JabRef documentation (http://jabref.sourceforge.net/help/OpenOfficeHelp.html) and works well. Note - I had a problem with exporting to the spreadsheet because of a random character having slipped into my bibtex file. If the export doesn't work - check the records for wierd chars and delete them.


How to load Zotero reference data into Openoffice.

zotero [zoh-TAIR-oh] is a free, easy-to-use Firefox extension to help you collect, manage, and cite your research sources. It lives right where you do your work — in the web browser itself.

  • Install RISmport.py which reads RIS format files containing one or more references and inserts them into the default OpenOffice.org Bibliography/'biblio' database. instructions.odt (Copy it into the /openoffice.org2.0/program/ directory)
  • Select the Zotero titles you want to export to the OOo database
  • Select Tools->’Export Library’ (from the gear icon), select Format=RIS and save the temp.ris file.
  • Start OpenOffice.org
  • Import the RIS data using RISmport.py, with a command like:
cd /openoffice.org2.0/program/python.sh  RISmport.py /your-path-to/temp.ris
  • The reference details should now be in the default bibliographic database.

To automate this a bit more, add a batch file to your path, called something like 'import_ris'. This is the linux version, could someone add a windows version.

# import_ris calls RISImport.py to read a RIS file and
# inserts the data into the OOo bibliographic database
#!/bin/sh
# put the path of your openoffice.org program directory on the next line.
cd /opt/openoffice.org2.0/program
echo "Importing RIS data from " $1
echo
./python.sh  RISImport.py $1 

To import BibTeX data I use bibutils data conversion programs and the following script, import_bib -

# import_bib calls uses bibutils to convert BibTex data to 
# RIS format and then call RISImport.py to read a RIS file and
# inserts the data into the OOo bibliographic database
# the bibutils programs bib2xml and xml2ris need to be in the 
# program search path
#!/bin/sh
cd /opt/openoffice.org2.0/program
echo "importing BibTeX data from " $1
echo
bib2xml $1 | xml2ris > /tmp/bibtmp777
./python.sh  RISImport.py /tmp/bibtmp777
rm /tmp/bibtmp777

You can easily add COPAC, endnote, ISI web of science, Pubmed import as these are also supported by the bibutils data converter. Just replace the bib2xml in the script with copac2xml, end2xml, isi2xml or med2xml.

If you are more adventurous and want to add this import function as menu items in Writer you could try loading these OOoBasic macros.


How to use Zotero to format your OOo Bibliography

  • If your version of OOo is less than 2.0.4, install the add-on module writer2latex041 into OOo. (This export filter is included in OOo 2.0.4). It provides LateX and BibTeX export filters. The one we are interested in is the BibTeX export which exports the bibliographic data from the current document, (not the database), in BibteX format. (Instructions for installation on the web site).
  • Open a OOo document with citations.
  • Export your document bibliography data using: File->Export->File type='BibTex Data File (.bib)' (i.e. temp.bib)
  • In Zotero create a new Collection folder and select it.
  • In Zotero import your temp.bib file by using the 'gear' icon File:Gear-icon.png and Tools->Import.
  • Select all the titles you want to use for the bibliography (probably all the references you imported), right-click and select 'Create Bibliography from Selected Items' from the context menu.
  • Select the citation Style and 'Copy to Clipboard'
  • Paste bibliography text into your OOo document.
  • Voila !

Note: in my test the 'Chicago Manual of Style (Note)' - a numbered reference list was not in the correct citation order.

How do I move my Bibliographic database

The data base file is called biblio.dbf and it is located on my linux system in the directory:

~/.openoffice.org2/user/database/biblio>

on Windows

C:\Program Files\OpenOffice.org x.x.x\presets\database

So importing the bibliography is just a matter of copying the old biblio.dbf to the location of the new database.

To change the location of the bibliographic database, first, understand that the bibliographic application looks for a database called 'Bibliography' and a table called 'biblio' in that database. (This is why it is easy to set up the bibliographic database on an other database sever, it does not matter if it mySQL or postgres or even a text file, it is the names 'Bibliography' and 'biblio' that matter.)

In the case of the standard Xbase (.dbf) bibliographic database the "database" is actually a directory called /biblio and the "table" is a .dbf file in that directory called biblio.dbf

You can change the location of the database by using the File->New->Database wizard. Create a new database called, say 'Bibliography-new'

Then using the menu option-

Tools->Options->OpenOffice.org Base->Database

You should now have at least two databases listed, the original Bibliography and Bibliography-new. In that Panel edit the original Bibliography to change its name to 'Bibliography-old' and change 'Bibliography-new' to 'Bibliography'.


I want a better thesaurus

The OpenOffice English language thesaurus is based on Wordnet. The full Wordnet provides comprehensive information on word usage. Try it online

Install wordnet and add a small shell script to set the WNHOME and working directory and to pass on the selected word as a parameter (that is what the $1 does).

#!/bin/bash
# a small script file called my_wnb at /home/dnw/my_wnb
WNHOME=/usr/local/WordNet-2.1
cd /usr/local/WordNet-2.1/bin
/usr/local/WordNet-2.1/bin/wnb $1

add the following OOBasic macro into OpenOffice, this macro selects the word the cursor is on and passes it to wordnet for a lookup.

Sub wordnet
Dim sel As String 
Dim oSelect As object
   oSelect = thiscomponent.CurrentController.Selection
       for i = 0 to oSelect.getCount() - 1
               oRange = oSelect.getByIndex(i)
               sel =  oRange.String
       next i
Shell("/home/dnw/my_wnb",1,sel) 
End Sub

You can then assing the macro to a toolbar, shortcut-key or menu item.


Your question is not answered here ?

Try the Bibliographic FAQ

I feel I am going around in circles and I can not find what I need.

You could post add a question to this page or send a question to the Bibliographic Project user's mail list at users@bibliographic.openoffice.org

You are invited to add more Hints and Tips

Add a FAQ here or just ask a question on the discussion page. David Wilson

Personal tools