Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

LyX /

Greek

Categories: Humanities
<< | Page list | >>

Using LyX to write Greek

LyX supports both monotonic (post-1982) and polytonic (pre-1982) Greek with either Unicode input or the LGR transliteration. A third variety, ancient Greek (with support for multi-accented characters and ancient hyphenation patterns), is supported via the polyglossia package (with XeTeX) and will be supported generally (i.e., via babel) as of LyX 2.2.

If you need to write Greek, you have the option to either use classic LaTeX or LuaTeX with the babel package or XeTeX with the polyglossia package. The difference is as follows.

  • Babel currently supports only polytonic and monotonic Greek (support for ancient Greek follows with LyX 2.2)
  • With babel, you can only use one Greek variant in a document (polytonic or monotonic [or ancient as of LyX 2.2])
  • LuaTeX and XeTeX, as opposed to classic LaTeX support the full range of unicode input and, more importantly, unicode-encoded fonts.
  • Polyglossia supports the use of multiple Greek variants in a document.

If you are a Greek philologist who writes monotonic Greek papers, but needs to quote Homer, you will have to use XeTeX/polyglossia. For most other users, the selection depends on taste and personal needs.

1.  Preparing system for Greek

In order to generate documents in (or containing) Greek, you need to have Greek support in your LaTeX installation.

1.1  LaTeX

Make sure to have the required LaTeX packages installed. The names of the package vary between distributions. With TeXLive, the necessary language packages (for babel support) are probably called texlive-lang-greek and/or texlive-babel-greek, but this varies between different distributions of TeXLive (e.g., different Linux distributions). If you do not find these packages, watch out for packages with similar names. When in doubt, install every package with "greek" in its name.

Polyglossia and the Greek polyglossia support is in a package called texlive-xetex or similar.

Additional Greek-supporting features and fonts are in the packages texlive-fonts-extra and texlive-latex-extra.

For classic LaTeX, there is a range of high quality LaTeX fonts supporting Greek including Latin Modern, Kerkis and the TeXGyre fonts.
If you use XeTeX or LuaTeX, you can select any OpenType font installed on your OS. Many common OpenType fonts include comprehensive Greek support.

1.2  Screen Fonts

To see Greek characters in LyX, you should select Unicode fonts in Tools→Preferences→Screen Fonts. DejaVu is a widely supported font with a huge range of glyphs, and it is optimized for the screen.

2.  Input & typeset Greek

LyX can handle Greek text in Unicode encoding (e.g. copied from somewhere else or input with a Greek system keyboard or via the Symbols dialog in LyX) out of the box.

Proper hyphenation and babel support is achieved if you set the language to Greek or Greek (polytonic):

  • document-wide with Document→Settings→Language
  • for Greek text parts with Edit→Text Style→Customized→Language
The LyX functions for setting the text language are language greek respectively language polutonikogreek. These can be passed via the minibuffer or bound to a key.
Note: As written above, you cannot use greek and polutonikogreek in the same document when using babel (as opposed to polyglossia)!

If the language is set to Greek, Latin text will be transliterated according to the rules of the LGR font encoding, so that e.g. logos results in λογοσ.

2.1  Why the language should always be properly set

Typing some Greek words in English (or other latin-scripted language) text ostensibly works out of the box without setting the correct language: the Greek characters are properly output. But in fact this is only half of the story. If you do not properly set the language, the Greek parts will actually not be recognized as Greek by LaTeX. As a result, hyphenation will most likely be utterly wrong!

If you try the opposite, you will be immediately made aware of this: Latin (ASCII) letters are interpreted as a transcription of Greek within Greek language context, which results in "Greeklish".

The lesson is: Always properly mark the language of text parts via Edit→Text Style→Customized→Language

3.  Special cases

3.1  Greek parts in verbatim context (ERT, listings, glosse etc.)

So-called verbatim context (such as TeX mode, verbatim paragraphs, linguistic glosses or program listings) does not allow language changes and it is currently hard-wired to latin1 encoding (the latter is a LyX limitation), so you cannot insert Greek (unicode) glyphs to verbatim context (well, you can, but you get lots of LaTeX errors). Therefore, you need to insert Greek to such context via Latin transliteration.

The transliteration method and syntax is described in this document: http://mirror.ctan.org/macros/latex/contrib/babel-contrib/greek/usage.pdf
To replace the Latin letter 'a' by its Greek counterpart enter \textgreek{a} to the verbatim context.

Note that if you need Greek only in verbatim context, you need to take care about the loading of the Greek language support yourself, since LyX is unaware in this case that you use Greek.
The most unobtrusive way to load Greek support is to enter the following to Document→Settings...→Local Layout:

Requires textgreek 1

Then hit the "Validate" and OK buttons.

4.  Categories

Humanities

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2015-01-25 11:17 UTC