Greek font encoding definition files

2.6 (changelog)

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.


Latest Release:


The greek-fontenc bundle provides encoding definition files for Greek text font encodings that define LICR[1] macros for characters from the Greek script

Included are also the LaTeX packages textalpha and alphabeta.

TeX files and packages


textalpha.sty: Greek symbols in text

Use \textalpha\textOmega or Greek literal characters independent of font encoding and TeX engine.

Documentation: textalpha-doc.pdf

alphabeta.sty: Greek symbols in text and math

Use \alpha\Omega independent of text/math mode, font encoding, and TeX engine.

Documentation: alphabeta-doc.pdf

Font encoding definitions


Common Greek font encoding definitions


LGR Greek font encoding definitions.


Extended Greek definitions for the TU font encoding


Extended Greek definitions for PDF strings

Auxiliary files


Backwards compatibility file loading tuenc-greek.def.


LGR Transcription to Greek LICR transformation. Provisional.

The source files can be converted with PyLit to reStructuredText and with Docutils to the HTML documentation.

Usage examples and test documents

char-list.texchar-list.pdf, char-list-tu.pdf

List of Greek characters supported by greek-fontenc. Compares input variants and tests chase changing.

char-list-alphabeta.texchar-list-alphabeta.pdf, char-list-alphabeta-tu.pdf

List/test of Greek characters supported by alphabeta.


Hyperref test and usage example.


LGR test and usage example.


TU test and usage example.


Test LICRs with LuaTeX in 8-bit compatibility mode (with luainputenc).

Download and Installation

The simplest way is to install this package from your distribution using its installation manager.



The arabi package provides the Babel arabic option which loads arabicfnt.sty for font setup. This package overwrites the LICR macros \omega and \textomega with font selecting commands. See the report for Debian bug 858987 for details and the arabi workaround below.


There are several alternatives to set up the support for a Greek font encoding provided by this bundle, e.g.:


Use the greek option with Babel:


This automatically loads lgrenc.def with 8-bit TeX and tuenc-greek.def with XeTeX/LuaTeX and provides localized auto-strings, hyphenation and other localizations (see babel-greek).

Babel can be used together with textalpha or alphabeta.


Ensure support for Greek characters in text mode:


eventually with the normalize-symbols option to handle symbol variants and/or the keep-semicolon option to use the semicolon as erotimatiko also in LGR


This sets up LICR macros for Greek text characters under both, 8-bit TeX and Xe-/LuaTeX. For details see textalpha-doc.tex and textalpha-doc.pdf (8-bit TeX) as well as test-tuenc-greek.tex and test-tuenc-greek.pdf (XeTeX/LuaTeX).


To use the short macro names (\alpha\Omega) known from math mode in both, text and math mode, write


For details see alphabeta-doc.tex and alphabeta-doc.pdf.


Declare LGR via fontenc. For example, specify T1 (8-bit Latin) as default font encoding and LGR for Greek with


Note that without textalpha or alphabeta, Greek text macros work only if the current font encoding supports Greek. See [fntguide] for details and test-lgrenc.tex for an example.

It is possible to use 8-bit Greek text fonts in the LGR TeX font encoding also with XeTeX/LuaTeX, if the fontenc package is loaded before Babel, textalpha, or alphabeta, e.g.

\setmainfont{Linux Libertine O} % Latin Modern does not support Greek
\setsansfont{Linux Biolinum O}

See test-tuenc-greek.tex, test-tuenc-greek.pdf and test-lgrenc.tex, test-lgrenc.pdf.

To work around the conflict with arabi, it may suffice to ensure greek is loaded after arabic:


More secure is an explicit reverse-definition, e.g.

% save original \omega


% fix arabtex:

Greek text font encodings


The LGR font encoding is the de-facto standard for typesetting Greek with 8-bit LaTeX. greek-fontenc provides a comprehensive LGR font encoding definition file.

Fonts in this encoding include the CB fonts (matching CM), grtimes (Greek Times), Kerkis (matching URW Bookman), DejaVu, Libertine GC, and the GFS fonts. Setup of these fonts as Greek variant to matching Latin fonts is facilitated by the \DeclareFontfamilySubstitution command added to the LaTeX kernel in the 2020-02 release [ltnews31].

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 the fact, 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 be circumvented using Unicode fonts (font encoding TU) with XeTeX or LuaTeX.


Standard Unicode font encoding for XeTeX and LuaTeX loaded by fontspec (since v2.5a) rsp. the LaTeX kernel since 2017/01/01 [ltnews26].[2] greek-fontenc adds support for the Greek script (see tuenc-greek).

Xe/LuaTeX works with any system-wide installed OpenType font. Suitable fonts supporting Greek include CM Unicode, Deja Vu, EB Garamond, the GFS fonts, Libertine OTF, Libertinus, Old Standard, Tempora, and UM Typewriter (all available on CTAN) but also many commercial fonts. Unfortunately, the fontspec default, Latin Modern misses most Greek characters.

LuaTeX does not apply the NFC normalization by default. This leads to sub-optimal placing of some diacritics, especially the sub-iota (becoming unintelligible in combination with small letter eta). This issue can be fixed specifiying the “Harfbuzz” renderer when loading fonts with fontspec, e.g.



The package hyperref defines the PU font encoding for use in PDF strings (ToC, bookmarks). greek-fontenc adds support for Greek LICRs (see hyperref-with-greek.tex, hyperref-with-greek.pdf).

The following two encodings are not supported by greek-fontenc:


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 any LICR macros or composite definitions).


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.

Greek LICR macro names

This bundle provides LaTeX internal character representations (LICR macros) for Greek letters and diacritics. Macro names were selected based on the following considerations:

Letters and symbols

  • The fntguide (section 6.4 Naming conventions) recommends:

    Where possible, text symbols should be named as \text followed by the Adobe glyph name: for example \textonequarter or \textsterling. Similarly, math symbols should be named as \math followed by the glyph name, for example \mathonequarter or \mathsterling.


    The Adobe Glyph List For New Fonts has names for many glyphs in the Greek and Coptic Unicode block, but not for Greek extended. The Adobe Glyph List (for existing fonts) lists additional glyph names used in older fonts. However, these are not intended for active use.

  • If there exists a math-mode macro for a symbol, the corresponding text macro could be formed by prepending text.


    The glyph name for the GREEK SMALL LETTER FINAL SIGMA is sigma1, the corresponding math-macro is \varsigma. The text symbol is made available as \textvarsigma.


    Symbol variants (see below).

  • The Unicode names list provides standardized descriptive names for all Unicode characters that use only capital letters of the Latin alphabet. While not suited for direct use in LICR macros, they can be converted to LICR macro names via a defined set of transformation rules.


    \textfinalsigma is a descriptive alias for GREEK SMALL LETTER FINAL SIGMA derived via the rules:

    • drop “LETTER” if the name remains unique,

    • drop “GREEK” if the name remains unique,

    • use capitalized name for capital letters, lowercase for “SMALL” letters and drop “SMALL”,

    • concatenate

  • Omit the “text” prefix for macros that do not have a math counterpart?

    • Simpler,

    • ease of use (less typing, better readability of source text),

    • many established text macro names without “text”,

    • text prefix does not mark a macro as encoding-specific or “inserting a glyph”. There are e.g. font-changing macros (\textbf, \textit) and encoding-changing macros (\textcyr).

    • There are examples of encoding-specific macros without the text-prefix, especially for letters, see encguide.

    • Less consistent,

    • possible name clashes

    • text prefix marks a macro as confined to text (as opposed to math) mode,

    The font encoding definition files use the text prefix for symbols. Aliases (short forms, compatibility defs, etc.) are defined in additional packages (e.g. alphabeta.sty and teubner)

Accent macros

  • standard accent macros (\DeclareTextAccent definitions in latex/base/...) are one-character macros (\' \" ... \u \v ...) .

  • tipa.sty, xunicode, and ucs use the “text” prefix also for accent macros.

    However, the Adobe Glyph List For New Fonts maps, e.g., “tonos” and “dieresistonos” to the spacing characters GREEK TONOS rsp. GREEK DIALYTIKA TONOS, hence \texttonos and \textdieresistonos should be spacing characters.

  • textcomp (ts1enc.def) defines \capital... accents (i.e. without text prefix).

Currently, greek-fontenc uses for diacritics:

  • Greek names like in Unicode, and ucsencs.def, and

  • the prefix \acc to distinguish the macros as TextAaccent and reduce the risk of name clashes with spacing characters.

Aliases to the “symbol macros” \~ \' \` \" \"' \"` ... are provided. With textalpha or alphabeta also \< and \> for \accdasia and \accpsili.

Symbol variants

Mathematical notation distinguishes variant shapes for beta (β|ϐ), theta (θ|ϑ), phi (φ|ϕ), pi (π|ϖ), kappa (κ|ϰ), rho (ρ|ϱ), Theta (Θ|ϴ), and epsilon (ε|ϵ).

The variations have no syntactic meaning in Greek text and Greek text fonts use the shape variants indiscriminately (cf. glyph variants). The variant shapes are not given separate code-points in the LGR text font encoding.

In mathematical mode, TeX supports the alternative glyph variants with \var<lettername> macros (variant macros for ϴ, ϐ, and ϰ require additional packages).

Unicode defines separate code points for the symbol variants for use in mathematical context.[3] Unfortunately, the mapping between Unicode’s letter/symbol distinction and “normal”/variant in TeX is inconsistent.

greek-fontenc provides \text<lettername>symbol LICR macros for the Greek symbol characters:

  • With Unicode fonts, the macros select the GREEK <lettername> SYMBOL``.

  • With LGR encoded fonts, they report an error by default.

    With the normalize-symbols option of textalpha and alphabeta, they are mapped to the corresponding letter (loosing the distinction between the shape variants).

The alphabeta package provides \<lettername>, \var<lettername>, and \<lettername>symbol in both, text and math mode (cf. Table 1 in alphabeta-doc-tu.pdf).


0.9 (2013-07-03)
  • greek-fontenc.def “outsourced” from lgrxenc.def

  • experimental LICRs for XeTeX/LuaTeX.

0.9.1 (2013-07-18)
  • Bugfix: wrong breathings psilioxia -> dasiaoxia.

0.9.2 (2013-07-19)
  • Bugfix: Disable composite defs starting with char macro,

  • Fix “hiatus” handling.

0.9.3 (2013-07-24)
  • Fix path for \input of greek-fontenc.def.

0.9.4 (2013-09-10)
  • greek-fontenc.sty: Greek text font encoding setup package.

  • remove xunicode-greek.sty.

0.10 (2013-09-13)
  • textalpha and alphabeta moved here from lgrx and updated to work with XeTeX/LuaTeX.

  • greek-fontenc.sty removed (obsoleted by textalpha).

0.10.1 (2013-10-01)
  • Bugfix in greek-euenc.def and alphabeta-euenc.def.

0.11 (2013-11-28)
  • Compatibility with Xe/LuaTeX in 8-bit mode.

  • \greekscript TextCommand (cf. [encguide]).

0.11.1 (2013-12-01)
  • Fix identification of greek-euenc.def.

0.11.2 (2014-09-04)
  • Documentation update, remove duplicate code.

0.12 (2014-12-25)
  • Fix auxiliary macro names in textalpha.

  • Conservative naming: move definition of \< and \> from greek-fontenc.def to textalpha.sty (Bugreport David Kastrup).

0.13 (2015-09-04)
  • Support for symbol variants,

  • keep-semicolon option in textalpha,

  • \lccode/\uccode corrections for Unicode (from Apostolos Syropoulos’ xgreek) in greek-euenc.

  • Do not convert \ypogegrammeni to \prosgegrammeni with \MakeUppercase.

0.13.1 (2015-12-07)
0.13.2 (2016-02-05)
  • Support for standard Unicode text font encoding “TU” (new in fontspec v2.5a).

0.13.3 (2019-07-10)
0.13.4 (2019-07-11)
  • “Lowercase” \prosgegrammeni -> \ypogegrammeni but not vice versa.

0.14 (2020-02-28)
  • Rename greek-euenc to tuenc-greek.

  • Use \UTFencoding instead of \LastDeclaredEncoding.

1.0 (2020-09-25)
  • Bugfix in textalpha: Let \greekscript set \encodingdefault.

  • \textKoppa as alias for \textkoppa in LGR.

2.0 (2020-10-30)
  • Move common alias definitions to greek-fontenc.def.

  • textalpha loads TU with Xe/LuaTeX by default and provides \textmicro and LICR macros for archaic symbols from the “Greek and Coptic” Unicode block.

  • Use \UnicodeEncodingName (by the LaTeX kernel) instead of \UTFencname for the Unicode font encoding name.

  • Replace utf8 literals in tuenc-greek.def.

  • New file puenc-greek.def: setup for PU encoding defined by hyperref for PDF strings.

  • Don’t use \textcompwordmark as base in accent commands.

2.1 (2022-06-14)
2.2 (2023-02-28)
  • Use correct glyph for \textanoteleia (middle dot) in LGR.

  • Test and add composite commands for combinations that are not converted to pre-composed characters.

  • Don’t use \makeatother in \AtBeginDocument.

  • Skip \uccode fixes when ignored by \MakeUppercase.

  • Various small fixes and documentation update.

2.2.1 (2023-03-08)
  • Fix broken links in

  • @uclclist entry for \accoxia, prevent downcasing \textStigma to \textvarstigma.

2.2.2 (2023-03-17)
  • Don’t map active ; to \textsemicolon in math mode.

2.3 (2023-06-01)
  • Fix Unicode errors with pdfLaTeX and “new” (2023) \MakeUppercase.

  • Upcase symbol variants also if input as LICR.

2.4 (2023-08-15)
  • Fixes for the 2022 implementation of \MakeUppercase.

  • textalpha: Map character 00B5 MICRO SIGN to \textmicro.

2.5 (2023-09-12)
  • \textvarTheta is now an alias for \textTheta (the AMS-math command \varTheta sets the letter Theta in italic shape).

  • Fix errors in LuaTeX’s 8-bit compatibility mode (luainputenc).

  • Fix \MakeUppercase in PDF strings.

  • Drop composite definitions if the pre-composed character can also be selected by the Unicode NFC normalization.

  • Test/fix case change commands with alphabeta. Composite commands for PU. Inline alphabeta-tuenc.def and alphabeta-lgr.def.

  • Update documentation, fix links.

2.6 (2023-11-16)
  • Bugfix in alphabeta: Don’t use TextCommands for generic macros.

  • Fix \textautosigma with Unicode fonts.


An alternative, more complete set of short mnemonic character names is the XML Entity Definitions for Characters W3C Recommendation from 01 April 2010.

For glyph names of the LGR encoding see, e.g., CB.enc by Apostolos Syropoulos and xl-lgr.enc from the libertine (legacy) package. lgr.cmap provides a mapping to Unicode characters.

A full set of \text* symbol macros is defined in ucsencs.def from the ucs package.


Werner Lemberg, Unicode support for the Greek LGR encoding Εὔτυπον, τεῦχος № 20, 2008.


Claudio Beccari, The CB Greek fonts, Εὔτυπον, τεῦχος № 21, 2008.

[encguide] (1,2)

Frank Mittelbach, Robin Fairbairns, Werner Lemberg, LaTeX3 Project Team, LaTeX font encodings.


LaTeX3 Project Team, LaTeX2ε font selection.


Apostolos Syropoulos, Writing Greek with the greek option of the babel package, 1997.


LaTeX Project Team, LaTeX News Issue 26, January 2017.


LaATeX News, Issue 31, February 2020, p. 3:


Claudio Beccari, teubner.sty An extension to the greek option of the babel package, 2011.