From 13fe044aede5ee3837aa387c700166ed620e83f0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 10 Sep 2013 22:49:18 +0000 Subject: greek-fontenc (10sep13) git-svn-id: svn://tug.org/texlive/trunk@31626 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/greek-fontenc/greek-fontenc.sty.html | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/greek-fontenc/greek-fontenc.sty.html (limited to 'Master/texmf-dist/doc/latex/greek-fontenc/greek-fontenc.sty.html') diff --git a/Master/texmf-dist/doc/latex/greek-fontenc/greek-fontenc.sty.html b/Master/texmf-dist/doc/latex/greek-fontenc/greek-fontenc.sty.html new file mode 100644 index 00000000000..c5a1d17ce26 --- /dev/null +++ b/Master/texmf-dist/doc/latex/greek-fontenc/greek-fontenc.sty.html @@ -0,0 +1,106 @@ + + + + + + +greek-fontenc: Greek text font encoding setup + + + + + +
+

greek-fontenc: Greek text font encoding setup

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

+
+
Identification
+
\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{greek-fontenc}
+[2013/09/10 v0.1 Greek text font encoding setup]
+
+
+
+
+

Abstract

+

This package sets up a suitable font encoding and Greek LICR +definitions depending on the used TeX engine.

+
+
+

Motivation

+

With 8-bit TeX, you usually pass the font encoding name(s) as option to +fontenc which then loads the corresponding *.def file(s). +The last option indicates the document’s default font encoding. +(See [fntguide] for details and lgrenc-test.tex for an example.)

+

However, with XeTeX or LuaTeX, there is one common input and font encoding +– Unicode. 8-bit TeX font encodings should generally not be used. For +compatibility with the LaTeX font selection system, the package euenc +defines the (pseudo) font encodings EU1 and EU2 for XeTeX and LuaTeX +respectively, however euenc does not (yet) define LICR macros. The package +xunicode defines LICR macros for use with XeTeX but does not support Greek.

+

To allow documents using Greek LICR macros without worrying about the TeX +engine used to compile them, this package does a simple test (based on the +\ifdefined command provided by the e-TeX extension) and does “the right +thing” to set up Greek text font support for the detected engine.

+
+
+

XeTeX

+
    +
  • Use the EU1 font encoding. This is the only font encoding used with +XeTeX, so loading it with fontenc cannot mix up the default font +encoding.

  • +
  • Ensure EU1 is the \LastDeclaredEncoding. As fontenc does not load font +encoding definition files twice, it may happen that another font encoding +is defined after EU1 – for example the xunicode package (also loaded by +fontspec) leaves \LastDeclaredEncoding at T3 (tipa), because it +inputs t3enc.def.

  • +
  • load the Greek LICR definitions for XeTeX/LuaTeX. In an ideal world, this +should be done in the eu1enc.def file of the euenc package.

  • +
+
\ifdefined\XeTeXrevision
+  \usepackage[EU1]{fontenc}
+  \renewcommand{\LastDeclaredEncoding}{EU1}
+  \input{greek-euenc.def}
+
+
+
+

LuaTeX

+

Similar actions to XeTeX, but use the font encoding EU2. (The two different +(pseudo) encodings allow different font setups for XeTeX vs. LuaTeX using +differently named *.fd files (see euenc for details).

+
\else\ifdefined\luatexversion
+  \usepackage[EU2]{fontenc}
+  \renewcommand{\LastDeclaredEncoding}{EU1}
+  \input{greek-euenc.def}
+
+
+
+

8-bit TeX

+

Wit 8-bit TeX (TeX, PDFTeX), we do not know the documents main font +encoding, so we cannot use \usepackage[LGR]{inputenc}. However, the file +lgrenc.def contains code to prevent re-definition if it is already +loaded, so we can simply input:

+
\else
+  \input{lgrenc.def}
+\fi\fi
+
+
+
+

References

+
[fntguide]
+
+

LaTeX3 Project Team, LaTeX 2ε font selection, 2005. +http://mirror.ctan.org/macros/latex/doc/fntguide.pdf

+
+
+
+
+ + -- cgit v1.2.3