Jump to content

Zotero: Difference between revisions

From Official NixOS Wiki
Add instructions to set up the LibreOffice addon
Aura (talk | contribs)
Updated with application card and clarified LibreOffice add-on instructions
Line 1: Line 1:
{{outdated|This page has not been edited for several years. Please remove this notice if the content is accurate.}}
{{outdated|This page has not been edited for several years. Please remove this notice if the content is accurate.}}


== Zotero LibreOffice add-on ==
{{Infobox application
Install either the [https://extensions.libreoffice.org/en/extensions/show/891 community fork], or the official version of the plugin. The official version is included in zotero, located here:<syntaxhighlight>
| name = Zotero
${pkgs.zotero}/usr/lib/zotero-bin-7.0/integration/libreoffice/Zotero_LibreOffice_Integration.oxt
| type = Native
</syntaxhighlight>This can also be done through <code>nix build nixpkgs#zotero</code>, then locating the file in <code>result</code>. Both plugins depend on a java runtime environment. Install <code>pkgs.temurin-jre-bin-17</code> and select it from the list in the LibreOffice options at LibreOffice -> Advanced and restart LibreOffice.
| website = [https://www.zotero.org/]
| documentation = [https://www.zotero.org/ Zotero official manual]
| initialRelease = 2006
| latestRelease = 9.0.2; 30 April 2026
| os = Linux, macOS, Windows, iOS, Android
| github = github.com/zotero
}}[https://www.zotero.org/ Zotero] is a free and open-source bibliography manager. It provides tools to classify references under various organization schemes (tags, folders). Zotero can automatically generate a bibliography using a set of pre-built citation styles.
Companion web-browser plugins allow for saving references from the web with pre-filled metadata.
== Installation ==
 
Under NixOS,
 
<syntaxhighlight lang="nixos">
environment.systemPackages = with pkgs; [
    zotero
];
</syntaxhighlight>
 
== Configuration ==
 
=== Zotero LibreOffice add-on ===
 
The Nix derivation ships with the [[LibreOffice]] integration. It is located in <syntaxhighlight lang="nix">
${pkgs.zotero}/lib/integration/libreoffice/Zotero_LibreOffice_Integration.oxt</syntaxhighlight>This can also be done through <code>nix build nixpkgs#zotero</code>, then locating the file in the <code>result</code> folder.
 
 
For LibreOffice to correctly enable the plugin, it must be provided with a folder containing a Java Runtime Environment (JRE). You can install any JRE available in nixpkgs, for instance <code>jre8</code> and make it available for LibreOffice.
 
To do so, go in the LibreOffice options, at LibreOffice -> Advanced, and point it to the path of the installed JRE.
 
You can obtain the aforementioned path with the following script:
 
<code>nix derivation show nixpkgs#jre8 | {echo "/nix/store/"; jq '.derivations[].outputs.jre.path';} | xargs echo | sed "s/\ //"</code>


== Zotero Firefox add-on ==
== Zotero Firefox add-on ==
Line 20: Line 52:


Launch Firefox and go to the Zotero add-on preferences; click on the "Search" tab and you should find that both, pdftotext and pdfinfo, are recognized and their version is either "UNKNOWN" or the correct version number. This is trivial and should not deter you. You can now use the PDF metadata retrieval capabilities.
Launch Firefox and go to the Zotero add-on preferences; click on the "Search" tab and you should find that both, pdftotext and pdfinfo, are recognized and their version is either "UNKNOWN" or the correct version number. This is trivial and should not deter you. You can now use the PDF metadata retrieval capabilities.
== References ==
[https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/zo/zotero/package.nix Zotero derivation source in Nixpkgs]

Revision as of 17:44, 9 May 2026

⏲︎︎
This article or section is outdated. This page has not been edited for several years. Please remove this notice if the content is accurate. Further information might be found in the corresponding discussion. Please remove this notice once the information has been updated.

Zotero

Native Application

Initial release2006
Latest release9.0.2; 30 April 2026
Operating SystemLinux, macOS, Windows, iOS, Android
External links
Website[1]
GitHubgithub.com/zotero
DocumentationZotero official manual

Zotero is a free and open-source bibliography manager. It provides tools to classify references under various organization schemes (tags, folders). Zotero can automatically generate a bibliography using a set of pre-built citation styles.

Companion web-browser plugins allow for saving references from the web with pre-filled metadata.

Installation

Under NixOS,

environment.systemPackages = with pkgs; [
    zotero
];

Configuration

Zotero LibreOffice add-on

The Nix derivation ships with the LibreOffice integration. It is located in

${pkgs.zotero}/lib/integration/libreoffice/Zotero_LibreOffice_Integration.oxt

This can also be done through nix build nixpkgs#zotero, then locating the file in the result folder.


For LibreOffice to correctly enable the plugin, it must be provided with a folder containing a Java Runtime Environment (JRE). You can install any JRE available in nixpkgs, for instance jre8 and make it available for LibreOffice.

To do so, go in the LibreOffice options, at LibreOffice -> Advanced, and point it to the path of the installed JRE.

You can obtain the aforementioned path with the following script:

nix derivation show nixpkgs#jre8 | {echo "/nix/store/"; jq '.derivations[].outputs.jre.path';} | xargs echo | sed "s/\ //"

Zotero Firefox add-on

The Zotero Firefox add-on works as expected with one caveat; the pdftotext and pdfinfo plugins it needs in order to index and pull metadata from PDFs you wish to add to your library.

The solution, for now, is as follows (this assumes that you have the Zotero plugin installed and configured sans PDF support): NB: The symlinks DO NOT survive an update between Firefox versions, so everytime your Firefox is updated you will have to repeat the below process! In your filesystem navigate to ~/.mozilla/firefox/<profile>/zotero Create the following symlinks and ensure that they are named EXACTLY as described here:

ln -s /run/current-system/sw/bin/pdftotext pdftotext-Linux-<architecture> (e.g., pdftotext-Linux-x86_64)
ln -s /run/current-system/sw/bin/pdfinfo pdfinfo-Linux-<architecture>

Launch Firefox and go to the Zotero add-on preferences; click on the "Search" tab and you should find that both, pdftotext and pdfinfo, are recognized and their version is either "UNKNOWN" or the correct version number. This is trivial and should not deter you. You can now use the PDF metadata retrieval capabilities.

References

Zotero derivation source in Nixpkgs