Index of /CTAN/language/greek/greek-fontenc

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]Makefile2022-06-14 19:50 4.7K 
[   ]alphabeta-doc.pdf2022-06-14 20:07 426K 
[   ]alphabeta-doc.tex2022-06-14 19:50 17K 
[TXT]alphabeta-lgr.def2020-10-30 23:20 10K 
[TXT]alphabeta-lgr.def.html2022-06-14 19:50 27K 
[   ]alphabeta-tu.pdf2022-06-14 20:07 74K 
[TXT]alphabeta-tuenc.def2022-06-14 19:50 15K 
[TXT]alphabeta-tuenc.def.html2022-06-14 19:50 33K 
[TXT]alphabeta.sty2022-06-14 19:50 15K 
[TXT]alphabeta.sty.html2022-06-14 19:50 38K 
[   ]diacritics.pdf2022-06-14 20:07 279K 
[   ]diacritics.tex2020-10-30 23:20 6.0K 
[TXT]greek-euenc.def2022-06-14 19:50 625  
[TXT]greek-fontenc.def2020-11-04 12:31 19K 
[TXT]greek-fontenc.def.html2022-06-14 19:50 41K 
[TXT]greek-fontenc.html2022-06-14 20:07 45K 
[   ]hyperref-with-greek.pdf2022-06-14 20:07 278K 
[   ]hyperref-with-greek.tex2020-10-30 23:20 13K 
[TXT]lgr2licr.lua2022-06-14 19:50 4.5K 
[TXT]lgr2licr.lua.html2022-06-14 19:50 6.7K 
[TXT]lgrenc.def2022-06-14 20:07 40K 
[TXT]lgrenc.def.html2022-06-14 20:07 55K 
[   ]makeattest.pdf2022-06-14 19:50 62K 
[   ]makeattest.tex2022-06-14 19:50 676  
[TXT]puenc-greek.def2020-11-04 12:31 23K 
[TXT]puenc-greek.def.html2022-06-14 19:50 42K 
[   ]test-inputenc.pdf2022-06-14 20:07 386K 
[   ]test-inputenc.tex2022-06-14 19:50 18K 
[   ]test-lgrenc.pdf2022-06-14 20:07 316K 
[   ]test-lgrenc.tex2022-06-14 19:50 21K 
[   ]test-tuenc-greek.pdf2020-11-04 12:31 86K 
[   ]test-tuenc-greek.tex2020-11-04 12:31 29K 
[   ]textalpha-doc.pdf2022-06-14 20:07 483K 
[   ]textalpha-doc.tex2020-11-04 12:31 19K 
[   ]textalpha-tu.pdf2022-06-14 20:07 83K 
[TXT]textalpha.sty2022-06-14 19:50 21K 
[TXT]textalpha.sty.html2022-06-14 19:50 46K 
[TXT]tuenc-greek.def2020-11-04 12:31 47K 
[TXT]tuenc-greek.def.html2022-06-14 19:50 77K 



Greek font encoding definition files


Günter Milde


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.


LaTeX internal character representation (LICR) macros are a verbose but failsafe 7-bit ASCII encoding that works unaltered under both, 8-bit TeX and XeTeX/LuaTeX. Use cases are macro definitions and generated text

This bundle provides LICR macros for characters from the Greek script and encoding definition files for Greek text font encodings for use with fontenc (8-bit TeX) or fontspec (XeTeX/LuaTeX).

Included are also the LaTeX packages textalpha and alphabeta.





greek-fontenc.def “outsourced” from lgrxenc.def

experimental files xunicode-greek.sty and greek-euenc.def: LICRs for XeTeX/LuaTeX.



Bugfix: wrong breathings psilioxia -> dasiaoxia.



Bugfix: Disable composite defs starting with char macro,

fix “hiatus” handling.



Fix “input” path in xunicode-greek and greek-euenc.def.



greek-fontenc.sty: Greek text font encoding setup package,

remove xunicode-greek.sty.



textalpha.sty and alphabeta.sty moved here from lgrx and updated to work with XeTeX/LuaTeX.

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



Bugfix in greek-euenc.def and alphabeta-euenc.def.



Compatibility with Xe/LuaTeX in 8-bit mode,

\greekscript TextCommand.



Fix identification of greek-euenc.def.



Documentation update, remove duplicate code.



Fix auxiliary macro names in textalpha.

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



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.



Fix rho with dasia bug in lgrenc.def (Linus Romer).



Support for standard Unicode text font encoding “TU” (new in fontspec v2.5a).



Drop error font declaration (cf. ltxbugs 4399).



@uclclist entry for \prosgegrammeni.

Documentation update.



Update test for Unicode fonts. Rename greek-euenc to tuenc-greek.

Use \UTFencoding instead of \LastDeclaredEncoding.



Bugfix in textalpha: Let \greekscript set \encodingdefault.

\textKoppa as alias for \textkoppa in LGR.

Update URLs.



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.

Documentation update.

TeX files


LGR Greek font encoding definitions.

This file is the successor of the basic LGR encoding definition file which comes with babel’s Greek support and the now obsolete lgrx bundle.


Font setup for Greek with XeTeX/LuaTeX.


Greek LICR definitions for PDF strings.


Common Greek font encoding definitions.


Backwards compatibility file loading tuenc-greek.


Greek symbols in text

Use \textalpha\textOmega independent of font encoding and TeX engine.


Greek symbols in text and math.

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


Composite definitions for 8-bit TeX..


Composite definitions with XeTeX/LuaTeX..

Literate source files were converted with PyLit to reStructuredText and with Docutils to the HTML documentation.

Documentation and test documents


README, greek-fontenc.html

textalpha package documentation:

textalpha-doc.tex, textalpha-doc.pdf, textalpha-tu.pdf

alphabeta package documentation:

alphabeta-doc.tex, alphabeta-doc.pdf, alphabeta-tu.pdf

LGR test and usage example

test-lgrenc.tex, test-lgrenc.pdf

TU test and usage example

test-tuenc-greek.tex, test-tuenc-greek.pdf

Hyperref test and usage example

hyperref-with-greek.tex, hyperref-with-greek.pdf

Test with input encodings other than utf-8

test-inputenc.tex, test-inputenc.pdf

Greek diacritics with standard accent macros

diacritics.tex, diacritics.pdf

Experimental files

These files are still in development and will eventually be moved to/merged with other packages or removed in future versions:


LGR Transcription to Greek LICR transformation


If possible, get the bundle from your distribution using its installation manager.

Otherwise, make sure LaTeX can find the package and definition files:


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 charactes 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

Greek TeX font encodings are the envisaged T7, LGR, and LGI. Greek letters and symbols are also defined in the Unicode-based font encodings TU, and PU.


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.


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 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).


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).


Standard Unicode font encoding for XeTeX and LuaTeX loaded by fontspec (since v2.5a) rsp. the LaTeX kernel since 2017/01/01 [LaTeX2e News Issue 26]_. 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.

XeTeX uses the Unicode NFC normalization, so that combining characters are merged with the base character if a pre-composed character exists. This results in better looking output for characters with multiple diacritics. Unfortunately, LuaTeX does not apply the NFC normalization. This leads to suboptimal placing of some diactritics, especially the sub-iota (becoming unintelligable in combination with small letter eta).

TODO: The lua-uni-algos package may be helpfull to implement a NTC normalization to Greek text in LuaTeX.

The legacy Unicode font encodings EU1 and EU2 for XeTeX and LuaTeX respectively were superseded by TU in the 2017 fontspec release.


The package hyperref defines the PU font encoding for use in PDF strings (ToC, bookmarks) which supports monotonic Greek. greek-fontenc adds support for polytonic Greek and some archaic characters also supported in LGR and TU (see hyperref-with-greek.tex, hyperref-with-greek.pdf).

Selecting Greek LICR macro names


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.

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.


    The math macros for the symbol variants \varepsilon and \varphi map to characters named “GREEK SMALL LETTER …”, while \vartheta, \varkappa, \varrho, and \varpi map to “GREEK … SYMBOL” Unicode characters. (See also section 5.5.3 of the unicode-math documentation.)

  • 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 either

    1. used as inspiration for new LICR macro names or

    2. 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 (\textgreek, \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, babel-greek, or teubner)

accent macros

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

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

    However, the Adobe Glyph List For New Fonts maps, e.g., “tonos” and “dieresistonos” to the spacing characters GREEK TONOS and GREEK DIALYTIKA TONOS, hence texttonos and textdiaresistonos 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 risc of name clashes (cf. \@tabacckludge).

For the end-user “symbol macros” (\~ \' \` \" \< \> \"' ...) are provided. (The non-standard macros \< and \> only with textalpha or alphabeta.)

symbol variants

See also

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.

Unicode defines separate code points for the symbol variants for use in mathematical context. However, they are sometimes also used in place of the corresponding letter characters in Unicode-encoded text.

The variant shapes are not given separate code-points in the LGR font encoding.

In mathematical mode, TeX supports the distinction between θ|ϑ, π|ϖ, φ|ϕ, ρ|ϱ, and ε|ϵ with \var<lettername> macros. However, the mapping of letter/symbol in Unicode to “normal”/variant in TeX is inconsistent and variant macros for ϴ ϐ, and ϰ are not available without additional packages (e.g. amssymb provides ϰ as \varkappa).

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

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

  • With LGR encoded fonts, they report an error by default and are mapped to the corresponding letter with the normalize-symbols option of textalpha and alphabeta (loosing the distinction between the shape variants).


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.


LaTeX3 Project Team, LaTeX2ε font selection, 2005.


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


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


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


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


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