emacs-humanities
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-humanities] Abbrev table for polytonic greek


From: Juan Manuel Macías
Subject: Re: [emacs-humanities] Abbrev table for polytonic greek
Date: Wed, 13 Jan 2021 21:19:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

γειά σου Πρωτεσίλαε!

Protesilaos Stavrou <info@protesilaos.com> writes:

> Ευχαριστώ!  Thanks for sharing!  How do you use this as part of your
> setup?  What other packages/code/tweaks do you add to your workflow?

Glad this table is useful. I will briefly comment on how I use it.
First of all, I have a global abbrev table defined too:

      (define-abbrev-table 'global-abbrev-table
        '(
        ...
        ...
        ))

      (set-default 'abbrev-mode t)

The table for Polytonic Greek can be activated locally using:

      (setq local-abbrev-table greek-abbrev)

Since I use greek-ibycus as input method for mono- and polytonic
greek, I have defined this simple function:

     (defun my-poly-greek ()
       (interactive)
       (set-input-method "greek-ibycus4")
       (setq local-abbrev-table greek-abbrev))

And to deactivate the Greek table, it would be enough with:

    (add-hook 'input-method-deactivate-hook (lambda ()
                                            (setq local-abbrev-table
                                            nil)))

Regarding the font, if we want to use a different font for Greek (for
example, FiraGo), we could add to our .emacs:

    (set-fontset-font t 'greek (font-spec :family "firago medium"))

But I usually do it locally using hi-lock. For example, if in a certain
document I want the Greek text to be rendered with the GFS Heraklit font
(see: https://greekfontsociety-gfs.gr/typefaces/20th_21st_century), I
define this face before:

    (defface gfsheraklit
      '((t :family "GFS Heraklit" :height 210))
      "")

And in the document it is evaluated as local variable `highlight-regexp',
applying the defined face to the Greek and Greek Extended Unicode
ranges:

## Local Variables:
## eval: (highlight-regexp "\\([\u1F00-\u1FFE\u0370-\u03FF]+\\)" 'gfsheraklit)
## End:

Finally, my usual scenario consists of exporting from Org Mode to LaTeX.
On the LaTeX side I always use LuaTeX, and Babel for language management.
If in my document I have, for example, Spanish as the main language and
Ancient Greek as the second language, somewhere you can put (I don't do
it like that, really, instead I usually use a different *tex file for the
whole preamble):

#+LaTeX_Header: \usepackage[greek.ancient,spanish]{babel}

The latest versions of Babel include a very useful feature that allows
you to associate a font and a language to a Non-Latin Unicode Script
(greek, in this case). For example:

#+LaTeX_Header: \babelprovide[onchar=ids fonts,hyphenrules=ancientgreek]{greek}
#+LaTeX_Header: \babelfont[greek]{rm}[Numbers=Lowercase]{GFS Heraklit}

But this is a question more of LaTeX than of Emacs, so I refer to the
Babel documentation: https://www.ctan.org/pkg/babel

Best regards,

Juan Manuel 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]