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.
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.
Preparing system for Greek
In order to generate documents in (or containing) Greek, you need to have Greek support in your LaTeX installation.
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.
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.
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):
The LyX functions for setting the text language are
Note: As written above, you cannot use
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.
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
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
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.
Requires textgreek 1
Then hit the "Validate" and OK buttons.