Giter VIP home page Giter VIP logo

zotero-libreoffice-integration's Introduction

Zotero LibreOffice Integration

Zotero LibreOffice Integration comprises extensions for LibreOffice and Zotero that communicate using local web servers.

Build Requirements

LibreOffice SDK is not required.

To build:

  1. Run scripts/symlink_sdk.
  2. Open Eclipse and import this project into your workspace.
  3. Right-click the project in the Eclipse Package Explorer, click "Properties", select "Java Build Path", then select the "Libraries" tab. Click on "Add JARs" and expand the "Zotero OpenOffice Integration" folder. Make sure there is no "lib" subfolder underneath it. If there is:
    1. Expand "Zotero OpenOffice Integration" -> "lib" -> "libreoffice-sdk" and select all the JARs underneath it.
    2. Click "Ok" and then "Apply and Close".
  4. Double-click Zotero.jardesc. Click "Finish" to build Zotero.jar.
  5. Run buildoxt.sh from within the build directory to build install/Zotero_LibreOffice_Integration.oxt.
  6. Install Zotero_LibreOffice_Integration.oxt into LibreOffice, either by choosing "Reinstall Extension" from within the Zotero preferences, by installing it manually from within LibreOffice, or by using unopkg from the command line.
    1. If, when you try to install the extension in LibreOffice, you get an error like "Could not create Java implementation loader", it means that LibreOffice is not configured to use Java. Follow these instructions to set up a Java VM in LibreOffice.

Development Starter's Guide

This extension is fairly straightforward. It consists of a LibreOffice UNO based java extension for LibreOffice. The UNO runtime allows various programming languages to interface with a running LibreOffice process. The extension code is initialized by LibreOffice and starts execution in ZoteroOpenOfficeIntegrationImpl.java.

Communication between Zotero and LibreOffice is mediated in zoteroLibreOfficeIntegration.js where a TCP socket is initialized and used for both sending and receiving messages. The complimentary socket connection on the LibreOffice extension end is found in CommServer.java.

The Java extension code can be debugged directly during runtime.

Follow these instructions to enable debugging in LibreOffice. After restarting, LibreOffice will freeze the until a debugging client connects. Create a remote debugging configuration in Eclipse and run it:

  1. In Eclipse, click on "Run" -> "Debug Configurations...".
  2. In the left list, select "Remote Java Application".
  3. In the button bar, press the first button "New launch configuration".
  4. Use the same port you configured LibreOffice with. The default is port 8000.
  5. Press "Debug".

LibreOffice will unfreeze. If you add breakpoints in Eclipse they will be triggered freezing the LibreOffice process and allowing you to inspect the execution environment. This technique can be used to debug on remote or virtual machines too.

zotero-libreoffice-integration's People

Contributors

10b14224cc avatar adam3smith avatar adomasven avatar aurimasv avatar avram avatar dstillman avatar otjura avatar simonster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zotero-libreoffice-integration's Issues

Debian packaging

Hi,

I am trying to package this extension for debian.
I manage to install the .oxt calling unopkg.
I also create a symlink in .zotero/extensions to the folder where the extensions folder is.
The extension is visible in zotero-standalone window but is not installed.
Now to installit I have to press on preferences and press install.
I would like to install it on zotero-standalone without having the graphical install to run.
Can someone can kindly give me a hint how to act?

Cheers

Mike

Unresponsive Toolbar without icons

I'm using Libreoffice 4.2 and zotero-libreoffice-integration 3.5.8. Clicking on the toolbar doesn't trigger any action. Besides, there are no icons, just text.

Does not work with LibreOffice 4.0

I gave LibreOffice 4 Beta 2 & RC 1 a test, but they do not work with the Zotero extension. I installed the plugin manually and it installs fine, but does not work. When pressing the insert ciation button LibreOffice complains that: XDocumentInfoSupplier class is not found.

I checked on Linux (Ubuntu 12.10, 64bit) and MacOS X 10.8

Best,

Ingolf

Shell output on Linux:
Exception in thread "Thread-8" java.lang.NoClassDefFoundError: com/sun/star/document/XDocumentInfoSupplier
at org.zotero.integration.ooo.comp.Properties.(Properties.java:44)
at org.zotero.integration.ooo.comp.Document.(Document.java:120)
at org.zotero.integration.ooo.comp.Application.getActiveDocument(Application.java:49)
at org.zotero.integration.ooo.comp.CommMessage.execute(CommMessage.java:59)
at org.zotero.integration.ooo.comp.CommMessage.getBytes(CommMessage.java:40)
at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:60)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: com.sun.star.document.XDocumentInfoSupplier
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 7 more

Possible regression at 602e1e ?

With 602e1e adopted, under Linux, running a Juris-M Standalone build, opening a blank document in LO, entering one citation, and then entering a bibliography yields an error, "json.properties is undefined". After removing 602e1e, the same operation clears without error. (Juris-M uses the Zotero word processor plugins without modification.)

Not working with 64-bit jre (and consequently 64-bit LO)

"We've pretty consistently seen the LibreOffice add-on not working with 64 bit JRE versions" @adam3smith, here.

If that is the case, is this a bug that can be fixed?

I consider this a major problem. I'm using a 64-bit linux system and have been doing so for years. While with multiarch I can install 32-bit versions of libreoffice + java (since I can't use 32-bit java in the standard 64-bit LO) I find this a hassle.

I remember everything working for me a few months back (with some kind of trouble, but everything 64-bit I guess) but now when I tried with LO 5.0.5.2 and some different JREs (all 64-bit), nothing happens when clicking the buttons.

URLs are normal text rather than hyperlinks

Environment

Mac OS X 10.7.4
Zotero 3.0.8.1

Tested in

LibreOffice 3.6.1.2
NeoOffice 3.2.1 Patch 8
OpenOffice 3.4.1

Instructions

  1. Create new document
  2. Enter some text
  3. Select "Insert Citation"
    • Document preferences: Chicago Manual of Style (note); Footnotes; ReferenceMarks; Store references in document
    • Choose an item with a URL attribute that is shown in the citation style; e.g. a Web Page
  4. Select "Insert Bibliography"
  5. See that the URL of the item is not a hyperlink

Expected behavior

The URL should be a hyperlink.

Unlinking codes removes styling

This one may be non-trivial to deal with. Due to API limitations we already have to jump over some serious hoops to even support RTF within ReferenceMarks (e.g. see 1c2612a)

Ignore OpenOffice directories during installation

We're still checking "C:\Program Files (x86)\OpenOffice 4" and similar for unopkg.exe, which causes failures:

[JavaScript Error: "uncaught exception: unopkg at C:\Program Files (x86)\OpenOffice 4\program\unopkg.exe failed to install"]
[JavaScript Error: "TypeError: temp is null" {file: "chrome://zotero/content/bindings/preferences-win.xml" line: 1225}]
getPreferenceElement@chrome://zotero/content/bindings/preferences-win.xml:1225:11
userChangedValue@chrome://zotero/content/bindings/preferences-win.xml:1273:25
onxblcommand@chrome://zotero/content/bindings/preferences-win.xml:1312:9

[JavaScript Error: "uncaught exception: unopkg at C:\Program Files (x86)\OpenOffice 4\program\unopkg.exe failed to install"]

Removing citation does not remove bibliography entry

Environment

Mac OS X 10.7.4
Zotero 3.0.8.1

Tested in

LibreOffice 3.6.1.2
NeoOffice 3.2.1 Patch 8
OpenOffice 3.4.1

Instructions

  1. Create new document
  2. Enter some text
  3. Select "Insert Citation"
    • Document preferences: Chicago Manual of Style (note); Footnotes; ReferenceMarks; Store references in document
  4. Select "Insert Bibliography"
  5. See citation showing in Bibliography
  6. Remove citation by removing footnote
  7. Select "Refresh"
  8. See that removed citation is in Bibliography

Expected behavior

The removed citation should also be removed from the Bibliography.

Make zotero toolbar dockable

Working with zotero and libreoffice on linux.
The recent version of libreoffice writer introduced the use of docks on the right of the window. Actually there are format, syles, gallery and navigator.
Up until now i was putting the zotero toolbar on the right of my window. It would be great if it could be docked on the left. Also it could provide more option like a list of reference styles or a reference picker (similar to the old insert citation mode) as the space available is much bigger.

Just a random ideas to make zotero even more awesome.

Use fields in odt files for Word compatibility

The odt format also allows fields, as the following experiment confirms:

  • Create a new document in Word 2013 with some dummy entries (W13_Z.docx)
  • open in LibreOffice, edit the text in a citation, save as odt
  • Reopen the odt file in LibreOffice, save as docx
  • Reopen the docx file in Word, the changes are visible and all citations are recognized by the Zotero Word extension

What does not work:

  • Saving the document as odt in Word and opening it (either directly in Word and after converting it to docx in LibreOffice)

The extension currently doesn't recognize the citation fields, but libreoffice loads and writes them correctly in both formats. If they could be either loaded natively or converted on loading / saving the document, interoperability with Word users would be much improved.

Chinese characters missing from footnotes

See: https://forums.zotero.org/discussion/29362/chinese-characters-missing-from-footnotes/

When I create automatic citations with the OpenOffice add-in, some characters are being skipped. The same character disappears in different citations. However, if I manually export the citation from Zotero, everything prints out correctly. This happens independently of the citation style, the font, operating system: it both occurs in Linux and Windows 7 and has begun to occur only recently. Up until six months ago I had no such problem, but after a break I took from writing and several Zotero updates, characters started to disappear.

For example, the following citation:

“国务院批转教育部2003—2007年教育振兴行动计划的通知,” Ministry of Education of the People’s Republic of China, March 3, 2004, http://www.moe.eol.cn/edoas/website18/17/info34017.htm.

becomes when I use the OpenOffice addin:

“国务批教2003—2007年教振兴动划的知,” Ministry of Education of the People’s Republic of China, March 3, 2004, http://www.moe.eol.cn/edoas/website18/17/info34017.htm.

Various characters are missing in the second string. The same characters missing here will be missing from all the other citations, so it looks like the add-in fails to render a set of characters.

The missing characters are those beginning with UTF8 0xe8 or 0xe9, which evaluate to è and é respectively if single-byte characters are assumed. A pattern-match or find-and-replace operation somewhere could be going awry.

I include here a screenshot to show the issue: https://dl.dropboxusercontent.com/u/10099866/Screenshot%20-%2005152013%20-%2006%3A41%3A30%20PM.png

An error occurred communicating with Zotero:

Hello I have a big problem. Everytime I try to add citations to LibreOffice I get the error message above.
Nothing really changed on my system...

Hope someone can help me fast, I have to write an abstract for university ;)

Here the detail information:

An error occurred communicating with Zotero:
java.lang.NullPointerException
    at org.zotero.integration.ooo.comp.TextTableManager.<init>(TextTableManager.java:64)
    at org.zotero.integration.ooo.comp.ReferenceMark.getDocumentRange(ReferenceMark.java:347)
    at org.zotero.integration.ooo.comp.ReferenceMark.compareTo(ReferenceMark.java:357)
    at org.zotero.integration.ooo.comp.ReferenceMark.compareTo(ReferenceMark.java:1)
    at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:320)
    at java.util.ComparableTimSort.sort(ComparableTimSort.java:188)
    at java.util.Arrays.sort(Arrays.java:1312)
    at java.util.Arrays.sort(Arrays.java:1506)
    at java.util.ArrayList.sort(ArrayList.java:1462)
    at java.util.Collections.sort(Collections.java:141)
    at org.zotero.integration.ooo.comp.Document.getFields(Document.java:404)
    at org.zotero.integration.ooo.comp.CommMessage.execute(CommMessage.java:107)
    at org.zotero.integration.ooo.comp.CommMessage.getBytes(CommMessage.java:61)
    at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:84)
    at java.lang.Thread.run(Thread.java:748)

And from console:

Possibly unhandled rejection:

err is null

TypeError: err is null
    logError@chrome://zotero/content/xpcom/zotero.js:1300:3
    execCommand@chrome://zotero/content/xpcom/integration.js:276:7
From previous event:
    Comm</DataListener.prototype._transactionCallbacks[0]<@file:///usr/lib/zotero/extensions/[email protected]/components/zoteroOpenOfficeIntegration.js:168:6
    Comm</DataListener.prototype._processFrame/<@file:///usr/lib/zotero/extensions/[email protected]/components/zoteroOpenOfficeIntegration.js:273:7
    this.setTimeout/timerCallback.notify@chrome://zotero/content/xpcom/zotero.js:1780:5
Possibly unhandled rejection:

Feature request/regression: per chapter/page "first-note-reference-number"

I am creating this issue to flag an (unintended?) feature that was removed from the Libreoffice plugin by this commit: bb21e3c

The feature in question was that the "first-note-reference-number" accurately reflected the number shown in the document itself. Thus the numbering would for example reset for each chapter if footnotes were set to restart at each chapter. For styles that make heavy use of "first-note-reference-number", such as OSCOLA, the loss of this feature was a significant regression.

Apparently, the regression caused by the above-mentioned commit is argued to be acceptable since it "this just brings LibreOffice inline with what Word produces anyway". I don't really see that it is a particularly good argument per se, but there are probably (other) technical arguments for the change that I am not qualified to evaluate. Hopefully this feature can be added back in a more technically correct manner at some later point in time – and I hope this issue can serve as a reminder so that it is not forgotten.

Further details are available in this thread on the Zotero forum: https://forums.zotero.org/discussion/79327/oscola-libreoffice-cross-references-n-suddenly-not-respecting-per-chapter-numbering

Zotero LibreOffice plugin: Inserted footnotes lack italics

Issue Description

  • Footnotes added with Zotero LibreOffice plugin do not have italics on titles and journal names.
  • Styles tested include Chicago note and full and MHRA.
  • Occurs with classic dialog and new dialog
  • Italics can be added when using the beta release but you have to enter the "Set Document Preferences" dialog and save without making any changes. The entire document is reformatted and italics are added to the footnotes that need them. Just adding the footnote using the dialog does not result in italics where appropriate.
  • I've also checked out the Zotero style editor and preview and the italics appear correctly there.

Environment

  • OSX 10.10.5
  • LibreOffice Version: 5.3.6.1
  • Zotero Standalone: 5.0.28 / 5.0.28-beta.2+824114907

Workaround

  1. Install the beta release of Zotero standalone
  2. With LibreOffice closed, reinstall the LibreOffice integration plugin in the Zotero preferences
  3. Open the LibreOffice document, open the Zotero document preferences, and re-select the formatting of choice
  4. Citations and footnotes will be reformatted when this dialog closes, with italics in book and journal titles where appropriate

First inquiry about this issue is here: https://forums.zotero.org/discussion/69054/libreoffice-plugin-no-italics-in-cms-footnotes?new=1

Update UI

Word has Add/Edit Citations (and Add/Edit Bibliography in 5.0).

Portable

Many use portable apps firefox and libreoffice. Make this extension compatible by:

  1. When JRE not installed, try to use Java runtime that comes with libreoffice, if cannot find libreoffice, then ask for path from user and provide some guidance/link to online wiki.
  2. Offer option to use portable apps Jportable (java runtime portable version)

Icons

Zotero icons need a design overall ideally, to fit hidpi, due to most common icons used by v6.3, to be compatible with the new toolbar/groupbar variations available from v6.2 onwards, and possibly even different designs to fit the most common styles (breeze, colibre, elementary)

Zotero not coming up in 6.3 and UI issues (toolbar and icon style)

Not seeing zotero toolbar anymore despite reinstallation, is this because java components are removed now?
Also from a UI side, it was previously disappearing when using anything but the standard toolbar,
understandably extensions probably havn't been figured into the various tollbar UI options yet, though they would need to be for the future....
and finally one last gripe, if things were to need a change, could the zotero icons fall in line with the the various other popular UI icon choices that may be in use (colibre breeze sifr elementary etc)?

Support Java 7 and higher on Mac OS X

If Oracle Java 7 only is installed on the system Zotero LO integration plugin doesn't work and requires to install Apple Java 6 instead. At least latest LO 4.2 works well with Java 7 on Mac OS X.

Please, remove requiring Java 6 on Mac OS X and support newer Java. The plugin work pretty well with Java 7 on Windows so I guess there will no problem with this plugin since it is not a complicated piece of software like Intelli IDEA :).

Warn about JRE on macOS

The JDK requirement on macOS is now a lot more problematic with Zotero 5, because there's no way anyone would know they need that (whereas before everyone on Z4Fx had the warning on the download page). Do we know what the actual issue is with this? If we can't work around it, can we detect the Java version and show a warning in the Cite prefs rather than trying to install a broken extension?

Unicode characters in citation text trigger intermittent crashing under Linux

I've been getting some intermittent crashing of LibreOffice under Ubuntu while playing around with the plugin, mostly when changing from ReferenceMarks to Bookmarks and vice-versa, but there have been multiple reports of this on the forums for just inserting citations.

The bug is highly annoying because zotero requires a restart because of a broken socket connection and there remains a soffice.bin process, which needs to be killed before it is possible to restart LO too.

Very likely to be an upstream issue, but we should at least get to the bottom of it and inform the document foundation.

Bibliography does not follow section columns

In LibreOffice Writer, when editing a document that is formatted in two columns, any inserted Zotero bibliography ignores the columns and uses the entire page width. This behoaviour is seen when Zotero formats the document with ReferenceMarks. However, when using Bookmarks, the bibliography follows the column layou, as expected.

This issue has been encountered by several users: see https://forums.zotero.org/discussion/29185/insert-bibliography-doesnt-follow-section-columns-libreoffice/

My software versions are:
Zotero Firefox addon 4.0.17.1
Zotero LibreOffice integration 3.5.8
LibreOffice 4.0.4.2

IEEE Refrence style does not show correctly in libreoffice with two column veiw

This seems to be an old issue, which may be related to #12. To reproduce:

  1. Create a LibreOffice writer document in two column format (I am using Liberation Serif 10pt font)
  2. Insert a citation using the Zotero addon with IEEE referencing style
  3. Insert a bibliograpy

A screenshot of the results:

Screenshot_20201214_113603

My software versions are:

  • Zotero 5.0.93
  • LibreOffice 7.0.3.1
  • Operating system is Ubuntu 20.04 if it matters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.