summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lgrx/lgrxenc.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lgrx/lgrxenc.def')
-rw-r--r--Master/texmf-dist/tex/latex/lgrx/lgrxenc.def191
1 files changed, 127 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/lgrx/lgrxenc.def b/Master/texmf-dist/tex/latex/lgrx/lgrxenc.def
index a847402f8a8..0ca8547a3c4 100644
--- a/Master/texmf-dist/tex/latex/lgrx/lgrxenc.def
+++ b/Master/texmf-dist/tex/latex/lgrx/lgrxenc.def
@@ -1,5 +1,6 @@
% lgrxenc.def
% ***********
+%
% comprehensive LGR Greek font encoding definitions
% =================================================
%
@@ -18,13 +19,17 @@
% monotonic and polytonic Greek, independent of the `babel`
% package.
%
+% This package is part of the lgrx_ bundle.
+%
% .. contents::
%
%
% Changelog
% ---------
%
-% ===== ============ ===================================================
+% .. class:: borderless
+%
+% ===== ============ ====================================================
% 0.1 2010-03-31 initial attempt
% 0.2 2010-04-20 diacritics dropped in UPPERCASE
% 0.3 2010-06-08 handle Titlecase and UPPERCASE extending
@@ -35,14 +40,16 @@
% 0.4.1 2010-08-06 prevent multiple evaluation
% 0.5 2010-08-27 support ``\textalpha`` ... ``\textOmega``
% 0.5.1 2012-05-08 upload to CTAN
-% ===== ============ ===================================================
+% 0.6 2012-06-29 ``\TextGreek`` wrapper command (used in lgrenc.dfu),
+% aliases for ``puenc.def`` compatibility
+% ===== ============ ====================================================
%
% Usage
% -----
%
-% To prevent confusion with Babel_'s rudimentary ``lgrenc.def``, this file
-% is named ``lgrxenc.def``. Load it by calling fontenc_ with the ``LGRx``
-% option.
+% To prevent confusion with Babel_'s rudimentary ``lgrenc.def``, this file is
+% named ``lgrxenc.def``. Load it by calling fontenc_ with the ``LGRx`` option
+% or indirectly via the textalpha_ or alphabeta_ packages.
%
% Example:
% Select font encodings `T1` (as default) and `LGR` (with the comprehensive
@@ -51,7 +58,7 @@
% ``\usepackage[LGRx,T1]{fontenc}``
%
% .. Attention:: The name of the font encoding defined by the option ``LGRx``
-% is **not** `LGRx` but `LGR`. Therefore, ``LGRx`` may not be the
+% is **not** `LGRx` but `LGR`. Therefore, ``LGRx`` must not be the
% last option (as fontenc uses the last option to select the default font
% encoding). To set `LGR` as as default font encoding specify both,
% `LGRx` and `LGR`, e.g.
@@ -150,14 +157,14 @@
% 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` package.
+% 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.
%
-% Using the names from ``puenc.def`` ensures that the `hyperref` package
+% Using the names from ``puenc.def`` ensures that the hyperref_ package
% will do the right conversion to a PDF-string
% (see `<greek-part-of-puenc.def>`_).
%
@@ -172,6 +179,12 @@
%
% Read this file only once
% ~~~~~~~~~~~~~~~~~~~~~~~~
+% .. note:: The use of ``\@ifundefined`` has the side-effect that the tested
+% macro becomes defined and set to ``\relax`` (polluting the namespace and
+% interfering with test via eTeX's ``\ifdefined``). However, in this case
+% no harm is done as the macro is defined by the identification_ below
+% anyway.
+%
% ::
\@ifundefined{ver@lgrxenc.def}
@@ -180,34 +193,49 @@
\expandafter\endinput % "return"
}
-% Announcement
-% ~~~~~~~~~~~~
-%
-% \ProvidesFile{lgrxenc.def}
-% [2010/06/08 v0.5.1 %
-% comprehensive LGR Greek Font Encoding definitions]
-%
-%
+% Identification
+% ~~~~~~~~~~~~~~
+% ::
+
+\ProvidesFile{lgrxenc.def}
+ [2012/07/03 v0.6 %
+ comprehensive LGR Greek Font Encoding definitions]
+
+
% Base setup
% ~~~~~~~~~~
%
-% The base setup is copied from the standard encoding file
-% ``lgrenc.def`` that comes with the Babel package::
+% Declare the font encoding and substitutions.
+% (from the file ``lgrenc.def`` that comes with the Babel package)::
\DeclareFontEncoding{LGR}{}{}
\DeclareFontSubstitution{LGR}{cmr}{m}{n}
\DeclareErrorFont{LGR}{cmr}{m}{n}{10}
+% The ``\TextGreek`` command can be used to ensure that its argument is set in
+% a font encoding with support for Greek. If the font encoding is already LGR,
+% kerning between adjacent command calls (e.g.
+% ``\TextGreek{A}\TextGreek{\Upsilon}``) is preserved. This allows wrapping of
+% compound Unicode character definitions. ::
+
+\DeclareTextCommand{\TextGreek}{LGR}[1]{#1}
+
+
% Text symbols
% ~~~~~~~~~~~~
%
% Greek Alphabet
% """"""""""""""
%
-% All letters are accessible by the Latin transcription. However, as
-% they are distinct text symbols, ``\text*`` macros are defined.
-% The `textalpha.sty` package makes these macros available in any font
-% encoding. ::
+% Greek letters are accessible by the Latin transcription, but the mapping is
+% specific to the LGR font encoding.
+%
+% The ``\text*`` macros provide a way to access the symbols in any font
+% encoding supporting Greek independent of the specific font encoding.
+% Alternative Greek font encodings are LGI (ibycus_) and PU (`PDF Unicode`
+% used by hyperref_ for PDF metadata). The `textalpha.sty` package makes these
+% macros available in any font encoding.
+% ::
\DeclareTextSymbol{\textAlpha}{LGR}{65}
\DeclareTextSymbol{\textBeta}{LGR}{66}
@@ -266,47 +294,66 @@
% """"""""""""""""""""""""
%
% Ancient Greek Numbers (Athenian Numerals)
-% named like in the athnum_ package::
+% '''''''''''''''''''''''''''''''''''''''''
+%
+% Names from the athnum_ package::
\DeclareTextSymbol{\PiDelta}{LGR}{2} % GREEK ACROPHONIC ATTIC FIFTY
\DeclareTextSymbol{\PiEta}{LGR}{3} % GREEK ACROPHONIC ATTIC FIVE HUNDRED
\DeclareTextSymbol{\PiChi}{LGR}{4} % GREEK ACROPHONIC ATTIC FIVE THOUSAND
\DeclareTextSymbol{\PiMu}{LGR}{5} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND
-% or using Greek numerals (as in ``xl-lgr.enc``)::
-
-%\DeclareTextSymbol{\pentedeka}{LGR}{2} % GREEK ACROPHONIC ATTIC FIFTY
-%\DeclareTextSymbol{\pentehekaton}{LGR}{3} % GREEK ACROPHONIC ATTIC FIVE HUNDRED
-%\DeclareTextSymbol{\penteqilioi}{LGR}{4} % GREEK ACROPHONIC ATTIC FIVE THOUSAND
-%\DeclareTextSymbol{\pentemurioi}{LGR}{5} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND
-
-
-% after babel's ``greek.ldf`` and teubner_::
-
-\DeclareTextSymbol{\stigma}{LGR}{6} % ϛ
-\DeclareTextSymbol{\varstigma}{LGR}{7} % stigma variant (CB.enc, teubner)
-% \DeclareTextSymbol{\vardigamma}{LGR}{7} % digamma variant (greek.ldf)
-\DeclareTextSymbol{\koppa}{LGR}{18} % ϟ (greek small letter koppa)
-\DeclareTextSymbol{\qoppa}{LGR}{19} % ϙ (archaic koppa)
-\DeclareTextSymbol{\Qoppa}{LGR}{21} % Ϙ (archaic Koppa)
-\DeclareTextSymbol{\Stigma}{LGR}{22} % ϹΤ ligature (teubner)
-% \DeclareTextSymbol{\Stigma}{LGR}{??} % Ϛ
-\DeclareTextSymbol{\Sampi}{LGR}{23} % Ϡ
-\DeclareTextSymbol{\sampi}{LGR}{27} % ϡ
-\DeclareTextSymbol{\anoteleia}{LGR}{38} % ·
-\DeclareTextSymbol{\erotimatiko}{LGR}{63} % ;
-\DeclareTextSymbol{\ddigamma}{LGR}{147} % ϝ (\digamma used by amsmath!)
-\DeclareTextSymbol{\Digamma}{LGR}{195} % Ϝ
-% numeral signs: http://en.wikipedia.org/wiki/Greek_numerals
+% Names from ``xl-lgr.enc`` (Greek numerals)::
+
+\DeclareTextSymbol{\pentedeka}{LGR}{2} % GREEK ACROPHONIC ATTIC FIFTY
+\DeclareTextSymbol{\pentehekaton}{LGR}{3} % GREEK ACROPHONIC ATTIC FIVE HUNDRED
+\DeclareTextSymbol{\penteqilioi}{LGR}{4} % GREEK ACROPHONIC ATTIC FIVE THOUSAND
+\DeclareTextSymbol{\pentemurioi}{LGR}{5} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND
+
+
+% Archaic letters
+% '''''''''''''''
+% Names after babel_'s ``greek.ldf``, teubner_ and hyperref_'s puenc.def::
+
+\DeclareTextSymbol{\stigma}{LGR}{6} % ϛ (greek.df, teubner)
+\DeclareTextSymbol{\textstigmagreek}{LGR}{6} % ϛ (puenc.def)
+\DeclareTextSymbol{\varstigma}{LGR}{7} % stigma variant (CB.enc, teubner)
+% \DeclareTextSymbol{\vardigamma}{LGR}{7} % digamma variant (greek.ldf)
+\DeclareTextSymbol{\koppa}{LGR}{18} % ϟ (greek small letter koppa)
+\DeclareTextSymbol{\textkoppagreek}{LGR}{18} % ϟ (puenc.def)
+\DeclareTextSymbol{\qoppa}{LGR}{19} % ϙ (archaic koppa)
+\DeclareTextSymbol{\Qoppa}{LGR}{21} % Ϙ (archaic Koppa)
+\DeclareTextSymbol{\Stigma}{LGR}{22} % ϹΤ ligature (teubner)
+\DeclareTextSymbol{\textStigmagreek}{LGR}{22} % ϹΤ ligature (puenc.def)
+% \DeclareTextSymbol{\Stigma}{LGR}{??} % Ϛ
+\DeclareTextSymbol{\Sampi}{LGR}{23} % Ϡ
+\DeclareTextSymbol{\textSampigreek}{LGR}{23} % Ϡ (puenc.def)
+\DeclareTextSymbol{\sampi}{LGR}{27} % ϡ
+\DeclareTextSymbol{\textsampigreek}{LGR}{27} % ϡ (puend.def)
+\DeclareTextSymbol{\anoteleia}{LGR}{38} % ·
+\DeclareTextSymbol{\erotimatiko}{LGR}{63} % ;
+% \digamma used by amsmath for math-macro:
+\DeclareTextSymbol{\ddigamma}{LGR}{147} % ϝ (greek.ldf)
+\DeclareTextSymbol{\Digamma}{LGR}{195} % Ϝ (greek.ldf)
+\DeclareTextSymbol{\textdigamma}{LGR}{147} % ϝ with "text" prefix
+\DeclareTextSymbol{\textDigamma}{LGR}{195} % Ϝ with "text" prefix
+\DeclareTextSymbol{\textdigammagreek}{LGR}{147} % ϝ (puenc.def)
+\DeclareTextSymbol{\textDigammagreek}{LGR}{195} % Ϝ (puenc.def)
+
+
+% numeral signs
+% '''''''''''''
+% See also http://en.wikipedia.org/wiki/Greek_numerals
+%
+% Names from babel_ and teubner_::
+
\DeclareTextSymbol{\anwtonos}{LGR}{254} % ʹ (Dexia keraia)
\DeclareTextSymbol{\katwtonos}{LGR}{255} % ͵ (Aristeri keraia)
-% As ``\digamma`` is a math macro (defined in amsmath), provide aliases
-% named as ``\text`` followed by the glyph name (as recommended in
-% ``fntguide.pdf``::
+% alias names for compatibility with hyperref's puenc.def::
-\DeclareTextSymbol{\textdigamma}{LGR}{147} % ϝ alias using "text" prefix
-\DeclareTextSymbol{\textDigamma}{LGR}{195} % Ϝ
+\DeclareTextSymbol{\textnumeralsigngreek}{LGR}{254}
+\DeclareTextSymbol{\textnumeralsignlowergreek}{LGR}{255}
% Other
@@ -691,7 +738,7 @@
% of an uppercase initial (written before rather than above the letter).
%
% The diaytika should also always be used in all-uppercase words (even
-% in cases where they are not needed when writing in lowercase
+% in cases where they are not needed when writing in lowercase)
%
% -- http://en.wikipedia.org/wiki/Capitalization
%
@@ -937,25 +984,35 @@
% Mark hiatus
% '''''''''''
%
-% Tonos and dasia mark a hiatus if placed on the first vowel of a
-% diphthong (ΑΙ, ΑΥ, ΕΙ). A dialytika must be placed on the second vowel
-% if they are dropped (άυλος → ΑΫΛΟΣ, μάινα → ΜΑΪΝΑ, κέικ → ΚΕΪΚ, ἀυπνία
-% → ΑΫΠΝΙΑ)::
+% Tonos and dasia mark a hiatus (break-up of a diphtong) if placed on the
+% first vowel of a diphthong (ΑΙ, ΑΥ, ΕΙ). A dialytika must be placed on the
+% second vowel if they are dropped (άυλος → ΑΫΛΟΣ, μάινα → ΜΑΪΝΑ, κέικ → ΚΕΪΚ,
+% ἀυπνία → ΑΫΠΝΙΑ)::
\DeclareTextCommand{\@hiatus}{LGR}[1]{#1}
\DeclareTextCompositeCommand{\@hiatus}{LGR}{A}{\A@hiatus}
+\DeclareTextCompositeCommand{\@hiatus}{LGR}{\textAlpha}{\A@hiatus}
\DeclareTextCompositeCommand{\@hiatus}{LGR}{E}{\E@hiatus}
+\DeclareTextCompositeCommand{\@hiatus}{LGR}{\textEpsilon}{\E@hiatus}
% Look ahead and place a diaeresis on Ι or Υ::
\DeclareTextCommand{\A@hiatus}{LGR}{%
\LGR@ifnextchar{I}{A\"}{%
- \LGR@ifnextchar{U}{A\"}{A}%
+ \LGR@ifnextchar{U}{A\"}{%
+ \LGR@ifnextchar{\textIota}{A\"}{%
+ \LGR@ifnextchar{\textUpsilon}{A\"}{A}%
+ }%
+ }%
}%
}
\DeclareTextCommand{\E@hiatus}{LGR}{%
\LGR@ifnextchar{I}{E\"}{%
- \LGR@ifnextchar{U}{E\"}{E}%
+ \LGR@ifnextchar{U}{E\"}{%
+ \LGR@ifnextchar{\textIota}{E\"}{%
+ \LGR@ifnextchar{\textUpsilon}{E\"}{E}%
+ }%
+ }%
}%
}
@@ -1005,12 +1062,18 @@
% .. References
% ----------
%
-% .. _Babel: http://www.ctan.org/pkg/babel
-% .. _fontenc: http://www.ctan.org/pkg/fontenc
+% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
+% .. _lgrx: http://mirror.ctan.org/help/Catalogue/entries/lgrx.html
+% .. _textalpha: textalpha.sty.html
+% .. _alphabeta: alphabeta.sty.html
+% .. _Babel: http://mirror.ctan.org/help/Catalogue/entries/babel.html
+% .. _ibycus: http://mirror.ctan.org/help/Catalogue/entries/ibycus-babel.html
+% .. _libertine: http://mirror.ctan.org/help/Catalogue/entries/libertine-legacy.html
+% .. _hyperref: http://mirror.ctan.org/help/Catalogue/entries/hyperref.html
+% .. _fontenc: http://mirror.ctan.org/help/Catalogue/entries/fontenc.html
% .. _Adobe Glyph List For New Fonts:
% http://www.adobe.com/devnet/opentype/archives/aglfn.txt
% .. _athnum: http://mirror.ctan.org/help/Catalogue/entries/athnum.html
-% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
% .. _fntguide: http://mirror.ctan.org/macros/latex/doc/fntguide.pdf
% .. _babel patch: http://www.eutypon.gr/eutypon/pdf/e2008-20/e20-a03.pdf
% .. _teubner: http://mirror.ctan.org/help/Catalogue/entries/teubner.html