Jump to content

LibreOffice: Difference between revisions

From Official NixOS Wiki
Httpdev (talk | contribs)
Added hints on hyphenation languages
DHCP (talk | contribs)
m fix indentation
Line 6: Line 6:


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
  environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
    libreoffice-qt
  libreoffice-qt
    hunspell
  hunspell
    hunspellDicts.uk_UA
  hunspellDicts.uk_UA
    hunspellDicts.th_TH
  hunspellDicts.th_TH
  ];
];
</syntaxHighlight>
</syntaxHighlight>


Line 18: Line 18:
In order to add hyphenation dictionaries, use
In order to add hyphenation dictionaries, use
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
    libreoffice-qt
  libreoffice-qt
    hyphenDicts.en_GB  # British English
  hyphenDicts.en_GB  # British English
    hyphenDicts.de_DE  # German, etc.
  hyphenDicts.de_DE  # German, etc.
  ];
];
</syntaxhighlight>
</syntaxhighlight>



Revision as of 15:24, 19 July 2026

LibreOffice is a multi-platform office suite. It consists of programs for word processing (Writer); creating and editing spreadsheets (Calc), slideshows (Impress), diagrams and drawings (Draw); working with databases (Base); and composing mathematical formulae (Math).

Spellcheck

In order for spellcheck to work, you will need to install the hunspell package as well as the hunspellDicts. packages for the languages that you would like. For example this installs libreoffice with dictionaries for Ukrainian and Central Thai.

environment.systemPackages = with pkgs; [
  libreoffice-qt
  hunspell
  hunspellDicts.uk_UA
  hunspellDicts.th_TH
];

Hyphenation

In order to add hyphenation dictionaries, use

environment.systemPackages = with pkgs; [
  libreoffice-qt
  hyphenDicts.en_GB  # British English
  hyphenDicts.de_DE  # German, etc.
];

uno Python Library for API access

With uno.py it is possible to access the LibreOffice API with Python. For getting uno.py python library to work the special path /lib/libreoffice/program needs to be included into the python path as well as the URE_BOOTSTRAP variable must be set.

let
  office = pkgs.libreoffice-fresh-unwrapped;
in {
  environment.sessionVariables = {
    PYTHONPATH = "${office}/lib/libreoffice/program";
    URE_BOOTSTRAP = "vnd.sun.star.pathname:${office}/lib/libreoffice/program/fundamentalrc";
  };
}

KDE / Plasma

If you use KDE (Plasma) then you'll be better off with libreoffice-qt package. Otherwise you may lack, e.g. main menu bar.

See also

  • Onlyoffice, software suite that offers online and offline tools for document editing, collaboration, and management.