GithubHelp home page GithubHelp logo

jeremymarch / hoplitekb-libreoffice Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 195 KB

LibreOffice Extension implementing the Hoplite Polytonic Greek Keyboard

License: Mozilla Public License 2.0

Python 99.50% Shell 0.50%
ancient-greek libreoffice-extension classics oxt keyboard diacritics

hoplitekb-libreoffice's Introduction

HopliteKB-LibreOffice

LibreOffice Extension implementing the Hoplite Polytonic Greek Keyboard

Type polytonic Greek diacritics with ease.

For LibreOffice 5.2 and up on Linux, Mac, and Windows.

Features:

  • One key per diacritic
  • Add diacritics after typing the vowel
  • Add diacritics in any order
  • Toggle diacritics on/off
  • Breathings, accents, subscripts, macrons, breves, diaereses: no problem!*
  • Choose precomposed, precomposed with private use area, or combining-only modes.

* as long as your font supports it.

For best results, use a polytonic Greek font such as:

Installation:

The extension is contained in the file hoplitekb.oxt. Download this file from the release tab above. From LibreOffice, add the extension by going to Tools -> Extension Manager and clicking Add; select the file hoplitekb.oxt and restart LibreOffice.

To build the extension from source code, clone this repository. Run the build.sh script to build the extension. Install hoplitekb.oxt in LibreOffice as above.

Use:

Toggle on the extension by pressing the icon installed in the toolbar. The letters a-z and A-Z will be automatically transliterated into Greek characters. To add diacritics, after typing a vowel, press a key 1-9 to toggle on/off diacritics. The 1-9 keys, by default, are bound to:

  1. rough breathing
  2. smooth breathing
  3. acute
  4. grave
  5. circumflex
  6. macron
  7. breve
  8. iota subscript
  9. diaeresis

The default key bindings can be changed in the extension preferences.

Options:

The options menu can be accessed on Mac from LibreOffice -> Preferences -> LibreOffice Writer -> Hoplite Keyboard. On Linux and Windows it can be accessed from Tools -> Options -> LibreOffice Writer -> Hoplite Keyboard. On all platforms it can also be accessed from Tools -> Extension Manager; then select the extension and click the Options button.

From the options menu you can select the Unicode mode.

  • Precomposed mode uses precomposed characters when possible, falling back to combining diacritics for combinations where a precomposed character does not exist in the Unicode standard.
  • Precomposed with PUA (Private Use Area) mode is the same, but also uses the precomposed characters from the non-standard Private Use Area. These characters are not standard Unicode, but are supported by some fonts such as New Athena Unicode and IFAOGrec Unicode.
  • Combining-only mode uses combining diacritics to type decomposed characters. Few fonts handle combining diacritics well at this point; New Athena Unicode is currently the best.

There is a detailed discussion of these differences here.

From the options menu you can also define different key bindings for adding diacritics.

Why a LibreOffice extension? Why not offer this functionality system-wide?

The Linux, Mac, and Windows operating systems do not provide the keyboard with the information necessary to toggle on/off diacritics. The Hoplite Keyboard started on iOS and Android where this information is provided to the keyboard. So for Linux, Mac, and Windows the only way to implement this is inside applications.

To Do:

  • The PUA characters documented here are only partially implemented (only the macron combinations on α, ι, and υ).
  • Some uncommon characters are currently blocked, e.g. circumflex over short vowels, etc.
  • analyzePrecomposedLetter() is inefficient. Use unicodedata to canonically decompose or create own look up table.

hoplitekb-libreoffice's People

Contributors

arossato avatar jeremymarch avatar

Watchers

 avatar  avatar

Forkers

arossato

hoplitekb-libreoffice's Issues

Cool for LO Writer. Also for Calc?

Hi J.
nice tool . Thanks for that.

Q: would it be possible to use this also in LO Calc? What would I need to change in the sources to achieve this?

Thanks in advance,
Dave

Not working on Linux - LibreOffice-7.3.2.2

Hello,

very nice tool. I'd like to use it on linux. I followed the instructions but using ctrl-1-9 doesn't produce the expected result.

Even with the combining only mode diacritics are not being added. Moreover the default key bindings, which I'm currently using on Writer, for CTRL-1-5 are just modifying the heading level of the text.

I know it is not a font problem: I'm using New Athena Unicode and wrote an emacs input method that works just fine with PUA.

I didn't study the code, so I think that maybe I'm just missing something but, unfortunately, the documentation is not helpful.

Thanks for your kind attention.

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.