greek-fontenc
#############
Greek font encoding definition files
************************************

:Author:    Günter Milde
:Date:      2013-05-16
:Copyright: © 2013 Günter Milde <milde@users.sf.net>
:Licence:   This work may be distributed and/or modified under the
            conditions of the `LaTeX Project Public License`_, either
            version 1.3 of this license or any later version.
:Abstract:  The fontenc_ standard package supports TeX font encodings via
            `encoding definition files`. The mechanism is explained in
            [fntguide_], section 5. This package provides encoding definition
            files for `Greek text font encodings`_ for use with fontenc_ and
            8-bit TeX engines. Currently, only LGR_ is supported.

.. note::   The LICR macro names for Greek symbols are chosen pending
            endorsement by the TeX community and related packages.
            
            Names for archaic characters, accents/diacritics, and
            punctuation may change in future versions.
           

Files
=====

`<lgrenc.def>`_
  font encoding definitions for LGR

  This file is the successor of the basic LGR encoding definition file which
  comes with babel_'s Greek support and ``lgrxenc.def`` from the lgrx_
  bundle. It defines LICR macros for Greek characters that select
  pre-composed glyphs if possible and places the diacritics according to
  Greek typesetting rules else. Combined accents can be specified as
  backslash + transliteration (``\~>\textalpha``) or iteratively
  (``\~\>\textalpha``).

`<lgrenc.def.txt>`_
  literate source (reStructuredText_ format)
  
`<lgrenc.def.html>`_
  literate source (HTML format)

`<lgrenc-test.tex>`_
  test example

`<lgrenc-test.pdf>`_
  test output

The literate source was converted with PyLit_ to TeX and with Docutils_ to
HTML format.


Installation
============

If possible, get this package from your distribution using its installation
manager.

Otherwise, make sure LaTeX can find the file `lgrenc.def`:

* Download and unpack `greek-fontenc.zip` or just download `<lgrenc.def>`_.

* Copy/Move/Link ``lgrenc.def`` to a suitable place in the TDS_ and run
  ``texhash``, or place it in the current working directory (e.g. for
  testing).

Usage
=====

Pass the encoding name as option to fontenc_.  For example, specify T1
(Latin) as default font encoding and LGR for Greek with ::

     \usepackage[LGR,T1]{fontenc}

See [fntguide]_ for details and `<lgrenc-test.tex>`_ for an example.


Greek text font encodings
=========================

Greek TeX font encodings are the envisaged T7_, LGR_, and LGI_.
Greek letters and symbols are also defined in the Unicode-based font
encodings EU1 (XeTeX), EU2 (LuaTeX) and PU (hyperref_).

T7
--

The [encguide]_ reserves the name T7 for a Greek `standard font encoding`.
However, up to now, there is no agreement on an implementation because the
restrictions for general text encodings are too severe for typesetting
polytonic Greek.


LGR
---

The LGR font encoding is the de-facto standard for typesetting Greek with
(8-bit) LaTeX. Fonts in this encoding include the `CB fonts`_ (matching CM),
grtimes_ (Greek Times), Kerkis_ (matching URW Bookman), and the `GFS font
collection`_. Setup of these fonts as Greek variant to matching Latin fonts
is facilitated by the substitutefont_ package.

The LGR font encoding allows to access Greek characters via an ASCII
transliteration. This enables simple input with a Latin keyboard.
Characters with diacritics can be selected by ligature definitions in the
font (see [greek-usage]_, [teubner-doc]_, [cbfonts]_).

A major drawback of the transliteration is, that you cannot access Latin
letters if LGR is the active font encoding (e.g. in documents or parts of
documents given the `Babel` language ``greek`` or ``polutionikogreek``).
This means that for every Latin-written word or acronym an explicit
language-switch is required. This problem can only be solved via a
font-encoding comprising Latin and Greek like the envisaged T7_ or
Unicode (with XeTeX or LuaTeX).

LGI
---

The ‘Ibycus’ fonts from the package ibygrk_ implement an alternative
transliteration scheme (also explained in [babel-patch]_).
It is currently not supported by `greek-fontenc`.

The font encoding file ``lgienc.def`` from ibycus-babel_ provides a basic
setup (without LICR macros or composite definitions).


References
==========

.. [fntguide] LaTeX3 Project Team, `LaTeX2ε font selection`, 2005.
   http://mirror.ctan.org/macros/latex/doc/fntguide.pdf
.. [encguide] Frank Mittelbach, Robin Fairbairns, Werner Lemberg,
   LaTeX3 Project Team, `LaTeX font encodings`, 2006.
   http://mirror.ctan.org/macros/latex/doc/encguide.pdf
.. [greek-usage] Apostolos Syropoulos, `Writing Greek with the greek option
   of the babel package`, 1997.
   http://www.tug.org/texlive/Contents/live/texmf-dist/doc/generic/babel/greek-usage.pdf
.. [cbfonts] Claudio Beccari, `The CB Greek fonts`, Εὔτυπον, τεῦχος № 21, 2008.
   http://www.eutypon.gr/eutypon/pdf/e2008-21/e21-a01.pdf
.. [teubner-doc] Claudio Beccari, ``teubner.sty``
   `An extension to the greek option of the babel package`, 2011.
   http://mirror.ctan.org/macros/latex/contrib/teubner/teubner-doc.pdf

.. [babel-patch] Werner Lemberg, `Unicode support for the Greek LGR
   encoding` Εὔτυπον, τεῦχος  № 20, 2008.
   http://www.eutypon.gr/eutypon/pdf/e2008-20/e20-a03.pdf

.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
.. _PyLit: http://pylit.berlios.de
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Docutils: http://docutils.sourceforge.net/rst.html
.. _TDS: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tds

.. _CB Fonts: http://www.ctan.org/pkg/cbgreek-complete
.. _GFS font collection: http://www.ctan.org/pkg/gfs
.. _Kerkis: http://www.ctan.org/pkg/kerkis
.. _babel: http://www.ctan.org/pkg/babel
.. _fontenc:  http://www.ctan.org/pkg/fontenc
.. _grtimes: http://www.ctan.org/pkg/grtimes
.. _hyperref: http://www.ctan.org/pkg/hyperref
.. _ibycus-babel: http://www.ctan.org/pkg/ibycus-babel
.. _ibygrk: http://www.ctan.org/pkg/ibygrk
.. _lgrx: http://www.ctan.org/pkg/lgrx
.. _substitutefont: http://www.ctan.org/pkg/substitutefont
