libreoffice 7 and autokey

To avoid a deal of errors with autokey (QT) in LibreOffice 7 (and KDE 5.20) it could be necessary install the KDE Frameworks 5 integration.
Here, at least, it worked.

ancient greek in LibreOffice

Some days ago I wrote this: 

a simple maquillage, unfortunately

I mean ancient greek font so that you can, typing ‘a’ get immediatly ‘α’. So far the free most interesting true type font (the only recognised by LibreOffice) is SPIonic.

You can see more details here

With this font you can tranform the word “Nomos” in “Nomov“, with few mouse clics (basically with the font menu, even though in this case you have to convert the final sigma as well). 

caveat

Absolutely to avoid the “AncientGreek” extension: cumbersome, useless and very aggressive (after removing leaves you with modified shortcuts, including some basic like ctrl + z, ctrl + b and F3).Vey bad!

 a new solution

I noticed that the above solution works only within LibreOffice: if you copy a greek word in another program, you get a no-greek text (with latin encoding). That’s why I call it now a maquillage.
A possible, better solution is go to a website that easyly encode your text in ancient greek, such as this.

LO: tradurre una parola e scrievere quella tradotta a fianco di querla originale

Si tratta di una macro per LibreOffice, con l’estensione Traduttore; ho copiato, da un sito per imparare inglese, un elenco di verbi inglesi, non tradotti; così ho cercato di velocizzare il prcesso di traduzione e aggiunta della parola tradotta a fianco di quella originale.

Riporto la soluzioone, dal sito AskLibreOffice:

Solved, with the help of macro’s author!

  • After inserting ~/.config/libreoffice/4/user/Scripts/python/TradutorLibreText.py
  • and after installing libreoffice-script-provider-python

This is my macro
sub translate_word
rem ———————————————————————-
rem define variables
dim document as object
dim dispatcher as object
rem ———————————————————————-
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)

rem ———————————————————————-
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = “Language”
args1(0).Value = “Current_Italian (Italy)”

dispatcher.executeDispatch(document, “.uno:LanguageStatus”, “”, 0, args1())

rem–nuovo inserim inizio
Dim oScriptProvider, oScript
oScriptProvider = ThisComponent.getScriptProvider()
oScript = oScriptProvider.getScript(“vnd.sun.star.script:TradutorLibreText.py$TradutorLibreText?language=Python&location=user”)
oScript.invoke(array(), array(), array())
rem–nuovo inserim fine
rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:WordLeftSel”, “”, 0, Array())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:Copy”, “”, 0, Array())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:Undo”, “”, 0, Array())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:Undo”, “”, 0, Array())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:GoToEndOfLine”, “”, 0, Array())

rem ———————————————————————-
dim args7(0) as new com.sun.star.beans.PropertyValue
args7(0).Name = “Text”
args7(0).Value = ” ”

dispatcher.executeDispatch(document, “.uno:InsertText”, “”, 0, args7())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:Paste”, “”, 0, Array())

rem ———————————————————————-
dim args9(0) as new com.sun.star.beans.PropertyValue
args9(0).Name = “Text”
args9(0).Value = “)”

dispatcher.executeDispatch(document, “.uno:InsertText”, “”, 0, args9())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:GoToPrevWord”, “”, 0, Array())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:GoToPrevWord”, “”, 0, Array())

rem ———————————————————————-
dim args12(0) as new com.sun.star.beans.PropertyValue
args12(0).Name = “Text”
args12(0).Value = “(”

dispatcher.executeDispatch(document, “.uno:InsertText”, “”, 0, args12())

rem ———————————————————————-
dim args13(1) as new com.sun.star.beans.PropertyValue
args13(0).Name = “Count”
args13(0).Value = 1
args13(1).Name = “Select”
args13(1).Value = false

dispatcher.executeDispatch(document, “.uno:GoLeft”, “”, 0, args13())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:WordRightSel”, “”, 0, Array())

rem ———————————————————————-
dispatcher.executeDispatch(document, “.uno:WordRightSel”, “”, 0, Array())

rem ———————————————————————-
dim args16(1) as new com.sun.star.beans.PropertyValue
args16(0).Name = “Count”
args16(0).Value = 1
args16(1).Name = “Select”
args16(1).Value = true

dispatcher.executeDispatch(document, “.uno:GoRight”, “”, 0, args16())

rem ———————————————————————-
dim args17(0) as new com.sun.star.beans.PropertyValue
args17(0).Name = “Color”
args17(0).Value = 8421504

dispatcher.executeDispatch(document, “.uno:Color”, “”, 0, args17())

rem ———————————————————————-
dim args18(2) as new com.sun.star.beans.PropertyValue
args18(0).Name = “FontHeight.Height”
args18(0).Value = 8
args18(1).Name = “FontHeight.Prop”
args18(1).Value = 100
args18(2).Name = “FontHeight.Diff”
args18(2).Value = 0

dispatcher.executeDispatch(document, “.uno:FontHeight”, “”, 0, args18())

end sub

libreoffice autokey bug

C’è un bug in LibreOffice (e anche in OpenOffice): non funziona autokey, se non in modo inaccettabilmente pasticciato. Non cambia la musica cambiando autokey-gtk con autokey-qt.
Bug anche nella funzione di autocorrezione di LibreOffice: fa dei gran casini con abbreviazioni come “ig” per “in generale” e simili.
Che guaio.
D’altronde OnlyOffice, che pare abbia una compatibilità del 100% con MS Office è un programmino commerciale-commerciale, tutto superficie: niente bookmarks, limitatissime possibilità di macro (solo js) e impossibilità di richiamarle personalizzando tastiera e menu (non sono personalizzabili). Va bene negli uffici per documenti usa e getta, non per uno che deve scrivere per riviste scientifiche o per libri.

Workaround: usare la funzione di autocorrezione di LO disabilitando temporaneamente autokey (shift+meta+k). Così si ottiene la sostituzione delle abbreviazioni con il testo da noi scelto. Ad esempio “ip” diventa “in particolare” senza pasticci.