From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- language/greek/greek-fontenc/README | 566 ++++++++ language/greek/greek-fontenc/README.html | 1134 +++++++++++++++ language/greek/greek-fontenc/alphabeta-doc.pdf | Bin 0 -> 431630 bytes language/greek/greek-fontenc/alphabeta-doc.tex | 461 ++++++ language/greek/greek-fontenc/alphabeta-euenc.def | 241 ++++ .../greek/greek-fontenc/alphabeta-euenc.def.html | 788 ++++++++++ language/greek/greek-fontenc/alphabeta-lgr.def | 188 +++ .../greek/greek-fontenc/alphabeta-lgr.def.html | 729 ++++++++++ language/greek/greek-fontenc/alphabeta.sty | 403 ++++++ language/greek/greek-fontenc/alphabeta.sty.html | 945 ++++++++++++ language/greek/greek-fontenc/diacritics.pdf | Bin 0 -> 307358 bytes language/greek/greek-fontenc/diacritics.tex | 176 +++ language/greek/greek-fontenc/greek-euenc-doc.pdf | Bin 0 -> 78434 bytes language/greek/greek-fontenc/greek-euenc-doc.tex | 852 +++++++++++ language/greek/greek-fontenc/greek-euenc.def | 881 ++++++++++++ language/greek/greek-fontenc/greek-euenc.def.html | 1454 +++++++++++++++++++ language/greek/greek-fontenc/greek-euenc.def.txt | 881 ++++++++++++ language/greek/greek-fontenc/greek-fontenc.def | 392 +++++ .../greek/greek-fontenc/greek-fontenc.def.html | 902 ++++++++++++ language/greek/greek-fontenc/greekhyperref.pdf | Bin 0 -> 220646 bytes language/greek/greek-fontenc/greekhyperref.tex | 127 ++ language/greek/greek-fontenc/lgr2licr.lua | 169 +++ language/greek/greek-fontenc/lgr2licr.lua.html | 693 +++++++++ language/greek/greek-fontenc/lgrenc-test.pdf | Bin 0 -> 307461 bytes language/greek/greek-fontenc/lgrenc-test.tex | 490 +++++++ language/greek/greek-fontenc/lgrenc.def | 925 ++++++++++++ language/greek/greek-fontenc/lgrenc.def.html | 1515 ++++++++++++++++++++ .../greek/greek-fontenc/test-active-semicolon.pdf | Bin 0 -> 61231 bytes language/greek/greek-fontenc/test-nameclashes.pdf | Bin 0 -> 130123 bytes language/greek/greek-fontenc/textalpha-doc.pdf | Bin 0 -> 470981 bytes language/greek/greek-fontenc/textalpha-doc.tex | 368 +++++ language/greek/greek-fontenc/textalpha.sty | 557 +++++++ language/greek/greek-fontenc/textalpha.sty.html | 1084 ++++++++++++++ 33 files changed, 16921 insertions(+) create mode 100644 language/greek/greek-fontenc/README create mode 100644 language/greek/greek-fontenc/README.html create mode 100644 language/greek/greek-fontenc/alphabeta-doc.pdf create mode 100644 language/greek/greek-fontenc/alphabeta-doc.tex create mode 100644 language/greek/greek-fontenc/alphabeta-euenc.def create mode 100644 language/greek/greek-fontenc/alphabeta-euenc.def.html create mode 100644 language/greek/greek-fontenc/alphabeta-lgr.def create mode 100644 language/greek/greek-fontenc/alphabeta-lgr.def.html create mode 100644 language/greek/greek-fontenc/alphabeta.sty create mode 100644 language/greek/greek-fontenc/alphabeta.sty.html create mode 100644 language/greek/greek-fontenc/diacritics.pdf create mode 100644 language/greek/greek-fontenc/diacritics.tex create mode 100644 language/greek/greek-fontenc/greek-euenc-doc.pdf create mode 100644 language/greek/greek-fontenc/greek-euenc-doc.tex create mode 100644 language/greek/greek-fontenc/greek-euenc.def create mode 100644 language/greek/greek-fontenc/greek-euenc.def.html create mode 100644 language/greek/greek-fontenc/greek-euenc.def.txt create mode 100644 language/greek/greek-fontenc/greek-fontenc.def create mode 100644 language/greek/greek-fontenc/greek-fontenc.def.html create mode 100644 language/greek/greek-fontenc/greekhyperref.pdf create mode 100644 language/greek/greek-fontenc/greekhyperref.tex create mode 100755 language/greek/greek-fontenc/lgr2licr.lua create mode 100644 language/greek/greek-fontenc/lgr2licr.lua.html create mode 100644 language/greek/greek-fontenc/lgrenc-test.pdf create mode 100644 language/greek/greek-fontenc/lgrenc-test.tex create mode 100644 language/greek/greek-fontenc/lgrenc.def create mode 100644 language/greek/greek-fontenc/lgrenc.def.html create mode 100644 language/greek/greek-fontenc/test-active-semicolon.pdf create mode 100644 language/greek/greek-fontenc/test-nameclashes.pdf create mode 100644 language/greek/greek-fontenc/textalpha-doc.pdf create mode 100644 language/greek/greek-fontenc/textalpha-doc.tex create mode 100644 language/greek/greek-fontenc/textalpha.sty create mode 100644 language/greek/greek-fontenc/textalpha.sty.html (limited to 'language/greek/greek-fontenc') diff --git a/language/greek/greek-fontenc/README b/language/greek/greek-fontenc/README new file mode 100644 index 0000000000..871860a2f5 --- /dev/null +++ b/language/greek/greek-fontenc/README @@ -0,0 +1,566 @@ +greek-fontenc +############# +Greek font encoding definition files +************************************ + +:Author: Günter Milde +:Date: 2019-07-10 +:Copyright: © 2013 Günter Milde +: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: `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 package provides `Greek LICR macros`_ 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_. + +.. 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. + +Changelog +========= + +.. class:: borderless + +====== =========== ========================================================== +0.9 2013-07-03 greek-fontenc.def_ "outsourced" from lgrxenc.def +.. experimental files xunicode-greek.sty and + greek-euenc.def_: 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 "input" path in xunicode-greek and greek-euenc.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.sty_ and alphabeta.sty_ moved here from lgrx and + updated to work with XeTeX/LuaTeX. +.. greek-fontenc.sty removed (obsoleted by textalpha.sty). +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. +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). + Documentation update. +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 Fix `rho with dasia bug`__ in lgrenc.def (Linus Romer). +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 Drop error font declaration (cf. `ltxbugs 4399`_). +0.13.4 2019-07-11 ``@uclclist`` entry for ``\prosgegrammeni``. +.. Documentation update. +====== =========== ========================================================== + +__ http://tex.stackexchange.com/questions/281631/greek-small-rho-with-dasia-and-also-psili-problem-with-accent-and-lgr-encodin +.. _ltxbugs 4399: + https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex%2F4399&search= + + +TeX files +========= + +``_ + `Common Greek font encoding definitions `_. + +.. _LGR font encoding definition file: + +``_ + `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 of ``lgrxenc.def`` from the now + obsolete lgrx_ bundle. + + .. _textalpha: + +``_ + `Greek symbols in text `_ + independent of font encoding and TeX engine. + + .. _alphabeta: + +``_ + Generic macros for `Greek symbols in text and math `_. + +``_ + `Composite definitions with XeTeX/LuaTeX. `_. + + .. _greek-euenc: + +``_ + `Font setup for Greek with XeTeX/LuaTeX `_. + Requires euenc_. + +Literate source files were converted with PyLit_ to reStructuredText_ and +with Docutils_ to the HTML documentation. + + +Documentation and test documents +================================ + +``__, ``_ + `The textalpha package`. + +``__ ``_ + `The alphabeta package`. + +``_, ``_ + Test and usage example. + +``_, ``_ + Example for use of the Greek LICR definitions with XeTeX or + LuaTeX. + +``_, ``_ + `Greek script in PDF metadata`. + + The package hyperref_ defines the PU font encoding which also supports + (monotonic) Greek. + +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 `_ + + + +Installation +============ + +If possible, get this package from your distribution using its installation +manager. + +Otherwise, make sure LaTeX can find the package and definition files: + +* Download and unpack greek-fontenc.zip_. + +* Copy/Move/Link files ending in ``.def`` or ``.sty`` to a suitable place in + the “TeX Directory Structure” (TDS_) and run ``texhash``, or place them in + the current working directory (e.g. for testing). + +Conflicts +========= + +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. + +.. _bug 858987: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858987 + +Usage +===== + +There are many alternatives to set up the support for a Greek font encoding +provided by this package, e.g.: + +textalpha_: + Ensure support for Greek characters in text mode:: + + \usepackage{textalpha} + + eventually with the normalize-symbols_ option to handle `symbol + variants`_ :: + + \usepackage[normalize-symbols]{textalpha} + + and/or the keep-semicolon_ option to use the `semicolon as erotimatiko`_ + also in LGR :: + + \usepackage[normalize-symbols,keep-semicolon]{textalpha} + + This sets up LICR macros for Greek text charactes under both, 8-bit TeX + and Xe-/LuaTeX. + For details see ``_ and ``_ (8-bit + TeX) as well as ``_ and ``_ + (XeTeX/LuaTeX). + + .. _normalize-symbols: textalpha.sty.html#normalize-symbols + .. _keep-semicolon: textalpha.sty.html#keep-semicolon + .. _semicolon as erotimatiko: textalpha.sty.html#semicolon-as-erotimatiko + +alphabeta_: + To use the short macro names (``\alpha`` ... ``\Omega``) known from math + mode in both, text and math mode, write :: + + \usepackage{alphabeta} + + For details see ``_ and ``_. + +Babel: + Use the ``greek`` option with Babel_:: + + \usepackage[greek]{babel} + + This automatically loads ``lgrenc.def`` with 8-bit TeX and + ``greek-euenc.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_. + +fontenc: + Declare LGR via fontenc_. For example, specify T1 (8-bit + Latin) as default font encoding and LGR for Greek with :: + + \usepackage[LGR,T1]{fontenc} + + Note that without textalpha_ or alphabeta_, Greek text macros work + only if the current font encoding supports Greek. See [fntguide]_ for + details and ``_ 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 + fontspec_ and textalpha_ or alphabeta_, e.g. :: + + \usepackage[LGR]{fontenc} + \usepackage{fontspec} + \setmainfont{Linux Libertine O} % Latin Modern does not support Greek + \setsansfont{Linux Biolinum O} + \usepackage{textalpha} + + See ``_, ``_ and + ``_, ``_. + +.. _arabi workaround: + +To work around the conflict with arabi_, it may suffice to ensure ``greek`` +is loaded after ``arabic``:: + + \usepackage[arabic,greek,english]{babel} + +More secure is an explicit reverse-definition, e.g. :: + + % save original \omega + \let\mathomega\omega + + \usepackage[utf8]{inputenc} + \usepackage[LAE,LGR,T1]{fontenc} + \usepackage[arabic,greek,english]{babel} + + % fix arabtex: + \DeclareTextSymbol{\textomega}{LGR}{119} + \renewcommand{\omega}{\mathomega} + + +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_, `EU1, EU2`_, 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. `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). + +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 any LICR macros or composite definitions). + +TU +-- + +Standard Unicode font encoding for XeTeX and LuaTeX loaded by fontspec_ +(since v2.5a). `greek-fontenc` adds support for the Greek script (see +greek-euenc_). + +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. + +EU1, EU2 +-------- + +Legacy Unicode font encodings for XeTeX and LuaTeX respectively. + + +Greek LICR macros +================= + +This package 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``. + + Problem: + 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``. + + Example: + 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``. + + Problem: + 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 + + i. used as inspiration for new LICR macro names or + ii. converted to LICR macro names via a defined set of transformation rules. + + Example: + ``\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? + + Pro: + + 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_. + + Contra: + - 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 http://en.wikipedia.org/wiki/Greek_alphabet#Glyph_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. + +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`` 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 ``\textsymbol`` LICR macros for these +characters: + +* With Unicode fonts, the macros select the GREEK + 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). + + +References +---------- + +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. + +Aliases from ``puenc.def`` ensure that the hyperref_ package can convert +Greek text in "LICR encoding" to a PDF-string (utf-8 encoded input is used +as-is). + + +.. [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://mirrors.ctan.org/language/babel/contrib/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://pypi.python.org/pypi/pylit +.. _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 + +.. _Adobe Glyph List For New Fonts: + http://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/aglfn.txt +.. _Adobe Glyph List: + http://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/glyphlist.txt +.. _Unicode names list: http://www.unicode.org/Public/UNIDATA/NamesList.txt +.. _XML Entity Definitions for Characters: + http://www.w3.org/TR/xml-entity-names/ +.. _CB fonts: http://www.ctan.org/pkg/cbgreek-complete +.. _CM Unicode: https://www.ctan.org/pkg/cm-unicode +.. _Deja Vu: http://dejavu-fonts.org +.. _EB Garamond: https://ctan.org/pkg/ebgaramond +.. _GFS fonts: http://www.ctan.org/pkg/gfs +.. _Kerkis: http://www.ctan.org/pkg/kerkis +.. _Latin Modern: http://www.gust.org.pl/projects/e-foundry/latin-modern +.. _Libertine OTF: http://www.ctan.org/pkg/libertineotf +.. _Libertine GC: https://www.ctan.org/pkg/libertinegc +.. _Libertinus: https://ctan.org/pkg/libertinus +.. _Old Standard: https://ctan.org/pkg/oldstandard +.. _OpenType Font: https://ctan.org/topic/font-otf +.. _UM Typewriter: https://www.ctan.org/pkg/umtypewriter +.. _amssymb: http://www.ctan.org/pkg/amsfonts +.. _arabi: https://www.ctan.org/pkg/arabi +.. _babel-greek: http://www.ctan.org/pkg/babel-greek +.. _babel: http://www.ctan.org/pkg/babel +.. _dejavu: https://www.ctan.org/pkg/dejavu +.. _euenc: http://www.ctan.org/pkg/euenc +.. _fontenc: http://www.ctan.org/pkg/fontenc +.. _fontspec: http://www.ctan.org/pkg/fontspec +.. _greek-fontenc.zip: http://mirrors.ctan.org/language/greek/greek-fontenc.zip +.. _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 +.. _libertine: http://www.ctan.org/pkg/libertine-legacy +.. _substitutefont: http://www.ctan.org/pkg/substitutefont +.. _tempora: https://www.ctan.org/pkg/tempora +.. _teubner: http://www.ctan.org/pkg/teubner +.. _ucs: http://www.ctan.org/pkg/unicode +.. _unicode-math: http://www.ctan.org/pkg/unicode-math +.. _xgreek: http://www.ctan.org/pkg/xgreek +.. _xunicode: http://www.ctan.org/pkg/xunicode diff --git a/language/greek/greek-fontenc/README.html b/language/greek/greek-fontenc/README.html new file mode 100644 index 0000000000..6f16d43aa6 --- /dev/null +++ b/language/greek/greek-fontenc/README.html @@ -0,0 +1,1134 @@ + + + + + +greek-fontenc + + + + + + + + +
+

greek-fontenc

+

Greek font encoding definition files

+
+
Author
+

Günter Milde

+
Date
+
2019-07-10
+ + +
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

+

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 package provides Greek LICR macros 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.

+
+
+

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.

+
+
+

Changelog

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

0.9

2013-07-03

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

+

experimental files xunicode-greek.sty and +greek-euenc.def: 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 “input” path in xunicode-greek and greek-euenc.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.sty and alphabeta.sty moved here from lgrx and +updated to work with XeTeX/LuaTeX.

+

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

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.

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). +Documentation update.

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

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

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

Drop error font declaration (cf. ltxbugs 4399).

0.13.4

2019-07-11

@uclclist entry for \prosgegrammeni.

+

Documentation update.

+
+
+

TeX files

+
+
greek-fontenc.def
+

Common Greek font encoding definitions.

+
+
+
+
lgrenc.def
+

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 of lgrxenc.def from the now +obsolete lgrx bundle.

+
+
textalpha.sty
+

Greek symbols in text +independent of font encoding and TeX engine.

+
+
alphabeta.sty
+

Generic macros for Greek symbols in text and math.

+
+
alphabeta-euenc.def
+

Composite definitions with XeTeX/LuaTeX..

+
+
greek-euenc.def
+

Font setup for Greek with XeTeX/LuaTeX. +Requires euenc.

+
+
+

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

+
+
+

Documentation and test documents

+
+
textalpha-doc.tex, textalpha-doc.pdf
+

The textalpha package.

+
+
alphabeta-doc.tex alphabeta-doc.pdf
+

The alphabeta package.

+
+
lgrenc-test.tex, lgrenc-test.pdf
+

Test and usage example.

+
+
greek-euenc-doc.tex, greek-euenc-doc.pdf
+

Example for use of the Greek LICR definitions with XeTeX or +LuaTeX.

+
+
greekhyperref.tex, greekhyperref.pdf
+

Greek script in PDF metadata.

+

The package hyperref defines the PU font encoding which also supports +(monotonic) Greek.

+
+
+
+
+

Experimental files

+

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

+
+
lgr2licr.lua
+

LGR Transcription to Greek LICR transformation

+
+
+
+
+

Installation

+

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

+

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

+
    +
  • Download and unpack greek-fontenc.zip.

  • +
  • Copy/Move/Link files ending in .def or .sty to a suitable place in +the “TeX Directory Structure” (TDS) and run texhash, or place them in +the current working directory (e.g. for testing).

  • +
+
+
+

Conflicts

+

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.

+
+
+

Usage

+

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

+
+
textalpha:
+

Ensure support for Greek characters in text mode:

+
\usepackage{textalpha}
+

eventually with the normalize-symbols option to handle symbol +variants

+
\usepackage[normalize-symbols]{textalpha}
+

and/or the keep-semicolon option to use the semicolon as erotimatiko +also in LGR

+
\usepackage[normalize-symbols,keep-semicolon]{textalpha}
+

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 greek-euenc-doc.tex and greek-euenc-doc.pdf +(XeTeX/LuaTeX).

+
+
alphabeta:
+

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

+
\usepackage{alphabeta}
+

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

+
+
Babel:
+

Use the greek option with Babel:

+
\usepackage[greek]{babel}
+

This automatically loads lgrenc.def with 8-bit TeX and +greek-euenc.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.

+
+
fontenc:
+

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

+
\usepackage[LGR,T1]{fontenc}
+

Note that without textalpha or alphabeta, Greek text macros work +only if the current font encoding supports Greek. See [fntguide] for +details and lgrenc-test.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 +fontspec and textalpha or alphabeta, e.g.

+
\usepackage[LGR]{fontenc}
+\usepackage{fontspec}
+\setmainfont{Linux Libertine O} % Latin Modern does not support Greek
+\setsansfont{Linux Biolinum O}
+\usepackage{textalpha}
+

See greek-euenc-doc.tex, greek-euenc-doc.pdf and +lgrenc-test.tex, lgrenc-test.pdf.

+
+
+

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

+
\usepackage[arabic,greek,english]{babel}
+

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

+
% save original \omega
+\let\mathomega\omega
+
+\usepackage[utf8]{inputenc}
+\usepackage[LAE,LGR,T1]{fontenc}
+\usepackage[arabic,greek,english]{babel}
+
+% fix arabtex:
+\DeclareTextSymbol{\textomega}{LGR}{119}
+\renewcommand{\omega}{\mathomega}
+
+
+

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, EU1, EU2, 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. 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).

+
+
+

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

+
+
+

TU

+

Standard Unicode font encoding for XeTeX and LuaTeX loaded by fontspec +(since v2.5a). greek-fontenc adds support for the Greek script (see +greek-euenc).

+

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.

+
+
+

EU1, EU2

+

Legacy Unicode font encodings for XeTeX and LuaTeX respectively.

+
+
+
+

Greek LICR macros

+

This package 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.

    +
    +
    +
    Problem:
    +

    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.

    +
    +
    Example:
    +

    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.

    +
    +
    Problem:
    +

    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. +
    3. converted to LICR macro names via a defined set of transformation rules.

    4. +
    +
    +
    Example:
    +

    \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?

    +
    +
    Pro:
    +
      +
    • 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.

    • +
    +
    +
    Contra:
    +
      +
    • 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 http://en.wikipedia.org/wiki/Greek_alphabet#Glyph_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.

+

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

  • +
+
+
+

References

+

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.

+

Aliases from puenc.def ensure that the hyperref package can convert +Greek text in “LICR encoding” to a PDF-string (utf-8 encoded input is used +as-is).

+
+
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://mirrors.ctan.org/language/babel/contrib/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

+
+
+
+
+
+ + diff --git a/language/greek/greek-fontenc/alphabeta-doc.pdf b/language/greek/greek-fontenc/alphabeta-doc.pdf new file mode 100644 index 0000000000..18c962f96f Binary files /dev/null and b/language/greek/greek-fontenc/alphabeta-doc.pdf differ diff --git a/language/greek/greek-fontenc/alphabeta-doc.tex b/language/greek/greek-fontenc/alphabeta-doc.tex new file mode 100644 index 0000000000..e9daa7c5f1 --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta-doc.tex @@ -0,0 +1,461 @@ +% alphabeta-doc: Documentation and tests for alphabeta.sty +% ******************************************************** +% +% :Copyright: © 2010, 2015 Günter Milde +% :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. +% +% This LaTeX document can be compiled with 8-bit TeX (latex or pdflatex), +% XeTeX (xelatex), or LuaTeX (lualatex). +% As it contains tests for the different limitations, there will be warnings +% in the log, which can be safely ignored. + +\documentclass{article} + +\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref} +\usepackage{bookmark} +\hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue,pdfencoding=auto} +% \usepackage{parskip} +\usepackage{amsmath} +\frenchspacing + +\newcommand{\setupUnicodeFonts}{ + \usepackage[no-math,tuenc]{fontspec} + \setmainfont{Linux Libertine O} + \setsansfont{Linux Biolinum O} + \setmonofont{Liberation Mono}[Scale=MatchLowercase] + \usepackage[libertine,slantedGreek]{newtxmath} + % \usepackage{unicode-math} % package conflict +} +\newcommand{\setupTeXFonts}{ + \usepackage[LGR,T1]{fontenc} + \usepackage{textcomp} + \usepackage{lmodern} + % \usepackage{libertine} + % \usepackage{gfsdidot} + % \usepackage{kerkis} + % \usepackage{newtxtext,newtxmath} + % \usepackage{substitutefont} + % \substitutefont{LGR}{\rmdefault}{artemisia} + \usepackage{isomath} +} +\ifdefined\XeTeXrevision + \newcommand{\engine}{XeTeX} + \setupUnicodeFonts +\else\ifdefined\luatexversion + \newcommand{\engine}{LuaTeX} + \setupUnicodeFonts +\else + \newcommand{\engine}{8-bit TeX} + \usepackage[utf8]{inputenc} + \setupTeXFonts +\fi\fi + +% load alphabeta after math setup and encoding setup! +% \usepackage{alphabeta}[2015/08/08] +\usepackage[normalize-symbols]{alphabeta}[2015/08/08] + +% Fallback macros: + +% Avoid warnigns with PDF string generation for "alphabeta" commands: +% let \TextOrMath (from fixltx2e) return the "text" argument: +\pdfstringdefDisableCommands{\let\TextOrMath\@firstoftwo} + +% varstigma only defined with 8-bit LGR fonts +\providecommand*{\varstigma}{$\oslash$} +% varkappa, only defined with newtxmath, other var... only with unicode-math +\providecommand*{\varkappa}{\oslash} +\providecommand*{\varbeta}{\oslash} +\providecommand*{\varTheta}{\oslash} + +% print current font encoding: +\makeatletter +\newcommand{\currentEncoding}{\f@encoding} +\makeatother + +\begin{document} + +\title{The \emph{alphabeta} package} +\author{Günter Milde} +\maketitle + +\begin{abstract}\noindent +The \emph{alphabeta} package makes the standard macros for Greek letters in +mathematical mode also available in text mode. This way, you can input Greek +letters ``by name'' everywhere in the document. The mode determines whether +the characters are taken from the text or math font. + +With 8-bit TeX and +\emph{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}}, +literal Unicode charactes can also be used in mathematical mode. +\end{abstract} + +% \tableofcontents + +\section{Requirements} + +The \emph{alphabeta} package depends on +\emph{\href{textalpha-doc.pdf}{textalpha}} (both are part of +\emph{\href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc}}). +It can be used under 8-bit TeX as well as XeTeX/LuaTeX (this document is +typeset with \engine). Depending on the converter and fonts, different +\hyperref[sec:limitations]{limitations} apply. + +The package conflicts with +\href{http://www.ctan.org/pkg/unicode-math}{\emph{unicode-math}}. + +It also fails, if the \texttt{utf8x} input encoding is selected (interface +to the \href{http://www.ctan.org/pkg/ucs}{\emph{ucs}} package using a +non-compatible definition of \verb+\DeclareUnicodeCharacter+). + +\section{Usage} + +Load this package in the preamble of your document (after font and math +setup) with +\begin{verbatim} + \usepackage{alphabeta} +\end{verbatim} +% +Now you can write a single Greek symbol (like \Psi{} or \mu{}) or +a \lambda\omicron\gamma\omicron\varsigma{} in non-Greek text as well as +ISO-conforming formulas with upright symbols for constants +like $A = \text{\pi} r^2$ (instead of $A = \pi r^2$).% +\footnote{The + \href{http://mirrors.ctan.org/macros/latex/contrib/isomath/isomath.html}% + {\emph{isomath} documentation} describes more alternatives for upright + Greek symbols in math mode.} + +Just like Latin letters, the Greek counterparts are by default italic in +math mode% +\footnote{Capital Greek letters are upright in TeX unless a package selects +the ``ISO'' math-style. See the +\href{http://mirrors.ctan.org/macros/latex/contrib/isomath/isomath.html}% +{\emph{isomath} documentation} for a detailled discussion of math-styles.} +and upright in text: + +\begin{quote} + Text: L \Gamma{} l \gamma, + mathematics: $ L \ \Gamma \ l \ \gamma $ +\end{quote} +% +See the source of this document \url{alphabeta-doc.tex} for a setup and +usage example. + + +\subsection{options} + +Package options are passed to the \href{alphabeta-doc.pdf}{\emph{alphabeta}} +package. Example call with options: + +\begin{verbatim} + \usepackage[normalize-symbols,keep-semicolon]{alphabeta} +\end{verbatim} + +\texttt{normalize-symbols} merges ``letters'' and ``symbol`` variants of +some Greek letters to the ``letter'' character: +\footnote{The normalize-symbols option was added in version 0.13 (2015-08-03). + Unicode input of the symbol variants requires at least version~1.6 + (2015-08-05) of + \emph{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}}.} +Without this option, the symbol variant characters cannot be used in text, +because they are not supported by 8-bit Greek fonts (LGR encoding). +The \texttt{normalize-symbols} option is ignored, if you compile the +document with XeTeX or LuaTeX using Unicode fonts. +\textbf{Attention}: Be careful in cases where the distinction between the +symbol variants may be important (e.g. in a mathematical or scientific +context). Use XeTeX/LuaTeX with Unicode fonts or the respective characters +in mathematical mode (e.g. $\pi$ vs. $\varpi$). + +The option \texttt{keep-semicolon} prevents conversion of the semicolon to +an \emph{ano teleia} (see \emph{\href{textalpha-doc.pdf}{textalpha-doc}}). + +\subsection{symbol variants} + +Mathematical notation uses variant shapes of some Greek letters as +additional symbols. The variations have no syntactic meaning in Greek text +and text fonts may use the variant shapes in place of the “regular” ones as +a stylistic choice. + +Unicode defines separate code points for the symbol variants. TeX supports +some of the variant shape symbols in mathematical mode, but its concept of +“standard” vs. “variant” symbols differs from the distinction between +“GREEK LETTER ...” vs. “GREEK ... SYMBOL” in the Unicode standard. +See \href{greek-euenc-doc.pdf}{greek-euenc-doc}. + +The \emph{alphabeta} package defines generic macros for these variants that +are short forms of the set defined in \texttt{greek-euenc.def}: +\begin{quote} + \verb|\| selects the Unicode GREEK LETTER ... variant, + + \verb|\symbol| selects the Unicode + GREEK ... SYMBOL variant, + + \verb|\var| selects the variant + shape according to TeX' mathematical mode +\end{quote} +See Table \ref{tab:symbol-variant-macros} for the full list. + +\section{Limitations \label{sec:limitations}} + +With 8-bit TeX, the limitations described in the +\href{textalpha-doc.pdf}{textalpha documentation} apply. See also the tests +in section \hyperref[sec:8-bit-limitations]{8 bit limitations}. + +With XeTeX/LuaTeX and Unicode fonts, literal Unicode characters cannot be +used in formulas (the log file reports missing characters) +This is a generic TeX limitation which \emph{alphabeta} overcomes if used +under 8-bit TeX. Under XeTeX/LuaTeX it may be lifted using the +\href{http://www.ctan.org/pkg/unicode-math}{\emph{unicode-math}} +package, but unfortunately, \emph{alphabeta} conflicts +with \emph{unicode-math}. + + +\section{Tests and examples} + +\subsection{Greek alphabet} + +Greek letters via generic ``name'' macros without language/font-encoding +switch: + +\begin{quote} + \Alpha{} \Beta{} \Gamma{} \Delta{} \Epsilon{} \Zeta{} \Eta{} \Theta{} + \Iota{} \Kappa{} \Lambda{} \Mu{} \Nu{} \Xi{} \Omicron{} \Pi{} \Rho{} + \Sigma{} \Tau{} \Upsilon{} \Phi{} \Chi{} \Psi{} \Omega{} + \\ + \alpha{} \beta{} \gamma{} \delta{} \epsilon{} \zeta{} \eta{} \theta{} + \iota{} \kappa{} \lambda{} \mu{} \nu{} \xi{} \omicron{} \pi{} \rho{} + \sigma{} \varsigma{} \tau{} \upsilon{} \phi{} \chi{} \psi{} \omega{} + \\ + \digamma{} \Digamma{} \stigma{} \varstigma{}% + \footnote{There is no separate Unicode code point for a stigma variant + symbol, \texttt{\textbackslash varstigma} is not defined with + Xe/LuaTeX and similar to \texttt{\textbackslash stigma} in some fonts.} + \koppa{} \qoppa{} \Qoppa{} + \Stigma{} \Sampi{} \sampi{} +\end{quote} + +Greek letters via Unicode input without language/font-encoding switch: + +\begin{quote} + Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω\\ + α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω\\ + ϝ Ϝ ϛ ϟ ϙ Ϙ Ϛ Ϡ ϡ +\end{quote} + +\subsection{Diacritics} + +Accent macros are set up for use with the generic macros by definition of +``TextComposite'' commands. + +Diacritics (except the dialytika) should placed +before capital letters and dropped with MakeUppercase: + +\begin{quote} +\ensuregreek{ +\<{\alpha} \>{\epsilon} \"'{\iota} \>`{\eta} +\'<{\omicron} \~<{\upsilon} \~>{\omega} +\\ +\<{\Alpha} \>{\Epsilon} \'{\Iota} \>`{\Eta} +\'<{\Omicron} \~<{\Upsilon} \~>{\Omega} +\\ +\MakeUppercase{% + \<{\alpha} \>{\epsilon} \"'{\iota} \>`\eta{} + \'<{\omicron} \~<{\upsilon} \~>{\omega} +}} +\end{quote} + + +\subsection{normalize-symbols} + +The \texttt{normalize-symbols} option merges ``letters'' and ``symbol`` +variants of some Greek letters to the ``letter'' character. It is ignored, +if the document uses Unicode fonts and is compiled with XeTeX or LuaTeX. +(This document is compiled using \engine.) +\begin{quote} + This quote uses both variants for beta (β|ϐ), theta (θ|ϑ), phi (φ|ϕ), pi + (π|ϖ), kappa (κ|ϰ), rho (ρ|ϱ), Theta (Θ|ϴ), and epsilon (ε|ϵ) in the LaTeX + source.% +\end{quote} + + +\subsection{\ensuregreek{% + Ἑλληνικά (\<\Epsilon\lambda\lambda\eta\nu\iota\kappa\'\alpha{})} + in PDF strings} + +With the alphabeta package, you get Greek letters in both, the document body +and PDF metadata generated by hyperref if the input uses Unicode literals or +macros. Wrapping in \verb+\ensuregreek+ ensures the right placement of the +accents and breathings (before, not above capital letters). With LICR input +(accent macros + symbol macros), non-standard diacritics are missing in the +PDF data, as hyperref's PU encoding currently does not support polytonic +Greek. (Here, the dasia is dropped at the start of the word in parentheses in +the PDF toc. The warning ``\texttt{Glyph not defined in PU encoding, +removing `\textbackslash<' on input line 145.}'' is written to the log.) + +Warnings like +\begin{verbatim} + Token not allowed in a PDF string (Unicode): + removing `\textbackslash TextOrMath ' on input line 145. +\end{verbatim} +can be ignored or avoided with the preamble code: + +\begin{verbatim} + \pdfstringdefDisableCommands{\let\TextOrMath\@firstoftwo} +\end{verbatim} + + +\subsection{Greek in math $\Gamma = \sin\alpha / \cos{\beta}$} + +In the main document, Greek in math mode should work as usual: + +\[\Gamma = \frac{\sin\alpha}{\cos{\beta}}. +\] + +Greek letters and symbols in math input as macro (there are no math macros +for Greek letters wich exist with similar shape in the Latin alphabet): +\begin{align*} + & + % \Alpha{} \Beta{} + \Gamma{} \Delta{} + % \Epsilon{} \Zeta{} \Eta{} + \Theta{} + % \Iota{} \Kappa{} + \Lambda{} + % \Mu{} \Nu{} + \Xi{} + % \Omicron{} + \Pi{} + % \Rho{} + \Sigma{} + % \Tau{} + \Upsilon{} \Phi{} + % \Chi{} + \Psi{} \Omega{} +\\& + \alpha{} \beta{} \gamma{} \delta{} \epsilon{} \zeta{} \eta{} \theta{} + \iota{} \kappa{} \lambda{} \mu{} \nu{} \xi{} + % \omicron{} + \pi{} \rho{} + \sigma{} \varsigma{} \tau{} \upsilon{} \phi{} \chi{} \psi{} \omega{} +\\& + \vartheta \varphi \varpi \digamma{} \varrho \varepsilon +\end{align*} + +PDF strings do not know math mode. The content of a formula or equation is +evaluated in text mode with non-valid commands discarded (and warnings +written to the log). This works resonably well for simple formulas (but not, +e.g., for super-/subscripts). With the \emph{alphabeta} package, it works +also for Greek letters. + +\subsection{Greek Unicode characters in math (only under 8-bit TeX)} + +With the \texttt{utf8} option of \emph{inputenc} and +\href{http://www.ctan.org/pkg/greek-inputenc}{\emph{greek-inputenc}}, +literal Greek Unicode characters are supported also in +mathematical mode: +\[ + Γ = \frac{\sin α}{\cos β}. +\] +Greek letters and symbols in math input as Unicode literals: +\begin{align*} + \ifdefined\DeclareUnicodeCharacter + & Γ ΔΘΛΞΠΣΥ ΦΨ Ω \\ + & αβγδεζηθικλμνξπρσςτυφχψω \\ + & ϑϕϖϝϱϵ + \else + \text{This does not work with XeTeX/LuaTeX (unless in 8-bit emulation + mode).} + \fi +\end{align*} +The ``normal'' vs. ``variant'' shape of phi and epsilon is inverted when using +traditional makros or Unicode letter vs. symbol characters respectively. +This is to keep backwards compatibility of the math macros as well +as consistent input-output mapping for Unicode in text and math. +It corresponds to the behaviour of +\href{http://www.ctan.org/pkg/unicode-math}{\emph{unicode-math}} +with the default option \texttt{vargreek-shape=TeX}. + +\subsection{8-bit limitations \label{sec:8-bit-limitations}} + +These limitations are lifted, if the document is compiled with XeTeX/LuaTeX. + +\begin{itemize} + +\item Composition of diacritics (like \verb+\>\'+) fails: + \<{\alpha} \>{\epsilon} \"'{\iota} \>`\eta{} + \'<{\omicron} \~<{\upsilon} \~>{\omega} + + Simple diacritics and long names (like \verb+\accdasiaoxia+) work in + any font encoding, however they do not select precomposed characters + (the difference becomes obvious if you drag-and-drop text from the PDF + version of this document): + % + \ensuregreek{\<'\alpha{} \accdasia\acctonos\alpha{} \accdasiaoxia\alpha{} + (\currentEncoding)} vs. \accdasiaoxia\alpha{} (\currentEncoding) + +\item MakeUppercase fails with composite diacritics in other font encodings. + % \MakeUppercase{% + % \<\alpha{} \>\epsilon{} \'\iota{} \`\eta{} \~\upsilon{} + % } + +\item There is no kerning between Greek letters, if the font encoding does not + support Greek: compare \ensuregreek{\Alpha\Upsilon\Alpha + (\currentEncoding)} to \Alpha\Upsilon\Alpha{} (\currentEncoding). Because + of this (and for proper hyphenation), use of the Babel package and + correct language setting is recommended for Greek quotes. + +\end{itemize} + +The \verb+\ensuregreek+ macro ensures that the argument is typeset with a +font encoding supporting Greek. This keeps kerning (if the kerning pair is +inside the argument, \ensuregreek{\Alpha\"\Upsilon\Alpha}), and allows +combining of accent macros where pre-composed characters are selected +(\ensuregreek{\<'\alpha}). + +\begin{table}[bp] + \centering + \begin{tabular}{lcc} + \hline + macro & text & math \\ + \hline + \verb$\pi$ & \pi & $\pi$ \\ + \verb$\varpi$ & \varpi & $\varpi$ \\ + \verb$\pisymbol$ & \pisymbol & $\pisymbol$ \\ + \hline + \verb$\rho$ & \rho & $\rho$ \\ + \verb$\varrho$ & \varrho & $\varrho$ \\ + \verb$\rhosymbol$ & \rhosymbol & $\rhosymbol$ \\ + \hline + \verb$\theta$ & \theta & $\theta$ \\ + \verb$\vartheta$ & \vartheta & $\vartheta$ \\ + \verb$\thetasymbol$ & \thetasymbol & $\thetasymbol$ \\ + \hline + \verb$\epsilon$ & \epsilon & $\epsilon$ \\ + \verb$\varepsilon$ & \varepsilon & $\varepsilon$ \\ + \verb$\epsilonsymbol$ & \epsilonsymbol & $\epsilonsymbol$ \\ + \hline + \verb$\phi$ & \phi & $\phi$ \\ + \verb$\varphi$ & \varphi & $\varphi$ \\ + \verb$\phisymbol$ & \phisymbol & $\phisymbol$ \\ + \hline + \verb$\beta$ & \beta & $\beta$ \\ + \verb$\varbeta$ & \varbeta & $\varbeta$ \\ + \verb$\betasymbol$ & \betasymbol & $\betasymbol$ \\ + \hline + \verb$\kappa$ & \kappa & $\kappa$ \\ + \verb$\varkappa$ & \varkappa & $\varkappa$ \\ + \verb$\kappasymbol$ & \kappasymbol & $\kappasymbol$\\ + \hline + \verb$\Theta$ & \Theta & $\Theta$ \\ + \verb$\varTheta$ & & $\varTheta$ \\ + \verb$\Thetasymbol$ & \Thetasymbol & \\ + \hline + \end{tabular} + \caption{Macros for Greek symbol variants ($\oslash$ = symbol missing). + With 8-bit TeX and the \texttt{normalize-symbols} option, the output for + both variants in text mode is the same (8-bit Greek text fonts contain + only one symbol variant). \label{tab:symbol-variant-macros}} +\end{table} + +\end{document} diff --git a/language/greek/greek-fontenc/alphabeta-euenc.def b/language/greek/greek-fontenc/alphabeta-euenc.def new file mode 100644 index 0000000000..8b465eebe8 --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta-euenc.def @@ -0,0 +1,241 @@ +% alphabeta-euenc.def +% =================== +% Composite definitions for XeTeX and LuaTeX +% ****************************************** +% +% :Copyright: © 2013 Günter Milde +% :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: +% :: + +\ProvidesFile{alphabeta-euenc} +[2014/09/04 0.11.2 Composite definitions for XeTeX and LuaTeX] + +% Composite definitions for ``alphabeta.sty`` with XeTeX and LuaTeX. +% +% Changelog: +% .. class:: borderless +% +% ========== ====== ======================================================== +% 2013-09-12 0.1 initial version +% 2013-10-01 0.1.1 remove clashing defs for legacy characters with oxia. +% 2014-09-04 0.11.2 documentation update +% ========== ====== ======================================================== +% +% The alphabeta_ package re-defines the math macros for Greek letters to work +% in both, text and math mode, so that Greek letters can be specified with +% the established command names in text, too. +% +% The NFSS TextComposite mechanism looks for the next token without expanding +% it. In order to let compositions like ``\>"\alpha`` work as expected we +% define TextComposites with the `letter name commands`. +% +% This file expands the font encoding definitions in greek-euenc.def_ with +% composite commands for use with Unicode fonts. It is sourced by alphabeta_ +% under XeTeX/LuaTeX. +% +% Greek and Coptic +% ~~~~~~~~~~~~~~~~ +% :: + +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Alpha}{Ά} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Epsilon}{Έ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Eta}{Ή} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Iota}{Ί} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Omicron}{Ό} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Upsilon}{Ύ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Omega}{Ώ} +\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\iota}{ΐ} + +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\Iota}{Ϊ} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\Upsilon}{Ϋ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\alpha}{ά} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\epsilon}{έ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\eta}{ή} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\iota}{ί} +\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\upsilon}{ΰ} + +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\iota}{ϊ} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\upsilon}{ϋ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\omicron}{ό} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\upsilon}{ύ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\omega}{ώ} + + +% Greek Extended +% ~~~~~~~~~~~~~~ +% Postfix ypogegrammeni cannot be second part of composite defs. +% :: + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\alpha}{ἀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\alpha}{ἁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\alpha}{ἂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\alpha}{ἃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\alpha}{ἄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\alpha}{ἅ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\alpha}{ἆ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\alpha}{ἇ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Alpha}{Ἀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Alpha}{Ἁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Alpha}{Ἂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Alpha}{Ἃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Alpha}{Ἄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Alpha}{Ἅ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Alpha}{Ἆ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Alpha}{Ἇ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\epsilon}{ἐ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\epsilon}{ἑ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\epsilon}{ἒ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\epsilon}{ἓ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\epsilon}{ἔ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\epsilon}{ἕ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Epsilon}{Ἐ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Epsilon}{Ἑ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Epsilon}{Ἒ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Epsilon}{Ἓ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Epsilon}{Ἔ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Epsilon}{Ἕ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\eta}{ἠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\eta}{ἡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\eta}{ἢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\eta}{ἣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\eta}{ἤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\eta}{ἥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\eta}{ἦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\eta}{ἧ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Eta}{Ἠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Eta}{Ἡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Eta}{Ἢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Eta}{Ἣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Eta}{Ἤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Eta}{Ἥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Eta}{Ἦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Eta}{Ἧ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\iota}{ἰ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\iota}{ἱ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\iota}{ἲ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\iota}{ἳ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\iota}{ἴ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\iota}{ἵ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\iota}{ἶ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\iota}{ἷ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Iota}{Ἰ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Iota}{Ἱ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Iota}{Ἲ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Iota}{Ἳ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Iota}{Ἴ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Iota}{Ἵ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Iota}{Ἶ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Iota}{Ἷ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\omicron}{ὀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\omicron}{ὁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\omicron}{ὂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\omicron}{ὃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\omicron}{ὄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\omicron}{ὅ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Omicron}{Ὀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Omicron}{Ὁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Omicron}{Ὂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Omicron}{Ὃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Omicron}{Ὄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Omicron}{Ὅ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\upsilon}{ὐ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\upsilon}{ὑ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\upsilon}{ὒ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\upsilon}{ὓ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\upsilon}{ὔ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\upsilon}{ὕ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\upsilon}{ὖ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\upsilon}{ὗ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Upsilon}{Ὑ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Upsilon}{Ὓ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Upsilon}{Ὕ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Upsilon}{Ὗ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\omega}{ὠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\omega}{ὡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\omega}{ὢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\omega}{ὣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\omega}{ὤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\omega}{ὥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\omega}{ὦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\omega}{ὧ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Omega}{Ὠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Omega}{Ὡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Omega}{Ὢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Omega}{Ὣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Omega}{Ὤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Omega}{Ὥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Omega}{Ὦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Omega}{Ὧ} + +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\alpha}{ὰ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\epsilon}{ὲ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\eta}{ὴ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\iota}{ὶ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\omicron}{ὸ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\upsilon}{ὺ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\omega}{ὼ} + +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\alpha}{ᾰ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\alpha}{ᾱ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\alpha}{ᾶ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\alpha}{ᾶ} +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\Alpha}{Ᾰ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\Alpha}{Ᾱ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Alpha}{Ὰ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Alpha}{Ὰ} + +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\eta}{ῆ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\eta}{ῆ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Epsilon}{Ὲ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Eta}{Ὴ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Epsilon}{Ὲ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Eta}{Ὴ} + +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\iota}{ῐ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\iota}{ῑ} +\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\iota}{ῒ} +\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\iota}{ΐ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\iota}{ῖ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\iota}{ῖ} +\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\iota}{ῗ} +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\Iota}{Ῐ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\Iota}{Ῑ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Iota}{Ὶ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Iota}{Ὶ} + +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\upsilon}{ῠ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\upsilon}{ῡ} +\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\upsilon}{ῢ} +\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\upsilon}{ΰ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\rho}{ῤ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\rho}{ῥ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\upsilon}{ῦ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\upsilon}{ῦ} +\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\upsilon}{ῧ} +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\Upsilon}{Ῠ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\Upsilon}{Ῡ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Upsilon}{Ὺ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Upsilon}{Ὺ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Rho}{Ῥ} + +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\omega}{ῶ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\omega}{ῶ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Omicron}{Ὸ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Omega}{Ὼ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Omicron}{Ὸ} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Omega}{Ὼ} + +% .. References +% +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _alphabeta: alphabeta.sty.html +% .. _greek-euenc.def: greek-euenc.def.html diff --git a/language/greek/greek-fontenc/alphabeta-euenc.def.html b/language/greek/greek-fontenc/alphabeta-euenc.def.html new file mode 100644 index 0000000000..099cd4ad01 --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta-euenc.def.html @@ -0,0 +1,788 @@ + + + + + +alphabeta-euenc.def + + + + +
+

alphabeta-euenc.def

+ +

Composite definitions for XeTeX and LuaTeX

+
+ + +
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
+
\ProvidesFile{alphabeta-euenc}
+[2014/09/04 0.11.2 Composite definitions for XeTeX and LuaTeX]
+
+
+

Composite definitions for alphabeta.sty with XeTeX and LuaTeX.

+
+
Changelog:
+
+++++ + + + + + + + + + + + + + + +

2013-09-12

0.1

initial version

2013-10-01

0.1.1

remove clashing defs for legacy characters with oxia.

2014-09-04

0.11.2

documentation update

+
+
+

The alphabeta package re-defines the math macros for Greek letters to work +in both, text and math mode, so that Greek letters can be specified with +the established command names in text, too.

+

The NFSS TextComposite mechanism looks for the next token without expanding +it. In order to let compositions like \>"\alpha work as expected we +define TextComposites with the letter name commands.

+

This file expands the font encoding definitions in greek-euenc.def with +composite commands for use with Unicode fonts. It is sourced by alphabeta +under XeTeX/LuaTeX.

+
+

Greek and Coptic

+
\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Alpha}{Ά}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Epsilon}{Έ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Eta}{Ή}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Iota}{Ί}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Omicron}{Ό}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Upsilon}{Ύ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\Omega}{Ώ}
+\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\iota}{ΐ}
+
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\Iota}{Ϊ}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\Upsilon}{Ϋ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\alpha}{ά}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\epsilon}{έ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\eta}{ή}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\iota}{ί}
+\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\upsilon}{ΰ}
+
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\iota}{ϊ}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\upsilon}{ϋ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\omicron}{ό}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\upsilon}{ύ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\omega}{ώ}
+
+
+

Greek Extended

+

Postfix ypogegrammeni cannot be second part of composite defs.

+
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\alpha}{ἀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\alpha}{ἁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\alpha}{ἂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\alpha}{ἃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\alpha}{ἄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\alpha}{ἅ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\alpha}{ἆ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\alpha}{ἇ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Alpha}{Ἀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Alpha}{Ἁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Alpha}{Ἂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Alpha}{Ἃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Alpha}{Ἄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Alpha}{Ἅ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Alpha}{Ἆ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Alpha}{Ἇ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\epsilon}{ἐ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\epsilon}{ἑ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\epsilon}{ἒ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\epsilon}{ἓ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\epsilon}{ἔ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\epsilon}{ἕ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Epsilon}{Ἐ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Epsilon}{Ἑ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Epsilon}{Ἒ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Epsilon}{Ἓ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Epsilon}{Ἔ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Epsilon}{Ἕ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\eta}{ἠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\eta}{ἡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\eta}{ἢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\eta}{ἣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\eta}{ἤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\eta}{ἥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\eta}{ἦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\eta}{ἧ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Eta}{Ἠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Eta}{Ἡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Eta}{Ἢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Eta}{Ἣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Eta}{Ἤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Eta}{Ἥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Eta}{Ἦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Eta}{Ἧ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\iota}{ἰ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\iota}{ἱ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\iota}{ἲ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\iota}{ἳ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\iota}{ἴ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\iota}{ἵ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\iota}{ἶ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\iota}{ἷ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Iota}{Ἰ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Iota}{Ἱ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Iota}{Ἲ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Iota}{Ἳ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Iota}{Ἴ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Iota}{Ἵ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Iota}{Ἶ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Iota}{Ἷ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\omicron}{ὀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\omicron}{ὁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\omicron}{ὂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\omicron}{ὃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\omicron}{ὄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\omicron}{ὅ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Omicron}{Ὀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Omicron}{Ὁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Omicron}{Ὂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Omicron}{Ὃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Omicron}{Ὄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Omicron}{Ὅ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\upsilon}{ὐ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\upsilon}{ὑ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\upsilon}{ὒ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\upsilon}{ὓ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\upsilon}{ὔ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\upsilon}{ὕ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\upsilon}{ὖ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\upsilon}{ὗ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Upsilon}{Ὑ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Upsilon}{Ὓ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Upsilon}{Ὕ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Upsilon}{Ὗ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\omega}{ὠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\omega}{ὡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\omega}{ὢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\omega}{ὣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\omega}{ὤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\omega}{ὥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\omega}{ὦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\omega}{ὧ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\Omega}{Ὠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Omega}{Ὡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\Omega}{Ὢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\Omega}{Ὣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\Omega}{Ὤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\Omega}{Ὥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\Omega}{Ὦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\Omega}{Ὧ}
+
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\alpha}{ὰ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\epsilon}{ὲ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\eta}{ὴ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\iota}{ὶ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\omicron}{ὸ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\upsilon}{ὺ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\omega}{ὼ}
+
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\alpha}{ᾰ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\alpha}{ᾱ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\alpha}{ᾶ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\alpha}{ᾶ}
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\Alpha}{Ᾰ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\Alpha}{Ᾱ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Alpha}{Ὰ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Alpha}{Ὰ}
+
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\eta}{ῆ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\eta}{ῆ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Epsilon}{Ὲ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Eta}{Ὴ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Epsilon}{Ὲ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Eta}{Ὴ}
+
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\iota}{ῐ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\iota}{ῑ}
+\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\iota}{ῒ}
+\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\iota}{ΐ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\iota}{ῖ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\iota}{ῖ}
+\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\iota}{ῗ}
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\Iota}{Ῐ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\Iota}{Ῑ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Iota}{Ὶ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Iota}{Ὶ}
+
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\upsilon}{ῠ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\upsilon}{ῡ}
+\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\upsilon}{ῢ}
+\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\upsilon}{ΰ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\rho}{ῤ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\rho}{ῥ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\upsilon}{ῦ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\upsilon}{ῦ}
+\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\upsilon}{ῧ}
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\Upsilon}{Ῠ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\Upsilon}{Ῡ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Upsilon}{Ὺ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Upsilon}{Ὺ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\Rho}{Ῥ}
+
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\omega}{ῶ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\omega}{ῶ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Omicron}{Ὸ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\Omega}{Ὼ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Omicron}{Ὸ}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\Omega}{Ὼ}
+ +
+
+ + diff --git a/language/greek/greek-fontenc/alphabeta-lgr.def b/language/greek/greek-fontenc/alphabeta-lgr.def new file mode 100644 index 0000000000..958fb7cfba --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta-lgr.def @@ -0,0 +1,188 @@ +% alphabeta-lgr.def +% =================== +% Composite definitions for 8-bit TeX +% ****************************************** +% +% :Copyright: © 2014 Günter Milde +% :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: +% :: + +\ProvidesFile{alphabeta-lgr} +[2014/09/04 0.11.2 Composite definitions for 8-bit TeX] + +% :Changelog: +% .. class:: borderless +% +% ========== ====== ======================================================= +% 2014-09-04 0.11.2 outsourced from ``alphabeta.sty``. +% ========== ====== ======================================================= +% +% The alphabeta_ package re-defines the math macros for Greek letters to work +% in both, text and math mode, so that Greek letters can be specified with +% the established command names in text, too. +% +% The NFSS TextComposite mechanism looks for the next token without expanding +% it. In order to let compositions like ``\>"\alpha`` work as expected we +% define TextComposites with the `letter name commands`. +% +% This file expands the font encoding definitions in lgrenc.def_ with +% composite commands for use with 8-bit TeX fonts. It is sourced by +% alphabeta_ under 8-bit TeX (pdfTeX, eTeX, TeX). +% +% :: + + \DeclareTextComposite{\accvaria}{LGR}{\alpha}{128} + \DeclareTextComposite{\accdasia}{LGR}{\alpha}{129} + \DeclareTextComposite{\accpsili}{LGR}{\alpha}{130} + \DeclareTextComposite{\accdasiavaria}{LGR}{\alpha}{131} + \DeclareTextComposite{\acctonos}{LGR}{\alpha}{136} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\alpha}{137} + \DeclareTextComposite{\accpsilioxia}{LGR}{\alpha}{138} + \DeclareTextComposite{\accpsilivaria}{LGR}{\alpha}{139} + \DeclareTextComposite{\accperispomeni}{LGR}{\alpha}{144} + \DeclareTextComposite{\accdasiaperispomeni}{LGR}{\alpha}{145} + \DeclareTextComposite{\accpsiliperispomeni}{LGR}{\alpha}{146} + \DeclareTextComposite{\accvaria}{LGR}{\eta}{152} + \DeclareTextComposite{\accdasia}{LGR}{\eta}{153} + \DeclareTextComposite{\accpsili}{LGR}{\eta}{154} + \DeclareTextComposite{\acctonos}{LGR}{\eta}{160} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\eta}{161} + \DeclareTextComposite{\accpsilioxia}{LGR}{\eta}{162} + \DeclareTextComposite{\accdasiavaria}{LGR}{\eta}{163} + \DeclareTextComposite{\accperispomeni}{LGR}{\eta}{168} + \DeclareTextComposite{\accdasiaperispomeni}{LGR}{\eta}{169} + \DeclareTextComposite{\accpsiliperispomeni}{LGR}{\eta}{170} + \DeclareTextComposite{\accpsilivaria}{LGR}{\eta}{171} + \DeclareTextComposite{\accvaria}{LGR}{\omega}{176} + \DeclareTextComposite{\accdasia}{LGR}{\omega}{177} + \DeclareTextComposite{\accpsili}{LGR}{\omega}{178} + \DeclareTextComposite{\accdasiavaria}{LGR}{\omega}{179} + \DeclareTextComposite{\acctonos}{LGR}{\omega}{184} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\omega}{185} + \DeclareTextComposite{\accpsilioxia}{LGR}{\omega}{186} + \DeclareTextComposite{\accpsilivaria}{LGR}{\omega}{187} + \DeclareTextComposite{\accperispomeni}{LGR}{\omega}{192} + \DeclareTextComposite{\accdasiaperispomeni}{LGR}{\omega}{193} + \DeclareTextComposite{\accpsiliperispomeni}{LGR}{\omega}{194} + \DeclareTextComposite{\accvaria}{LGR}{\iota}{200} + \DeclareTextComposite{\accdasia}{LGR}{\iota}{201} + \DeclareTextComposite{\accpsili}{LGR}{\iota}{202} + \DeclareTextComposite{\accdasiavaria}{LGR}{\iota}{203} + \DeclareTextComposite{\acctonos}{LGR}{\iota}{208} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\iota}{209} + \DeclareTextComposite{\accpsilioxia}{LGR}{\iota}{210} + \DeclareTextComposite{\accpsilivaria}{LGR}{\iota}{211} + \DeclareTextComposite{\accperispomeni}{LGR}{\iota}{216} + \DeclareTextComposite{\accdasiaperispomeni}{LGR}{\iota}{217} + \DeclareTextComposite{\accpsiliperispomeni}{LGR}{\iota}{218} + \DeclareTextComposite{\accdialytika}{LGR}{\iota}{240} + \DeclareTextComposite{\accdialytikavaria}{LGR}{\iota}{241} + \DeclareTextComposite{\accdialytikatonos}{LGR}{\iota}{242} + \DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\iota}{243} + \DeclareTextComposite{\accvaria}{LGR}{\upsilon}{204} + \DeclareTextComposite{\accdasia}{LGR}{\upsilon}{205} + \DeclareTextComposite{\accpsili}{LGR}{\upsilon}{206} + \DeclareTextComposite{\accdasiavaria}{LGR}{\upsilon}{207} + \DeclareTextComposite{\acctonos}{LGR}{\upsilon}{212} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\upsilon}{213} + \DeclareTextComposite{\accpsilioxia}{LGR}{\upsilon}{214} + \DeclareTextComposite{\accpsilivaria}{LGR}{\upsilon}{215} + \DeclareTextComposite{\accperispomeni}{LGR}{\upsilon}{220} + \DeclareTextComposite{\accdasiaperispomeni}{LGR}{\upsilon}{221} + \DeclareTextComposite{\accpsiliperispomeni}{LGR}{\upsilon}{222} + \DeclareTextComposite{\accdialytika}{LGR}{\upsilon}{244} + \DeclareTextComposite{\accdialytikavaria}{LGR}{\upsilon}{245} + \DeclareTextComposite{\accdialytikatonos}{LGR}{\upsilon}{246} + \DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\upsilon}{247} + \DeclareTextComposite{\accvaria}{LGR}{\epsilon}{224} + \DeclareTextComposite{\accdasia}{LGR}{\epsilon}{225} + \DeclareTextComposite{\accpsili}{LGR}{\epsilon}{226} + \DeclareTextComposite{\accdasiavaria}{LGR}{\epsilon}{227} + \DeclareTextComposite{\acctonos}{LGR}{\epsilon}{232} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\epsilon}{233} + \DeclareTextComposite{\accpsilioxia}{LGR}{\epsilon}{234} + \DeclareTextComposite{\accpsilivaria}{LGR}{\epsilon}{235} + \DeclareTextComposite{\accvaria}{LGR}{\omicron}{228} + \DeclareTextComposite{\accdasia}{LGR}{\omicron}{229} + \DeclareTextComposite{\accpsili}{LGR}{\omicron}{230} + \DeclareTextComposite{\accdasiavaria}{LGR}{\omicron}{231} + \DeclareTextComposite{\acctonos}{LGR}{\omicron}{236} + \DeclareTextComposite{\accdasiaoxia}{LGR}{\omicron}{237} + \DeclareTextComposite{\accpsilioxia}{LGR}{\omicron}{238} + \DeclareTextComposite{\accpsilivaria}{LGR}{\omicron}{239} + \DeclareTextCompositeCommand{\accdasia}{LGR}{\Alpha}{A} + \DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Alpha}{>`A} + \DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Alpha}{>'A} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Alpha}{>\char126A} + \DeclareTextCompositeCommand{\acctonos}{LGR}{\Alpha}{'A} + \DeclareTextCompositeCommand{\accvaria}{LGR}{\Alpha}{`A} + \DeclareTextCompositeCommand{\accdasia}{LGR}{\Epsilon}{E} + \DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Epsilon}{>'E} + \DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Epsilon}{>`E} + \DeclareTextCompositeCommand{\acctonos}{LGR}{\Epsilon}{'E} + \DeclareTextCompositeCommand{\accvaria}{LGR}{\Epsilon}{`E} + \DeclareTextCompositeCommand{\accdasia}{LGR}{\Eta}{H} + \DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Eta}{>`H} + \DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Eta}{>'H} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Eta}{>\char126H} + \DeclareTextCompositeCommand{\acctonos}{LGR}{\Eta}{'H} + \DeclareTextCompositeCommand{\accvaria}{LGR}{\Eta}{`H} + \DeclareTextCompositeCommand{\accdasia}{LGR}{\Iota}{I} + \DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Iota}{>`I} + \DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Iota}{>'I} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Iota}{>\char126I} + \DeclareTextCompositeCommand{\acctonos}{LGR}{\Iota}{'I} + \DeclareTextCompositeCommand{\accvaria}{LGR}{\Iota}{`I} + \DeclareTextCompositeCommand{\accdasia}{LGR}{\Omicron}{O} + \DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Omicron}{>`O} + \DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Omicron}{>'O} + \DeclareTextCompositeCommand{\acctonos}{LGR}{\Omicron}{'O} + \DeclareTextCompositeCommand{\accvaria}{LGR}{\Omicron}{`O} + \DeclareTextCompositeCommand{\accdasia}{LGR}{\Upsilon}{W} + \DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Omega}{>`W} + \DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Omega}{>'W} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Omega}{>\char126W} + \DeclareTextCompositeCommand{\acctonos}{LGR}{\Omega}{'W} + \DeclareTextCompositeCommand{\accvaria}{LGR}{\Omega}{`W} + \DeclareTextComposite{\accdialytika}{LGR}{\Iota}{219} + \DeclareTextComposite{\accdialytika}{LGR}{\Upsilon}{223} + \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{\Alpha}{\LGR@A@hiatus} + \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{\Epsilon}{\LGR@E@hiatus} + + +% .. References +% +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _alphabeta: alphabeta.sty.html +% .. _lgrenc.def: lgrenc.def.html diff --git a/language/greek/greek-fontenc/alphabeta-lgr.def.html b/language/greek/greek-fontenc/alphabeta-lgr.def.html new file mode 100644 index 0000000000..e324cc3bdd --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta-lgr.def.html @@ -0,0 +1,729 @@ + + + + + +alphabeta-lgr.def + + + + +
+

alphabeta-lgr.def

+ +

Composite definitions for 8-bit TeX

+
+ + +
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
+
\ProvidesFile{alphabeta-lgr}
+[2014/09/04 0.11.2 Composite definitions for 8-bit TeX]
+
+
Changelog
+
+++++ + + + + + + +

2014-09-04

0.11.2

outsourced from alphabeta.sty.

+
+
+

The alphabeta package re-defines the math macros for Greek letters to work +in both, text and math mode, so that Greek letters can be specified with +the established command names in text, too.

+

The NFSS TextComposite mechanism looks for the next token without expanding +it. In order to let compositions like \>"\alpha work as expected we +define TextComposites with the letter name commands.

+

This file expands the font encoding definitions in lgrenc.def with +composite commands for use with 8-bit TeX fonts. It is sourced by +alphabeta under 8-bit TeX (pdfTeX, eTeX, TeX).

+
\DeclareTextComposite{\accvaria}{LGR}{\alpha}{128}
+\DeclareTextComposite{\accdasia}{LGR}{\alpha}{129}
+\DeclareTextComposite{\accpsili}{LGR}{\alpha}{130}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\alpha}{131}
+\DeclareTextComposite{\acctonos}{LGR}{\alpha}{136}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\alpha}{137}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\alpha}{138}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\alpha}{139}
+\DeclareTextComposite{\accperispomeni}{LGR}{\alpha}{144}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\alpha}{145}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\alpha}{146}
+\DeclareTextComposite{\accvaria}{LGR}{\eta}{152}
+\DeclareTextComposite{\accdasia}{LGR}{\eta}{153}
+\DeclareTextComposite{\accpsili}{LGR}{\eta}{154}
+\DeclareTextComposite{\acctonos}{LGR}{\eta}{160}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\eta}{161}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\eta}{162}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\eta}{163}
+\DeclareTextComposite{\accperispomeni}{LGR}{\eta}{168}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\eta}{169}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\eta}{170}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\eta}{171}
+\DeclareTextComposite{\accvaria}{LGR}{\omega}{176}
+\DeclareTextComposite{\accdasia}{LGR}{\omega}{177}
+\DeclareTextComposite{\accpsili}{LGR}{\omega}{178}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\omega}{179}
+\DeclareTextComposite{\acctonos}{LGR}{\omega}{184}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\omega}{185}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\omega}{186}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\omega}{187}
+\DeclareTextComposite{\accperispomeni}{LGR}{\omega}{192}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\omega}{193}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\omega}{194}
+\DeclareTextComposite{\accvaria}{LGR}{\iota}{200}
+\DeclareTextComposite{\accdasia}{LGR}{\iota}{201}
+\DeclareTextComposite{\accpsili}{LGR}{\iota}{202}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\iota}{203}
+\DeclareTextComposite{\acctonos}{LGR}{\iota}{208}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\iota}{209}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\iota}{210}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\iota}{211}
+\DeclareTextComposite{\accperispomeni}{LGR}{\iota}{216}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\iota}{217}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\iota}{218}
+\DeclareTextComposite{\accdialytika}{LGR}{\iota}{240}
+\DeclareTextComposite{\accdialytikavaria}{LGR}{\iota}{241}
+\DeclareTextComposite{\accdialytikatonos}{LGR}{\iota}{242}
+\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\iota}{243}
+\DeclareTextComposite{\accvaria}{LGR}{\upsilon}{204}
+\DeclareTextComposite{\accdasia}{LGR}{\upsilon}{205}
+\DeclareTextComposite{\accpsili}{LGR}{\upsilon}{206}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\upsilon}{207}
+\DeclareTextComposite{\acctonos}{LGR}{\upsilon}{212}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\upsilon}{213}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\upsilon}{214}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\upsilon}{215}
+\DeclareTextComposite{\accperispomeni}{LGR}{\upsilon}{220}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\upsilon}{221}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\upsilon}{222}
+\DeclareTextComposite{\accdialytika}{LGR}{\upsilon}{244}
+\DeclareTextComposite{\accdialytikavaria}{LGR}{\upsilon}{245}
+\DeclareTextComposite{\accdialytikatonos}{LGR}{\upsilon}{246}
+\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\upsilon}{247}
+\DeclareTextComposite{\accvaria}{LGR}{\epsilon}{224}
+\DeclareTextComposite{\accdasia}{LGR}{\epsilon}{225}
+\DeclareTextComposite{\accpsili}{LGR}{\epsilon}{226}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\epsilon}{227}
+\DeclareTextComposite{\acctonos}{LGR}{\epsilon}{232}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\epsilon}{233}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\epsilon}{234}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\epsilon}{235}
+\DeclareTextComposite{\accvaria}{LGR}{\omicron}{228}
+\DeclareTextComposite{\accdasia}{LGR}{\omicron}{229}
+\DeclareTextComposite{\accpsili}{LGR}{\omicron}{230}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\omicron}{231}
+\DeclareTextComposite{\acctonos}{LGR}{\omicron}{236}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\omicron}{237}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\omicron}{238}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\omicron}{239}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Alpha}{<A}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Alpha}{<`A}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Alpha}{<'A}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\Alpha}{<\char126A}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\Alpha}{>A}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Alpha}{>`A}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Alpha}{>'A}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Alpha}{>\char126A}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Alpha}{'A}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Alpha}{`A}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Epsilon}{<E}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Epsilon}{<'E}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Epsilon}{<`E}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\Epsilon}{>E}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Epsilon}{>'E}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Epsilon}{>`E}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Epsilon}{'E}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Epsilon}{`E}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Eta}{<H}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Eta}{<`H}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Eta}{<'H}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\Eta}{<\char126H}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\Eta}{>H}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Eta}{>`H}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Eta}{>'H}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Eta}{>\char126H}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Eta}{'H}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Eta}{`H}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Iota}{<I}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Iota}{<`I}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Iota}{<'I}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\Iota}{<\char126I}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\Iota}{>I}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Iota}{>`I}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Iota}{>'I}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Iota}{>\char126I}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Iota}{'I}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Iota}{`I}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Omicron}{<O}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Omicron}{<`O}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Omicron}{<'O}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\Omicron}{>O}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Omicron}{>`O}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Omicron}{>'O}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Omicron}{'O}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Omicron}{`O}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Upsilon}{<U}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Upsilon}{<`U}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Upsilon}{<'U}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\Upsilon}{<\char126U}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Upsilon}{'U}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Upsilon}{`U}
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\Omega}{<W}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\Omega}{<`W}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\Omega}{<'W}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\Omega}{<\char126W}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\Omega}{>W}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\Omega}{>`W}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\Omega}{>'W}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\Omega}{>\char126W}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\Omega}{'W}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\Omega}{`W}
+\DeclareTextComposite{\accdialytika}{LGR}{\Iota}{219}
+\DeclareTextComposite{\accdialytika}{LGR}{\Upsilon}{223}
+\DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{\Alpha}{\LGR@A@hiatus}
+\DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{\Epsilon}{\LGR@E@hiatus}
+ +
+ + diff --git a/language/greek/greek-fontenc/alphabeta.sty b/language/greek/greek-fontenc/alphabeta.sty new file mode 100644 index 0000000000..a799a6cd90 --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta.sty @@ -0,0 +1,403 @@ +% alphabeta: Greek symbols in text and math +% ***************************************** +% +% :Copyright: © 2010 Günter Milde +% :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: Use ``\alpha, \beta, ...`` for Greek letters in text and math +% mode. +% +% :Identification: +% :: + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{alphabeta} +[2016/02/05 v0.13.2 macros for Greek letters in text and math] + +% Changelog: +% .. class:: borderless +% +% ====== ========== ========================================================= +% 0.1 2012-06-26 initial version +% 0.2 2013-05-03 new accent macro names with ``lgrxenc.def`` 0.7 +% 0.3 2013-05-28 use ``lgrenc.def`` from greek-fontenc, +% .. enable Unicode input in math mode. +% 0.4 2013-09-11 move to greek-fontenc_, support XeTeX/LuaTeX. +% 0.13 2015-09-04 Support for `variant symbols`. +% 0.13.2 2016-02-05 Support for standard Unicode text font encoding "TU" +% (new in fontspec v2.5a). +% ====== ========== ========================================================= +% +% Motivation +% ========== +% +% By default, the ``\alpha, \beta, ...`` macros for Greek letters +% are only valid in mathematical mode. +% +% With this package, the math macros are redefined to work in both, text and +% math mode, so that Greek letters can be specified with the established +% command names in text, too. +% +% If used together with the ``utf8`` option of inputenc_, literal Unicode +% characters can be used for Greek symbols in mathematical formulas. +% +% .. Attention:: +% The macros work well in any font encoding for single symbols. +% However, with 8-bit TeX, the automatic font-encoding switches behind the +% doors interfere with kerning between letters and replacement of +% accent+character with a pre-composed character. +% +% Therefore, Greek text should be written with the help of babel_ or +% polyglossia_ (setting the language to ``greek``) or wrapped in the +% provided ``ensuregreek`` macro. Using babel_ or polyglossia_ also helps +% to ensure proper hyphenation. +% +% +% Usage +% ===== +% +% .. code:: latex +% +% \usepackage{alphabeta} +% +% The greek-inputenc_ package provides support for Unicode (utf-8) input +% of Greek characters with 8-bit TeX and the inputenc_ package: +% +% .. code:: latex +% +% \usepackage[utf-8]{inputenc} +% \usepackage{alphabeta} +% +% Conflicts +% ---------- +% +% `alphabeta` does not work if the ``utf8x`` input encoding is selected. +% (``utf8x`` is an interface to the ``ucs`` package which uses a +% non-compatible definition of ``\DeclareUnicodeCharacter``.) +% +% For details see ``_ and ``_. +% +% +% Implementation +% ============== +% +% Requirements +% ------------ +% +% This package extends the `textalpha `_ package. +% Package options are passed on to `textalpha`:: + +\RequirePackageWithOptions{textalpha} + +% Just like `alphabeta`, `textalpha` is part of greek-fontenc_. +% +% This package requires the e-TeX_ extensions (i.e. a not too old TeX +% distribution) for the ``\ifdefined`` test. +% +% It uses the ``\TextOrMath`` test from the fixltx2e_ standard LaTeX package. +% ``fixltx2e`` is loaded by default since TeXLive 2015. In case of an +% ``\TextOrMath undefined`` error, load it in the document preamble via +% +% .. code:: latex +% +% \usepackage{fixltx2e} +% +% +% Postpone the re-definitions +% --------------------------- +% +% To prevent other packages overwriting the re-defined commands we postpone +% the next steps until the start of the document body:: + +\AtBeginDocument{ + +% Save math macros +% ---------------- +% +% Provide an alias for the standard math commands:: + +\let\mathGamma\Gamma +\let\mathDelta\Delta +\let\mathTheta\Theta +\let\mathLambda\Lambda +\let\mathXi\Xi +\let\mathPi\Pi +\let\mathSigma\Sigma +\let\mathUpsilon\Upsilon +\let\mathPhi\Phi +\let\mathPsi\Psi +\let\mathOmega\Omega +% +\let\mathalpha\alpha +\let\mathbeta\beta +\let\mathgamma\gamma +\let\mathdelta\delta +\let\mathepsilon\epsilon +\let\mathvarepsilon\varepsilon +\let\mathzeta\zeta +\let\matheta\eta +\let\maththeta\theta +\let\mathvartheta\vartheta +\let\mathiota\iota +\let\mathkappa\kappa +\let\mathlambda\lambda +\let\mathmu\mu +\let\mathnu\nu +\let\mathxi\xi +\let\mathpi\pi +\let\mathvarpi\varpi +\let\mathrho\rho +\let\mathvarrho\varrho +\let\mathsigma\sigma +\let\mathvarsigma\varsigma +\let\mathfinalsigma\varsigma +\let\mathtau\tau +\let\mathupsilon\upsilon +\let\mathphi\phi +\let\mathvarphi\varphi +\let\mathchi\chi +\let\mathpsi\psi +\let\mathomega\omega +% ``\digamma`` is defined by amsmath, provide a fallback +\providecommand*{\digamma}{\textit{\textdigamma}} +\let\mathdigamma\digamma + +% \varkappa and \varbeta are defined by some math packages +\ifdefined\varbeta + \let\mathvarbeta\varbeta +\fi +\ifdefined\varkappa % e.g. with newtxmath + \let\mathvarkappa\varkappa +\fi + +% Commands to access Greek letters by name +% ---------------------------------------- +% +% For letters defined in math mode, the commands work in both, text and math. +% +% Some Greek letters look identical to Latin letters and can therefore not be +% used as variable symbols in math formulas. These letters are not defined in +% TeX's math mode, we provide an alias to the corrsponding ``\text...`` +% command. +% +% Mathematical notation distinguishes `variant shape symbols`_ for pi, phi, +% rho, theta (small and capital), beta, and kappa (characters for the latter +% three symbols are not included in TeX’s math fonts). These variations have +% no syntactic meaning in Greek text and are not given code-points in the LGR +% encoding while Unicode defines separate code points for the symbol variants. +% +% Greek Alphabet: +% +% Macros keep their meaning in mathematical mode (i.e. use the same shape as +% without this package) and refer to GREEK LETTER ... in text. For +% ``\epsilon`` and ``phi``, this means that the selected symbol variant +% differs in text vs. math mode. Use ``\varepsilon`` and ``\varphi`` (see +% section `variant shape symbols`_ below) to select the GREEK LETTER ...” +% in both, text and math mode. +% :: + +\providecommand*{\Alpha}{\textAlpha} +\providecommand*{\Beta}{\textBeta} +\renewcommand*{\Gamma}{\TextOrMath{\textGamma}{\mathGamma}} +\renewcommand*{\Delta}{\TextOrMath{\textDelta}{\mathDelta}} +\providecommand*{\Epsilon}{\textEpsilon} +\providecommand*{\Zeta}{\textZeta} +\providecommand*{\Eta}{\textEta} +\renewcommand*{\Theta}{\TextOrMath{\textTheta}{\mathTheta}} +\providecommand*{\Iota}{\textIota} +\providecommand*{\Kappa}{\textKappa} +\renewcommand*{\Lambda}{\TextOrMath{\textLambda}{\mathLambda}} +\providecommand*{\Mu}{\textMu} +\providecommand*{\Nu}{\textNu} +\renewcommand*{\Xi}{\TextOrMath{\textXi}{\mathXi}} +\providecommand*{\Omicron}{\textOmicron} +\renewcommand*{\Pi}{\TextOrMath{\textPi}{\mathPi}} +\providecommand*{\Rho}{\textRho} +\renewcommand*{\Sigma}{\TextOrMath{\textSigma}{\mathSigma}} +\providecommand*{\Tau}{\textTau} +\renewcommand*{\Upsilon}{\TextOrMath{\textUpsilon}{\mathUpsilon}} +\renewcommand*{\Phi}{\TextOrMath{\textPhi}{\mathPhi}} +\providecommand*{\Chi}{\textChi} +\renewcommand*{\Psi}{\TextOrMath{\textPsi}{\mathPsi}} +\renewcommand*{\Omega}{\TextOrMath{\textOmega}{\mathOmega}} +% +\renewcommand*{\alpha}{\TextOrMath{\textalpha}{\mathalpha}} +\renewcommand*{\beta}{\TextOrMath{\textbeta}{\mathbeta}} +\renewcommand*{\gamma}{\TextOrMath{\textgamma}{\mathgamma}} +\renewcommand*{\delta}{\TextOrMath{\textdelta}{\mathdelta}} +\renewcommand*{\epsilon}{\TextOrMath{\textepsilon}{\mathepsilon}} % ε/ϵ +\renewcommand*{\zeta}{\TextOrMath{\textzeta}{\mathzeta}} +\renewcommand*{\eta}{\TextOrMath{\texteta}{\matheta}} +\renewcommand*{\theta}{\TextOrMath{\texttheta}{\maththeta}} +\renewcommand*{\iota}{\TextOrMath{\textiota}{\mathiota}} +\renewcommand*{\kappa}{\TextOrMath{\textkappa}{\mathkappa}} +\renewcommand*{\lambda}{\TextOrMath{\textlambda}{\mathlambda}} +\renewcommand*{\mu}{\TextOrMath{\textmu}{\mathmu}} +\renewcommand*{\nu}{\TextOrMath{\textnu}{\mathnu}} +\renewcommand*{\xi}{\TextOrMath{\textxi}{\mathxi}} +\providecommand*{\omicron}{\textomicron} +\renewcommand*{\pi}{\TextOrMath{\textpi}{\mathpi}} +\renewcommand*{\rho}{\TextOrMath{\textrho}{\mathrho}} +\renewcommand*{\sigma}{\TextOrMath{\textsigma}{\mathsigma}} +\renewcommand*{\varsigma}{\TextOrMath{\textvarsigma}{\mathvarsigma}} +\providecommand*{\finalsigma}{\varsigma} +\renewcommand*{\tau}{\TextOrMath{\texttau}{\mathtau}} +\renewcommand*{\upsilon}{\TextOrMath{\textupsilon}{\mathupsilon}} +\renewcommand*{\phi}{\TextOrMath{\textphi}{\mathphi}} % ϕ/φ +\renewcommand*{\chi}{\TextOrMath{\textchi}{\mathchi}} +\renewcommand*{\psi}{\TextOrMath{\textpsi}{\mathpsi}} +\renewcommand*{\omega}{\TextOrMath{\textomega}{\mathomega}} + + +% Archaic letters +% ''''''''''''''' +% +% :: + +\renewcommand*{\digamma}{\TextOrMath{\textdigamma}{\mathdigamma}} % ϝ +\providecommand*{\Digamma}{\textDigamma} % Ϝ +\providecommand*{\stigma}{\textstigma} % ϛ +\providecommand*{\varstigma}{\textvarstigma} % stigma variant (CB.enc, teubner) +\providecommand*{\koppa}{\textkoppa} % ϟ (greek small letter koppa) +\providecommand*{\qoppa}{\textqoppa} % ϙ (archaic koppa) +\providecommand*{\Qoppa}{\textQoppa} % Ϙ (archaic Koppa) +\providecommand*{\Stigma}{\textStigma} % Ϛ (in some fonts ϹΤ ligature) +\providecommand*{\Sampi}{\textSampi} % Ϡ +\providecommand*{\sampi}{\textsampi} % ϡ + +% Variant shape symbols +% ''''''''''''''''''''' +% +% TeX’s concept of “standard” vs. “variant” math symbols does not map to the +% distinction between GREEK LETTER ... vs. GREEK ... SYMBOL in the Unicode +% standard (see ``_). +% +% The ``\...symbol`` macros select the GREEK ... SYMBOL in both, text and +% math mode. For ``\epsilonsymbol`` and ``\phisymbol`` this is the default +% shape in math mode. The ``\var...`` macros select the shape used by TeX +% math (or, if not supported, the SYMBOL shape):: + +% ..symbol == var.. +\renewcommand*{\varpi}{\TextOrMath{\textpisymbol}{\mathvarpi}} % ϖ +\providecommand*{\pisymbol}{\varpi} % ϖ +\renewcommand*{\varrho}{\TextOrMath{\textrhosymbol}{\mathvarrho}} % ϱ +\providecommand*{\rhosymbol}{\TextOrMath{\textrhosymbol}{\mathvarrho}} % ϱ +\renewcommand*{\vartheta}{\TextOrMath{\textthetasymbol}{\mathvartheta}} % ϑ +\providecommand*{\thetasymbol}{\vartheta} % ϑ +% ..symbol != var.. +\renewcommand*{\varepsilon}{\TextOrMath{\textepsilon}{\mathvarepsilon}} % ε +\providecommand*{\epsilonsymbol}{\TextOrMath{\textepsilonsymbol}{\mathepsilon}} % ϵ +\renewcommand*{\varphi}{\TextOrMath{\textphi}{\mathvarphi}} % φ +\providecommand*{\phisymbol}{\TextOrMath{\textphisymbol}{\mathphi}} % ϕ +% only text (in standard 8-bit TeX, may be defined with additional packages): +\ifdefined\mathvarbeta + \renewcommand*{\varbeta}{\TextOrMath{\textbetasymbol}{\mathvarbeta}} % ϐ +\else + \providecommand*{\varbeta}{\textbetasymbol} +\fi +\providecommand*{\betasymbol}{\varbeta} +\ifdefined\mathvarkappa % ϰ + \renewcommand*{\varkappa}{\TextOrMath{\textkappasymbol}{\mathvarkappa}} +\else + \providecommand*{\varkappa}{\textkappasymbol} +\fi +\providecommand*{\kappasymbol}{\varkappa} +% \Theta/\varTheta are not a symbol variants but upright/italic shape of Theta +\providecommand*{\Thetasymbol}{\textThetasymbol} % ϴ + + +% TextCompositeCommands for the generic macros +% -------------------------------------------- +% +% The NFSS TextComposite mechanism looks for the next token without expanding +% it. In order to let compositions like ``\ensuregreek{\'\Alpha}`` or +% ``\ensuregreek{\>"\alpha}`` work as expected we define TextComposites with the +% `letter name commands`. (Composition only works if the active font encoding +% is LGR). :: + +\ifdefined\XeTeXrevision + \input{alphabeta-euenc.def} + % \expandafter\endinput % "return" +\else\ifdefined\luatexversion + \input{alphabeta-euenc.def} + % \expandafter\endinput % "return" +\else % 8-bit TeX + \input{alphabeta-lgr.def} +\fi\fi + + +% Re-definition for Greek Unicode input in math mode +% -------------------------------------------------- +% +% Check with ``\ifdefined`` for the definition of +% ``\DeclareUnicodeCharacter``. In contrast to ``\@ifdefined``, this works +% without side-effects. It makes the package dependent on the `e-TeX`_ +% extensions but these are standard in all current TeX distributions anyway. +% +% Map Greek characters that are also defined in math mode to the generic +% macros:: + +\ifdefined\DeclareUnicodeCharacter + \DeclareUnicodeCharacter{0393}{\Gamma} % Γ + \DeclareUnicodeCharacter{0394}{\Delta} % Δ + \DeclareUnicodeCharacter{0398}{\Theta} % Θ + \DeclareUnicodeCharacter{039B}{\Lambda} % Λ + \DeclareUnicodeCharacter{039E}{\Xi} % Ξ + \DeclareUnicodeCharacter{03A0}{\Pi} % Π + \DeclareUnicodeCharacter{03A3}{\Sigma} % Σ + \DeclareUnicodeCharacter{03A5}{\Upsilon} % Υ + \DeclareUnicodeCharacter{03A6}{\Phi} % Φ + \DeclareUnicodeCharacter{03A8}{\Psi} % Ψ + \DeclareUnicodeCharacter{03A9}{\Omega} % Ω + + \DeclareUnicodeCharacter{03B1}{\alpha} % α + \DeclareUnicodeCharacter{03B2}{\beta} % β + \DeclareUnicodeCharacter{03B3}{\gamma} % γ + \DeclareUnicodeCharacter{03B4}{\delta} % δ + \DeclareUnicodeCharacter{03B5}{\varepsilon} % ε textepsilon/varepsilon + \DeclareUnicodeCharacter{03B6}{\zeta} % ζ + \DeclareUnicodeCharacter{03B7}{\eta} % η + \DeclareUnicodeCharacter{03B8}{\theta} % θ + \DeclareUnicodeCharacter{03B9}{\iota} % ι + \DeclareUnicodeCharacter{03BA}{\kappa} % κ + \DeclareUnicodeCharacter{03BB}{\lambda} % λ + \DeclareUnicodeCharacter{03BC}{\mu} % μ + \DeclareUnicodeCharacter{03BD}{\nu} % ν + \DeclareUnicodeCharacter{03BE}{\xi} % ξ + \DeclareUnicodeCharacter{03C0}{\pi} % π + \DeclareUnicodeCharacter{03C1}{\rho} % ρ + \DeclareUnicodeCharacter{03C2}{\varsigma} % ς + \DeclareUnicodeCharacter{03C3}{\sigma} % σ + \DeclareUnicodeCharacter{03C4}{\tau} % τ + \DeclareUnicodeCharacter{03C5}{\upsilon} % υ + \DeclareUnicodeCharacter{03C6}{\varphi} % φ textphi/varphi + \DeclareUnicodeCharacter{03C7}{\chi} % χ + \DeclareUnicodeCharacter{03C8}{\psi} % ψ + \DeclareUnicodeCharacter{03C9}{\omega} % ω + + \DeclareUnicodeCharacter{03D1}{\thetasymbol} % ϑ + \DeclareUnicodeCharacter{03D5}{\phisymbol} % ϕ $\phi$ + \DeclareUnicodeCharacter{03D6}{\pisymbol} % ϖ + \DeclareUnicodeCharacter{03DD}{\digamma} % ϝ + \DeclareUnicodeCharacter{03F1}{\rhosymbol} % ϱ + \DeclareUnicodeCharacter{03F5}{\epsilonsymbol} % ϵ $\epsilon$ + +\fi + +% :: + +} % close the \AtBeginDocument macro + +% .. References +% ---------- +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _CB Fonts: http://www.ctan.org/pkg/cbgreek-complete +% .. _babel: http://www.ctan.org/cgi-bin/ctanPackageInformation.py?id=babel +% .. _e-TeX: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=etex +% .. _greek-fontenc: http://www.ctan.org/pkg/greek-fontenc +% .. _greek-inputenc: http://www.ctan.org/pkg/greek-inputenc +% .. _inputenc: http://www.ctan.org/pkg/inputenc +% .. _fixltx2e: http://www.ctan.org/pkg/fixltx2e +% .. _polyglossia: http://www.ctan.org/pkg/polyglossia diff --git a/language/greek/greek-fontenc/alphabeta.sty.html b/language/greek/greek-fontenc/alphabeta.sty.html new file mode 100644 index 0000000000..3bd9daef0e --- /dev/null +++ b/language/greek/greek-fontenc/alphabeta.sty.html @@ -0,0 +1,945 @@ + + + + + +alphabeta: Greek symbols in text and math + + + + + + +
+

alphabeta: Greek symbols in text and math

+ +
+ + +
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{alphabeta}
+[2016/02/05 v0.13.2 macros for Greek letters in text and math]
+
+
+
+

Abstract

+

Use \alpha, \beta, ... for Greek letters in text and math +mode.

+
+
+
Changelog:
+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

0.1

2012-06-26

initial version

0.2

2013-05-03

new accent macro names with lgrxenc.def 0.7

0.3

2013-05-28

use lgrenc.def from greek-fontenc,

+

enable Unicode input in math mode.

0.4

2013-09-11

move to greek-fontenc, support XeTeX/LuaTeX.

0.13

2015-09-04

Support for variant symbols.

0.13.2

2016-02-05

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

+
+
+
+

Motivation

+

By default, the \alpha, \beta, ... macros for Greek letters +are only valid in mathematical mode.

+

With this package, the math macros are redefined to work in both, text and +math mode, so that Greek letters can be specified with the established +command names in text, too.

+

If used together with the utf8 option of inputenc, literal Unicode +characters can be used for Greek symbols in mathematical formulas.

+
+

Attention!

+

The macros work well in any font encoding for single symbols. +However, with 8-bit TeX, the automatic font-encoding switches behind the +doors interfere with kerning between letters and replacement of +accent+character with a pre-composed character.

+

Therefore, Greek text should be written with the help of babel or +polyglossia (setting the language to greek) or wrapped in the +provided ensuregreek macro. Using babel or polyglossia also helps +to ensure proper hyphenation.

+
+
+
+

Usage

+
\usepackage{alphabeta}
+

The greek-inputenc package provides support for Unicode (utf-8) input +of Greek characters with 8-bit TeX and the inputenc package:

+
\usepackage[utf-8]{inputenc}
+\usepackage{alphabeta}
+
+

Conflicts

+

alphabeta does not work if the utf8x input encoding is selected. +(utf8x is an interface to the ucs package which uses a +non-compatible definition of \DeclareUnicodeCharacter.)

+

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

+
+
+
+

Implementation

+
+

Requirements

+

This package extends the textalpha package. +Package options are passed on to textalpha:

+
\RequirePackageWithOptions{textalpha}
+

Just like alphabeta, textalpha is part of greek-fontenc.

+

This package requires the e-TeX extensions (i.e. a not too old TeX +distribution) for the \ifdefined test.

+

It uses the \TextOrMath test from the fixltx2e standard LaTeX package. +fixltx2e is loaded by default since TeXLive 2015. In case of an +\TextOrMath undefined error, load it in the document preamble via

+
\usepackage{fixltx2e}
+
+
+

Postpone the re-definitions

+

To prevent other packages overwriting the re-defined commands we postpone +the next steps until the start of the document body:

+
\AtBeginDocument{
+
+
+

Save math macros

+

Provide an alias for the standard math commands:

+
\let\mathGamma\Gamma
+\let\mathDelta\Delta
+\let\mathTheta\Theta
+\let\mathLambda\Lambda
+\let\mathXi\Xi
+\let\mathPi\Pi
+\let\mathSigma\Sigma
+\let\mathUpsilon\Upsilon
+\let\mathPhi\Phi
+\let\mathPsi\Psi
+\let\mathOmega\Omega
+%
+\let\mathalpha\alpha
+\let\mathbeta\beta
+\let\mathgamma\gamma
+\let\mathdelta\delta
+\let\mathepsilon\epsilon
+\let\mathvarepsilon\varepsilon
+\let\mathzeta\zeta
+\let\matheta\eta
+\let\maththeta\theta
+\let\mathvartheta\vartheta
+\let\mathiota\iota
+\let\mathkappa\kappa
+\let\mathlambda\lambda
+\let\mathmu\mu
+\let\mathnu\nu
+\let\mathxi\xi
+\let\mathpi\pi
+\let\mathvarpi\varpi
+\let\mathrho\rho
+\let\mathvarrho\varrho
+\let\mathsigma\sigma
+\let\mathvarsigma\varsigma
+\let\mathfinalsigma\varsigma
+\let\mathtau\tau
+\let\mathupsilon\upsilon
+\let\mathphi\phi
+\let\mathvarphi\varphi
+\let\mathchi\chi
+\let\mathpsi\psi
+\let\mathomega\omega
+% ``\digamma`` is defined by amsmath, provide a fallback
+\providecommand*{\digamma}{\textit{\textdigamma}}
+\let\mathdigamma\digamma
+
+% \varkappa and \varbeta are defined by some math packages
+\ifdefined\varbeta
+  \let\mathvarbeta\varbeta
+\fi
+\ifdefined\varkappa % e.g. with newtxmath
+  \let\mathvarkappa\varkappa
+\fi
+
+
+

Commands to access Greek letters by name

+

For letters defined in math mode, the commands work in both, text and math.

+

Some Greek letters look identical to Latin letters and can therefore not be +used as variable symbols in math formulas. These letters are not defined in +TeX’s math mode, we provide an alias to the corrsponding \text... +command.

+

Mathematical notation distinguishes variant shape symbols for pi, phi, +rho, theta (small and capital), beta, and kappa (characters for the latter +three symbols are not included in TeX’s math fonts). These variations have +no syntactic meaning in Greek text and are not given code-points in the LGR +encoding while Unicode defines separate code points for the symbol variants.

+

Greek Alphabet:

+

Macros keep their meaning in mathematical mode (i.e. use the same shape as +without this package) and refer to GREEK LETTER … in text. For +\epsilon and phi, this means that the selected symbol variant +differs in text vs. math mode. Use \varepsilon and \varphi (see +section variant shape symbols below) to select the GREEK LETTER …” +in both, text and math mode.

+
\providecommand*{\Alpha}{\textAlpha}
+\providecommand*{\Beta}{\textBeta}
+\renewcommand*{\Gamma}{\TextOrMath{\textGamma}{\mathGamma}}
+\renewcommand*{\Delta}{\TextOrMath{\textDelta}{\mathDelta}}
+\providecommand*{\Epsilon}{\textEpsilon}
+\providecommand*{\Zeta}{\textZeta}
+\providecommand*{\Eta}{\textEta}
+\renewcommand*{\Theta}{\TextOrMath{\textTheta}{\mathTheta}}
+\providecommand*{\Iota}{\textIota}
+\providecommand*{\Kappa}{\textKappa}
+\renewcommand*{\Lambda}{\TextOrMath{\textLambda}{\mathLambda}}
+\providecommand*{\Mu}{\textMu}
+\providecommand*{\Nu}{\textNu}
+\renewcommand*{\Xi}{\TextOrMath{\textXi}{\mathXi}}
+\providecommand*{\Omicron}{\textOmicron}
+\renewcommand*{\Pi}{\TextOrMath{\textPi}{\mathPi}}
+\providecommand*{\Rho}{\textRho}
+\renewcommand*{\Sigma}{\TextOrMath{\textSigma}{\mathSigma}}
+\providecommand*{\Tau}{\textTau}
+\renewcommand*{\Upsilon}{\TextOrMath{\textUpsilon}{\mathUpsilon}}
+\renewcommand*{\Phi}{\TextOrMath{\textPhi}{\mathPhi}}
+\providecommand*{\Chi}{\textChi}
+\renewcommand*{\Psi}{\TextOrMath{\textPsi}{\mathPsi}}
+\renewcommand*{\Omega}{\TextOrMath{\textOmega}{\mathOmega}}
+%
+\renewcommand*{\alpha}{\TextOrMath{\textalpha}{\mathalpha}}
+\renewcommand*{\beta}{\TextOrMath{\textbeta}{\mathbeta}}
+\renewcommand*{\gamma}{\TextOrMath{\textgamma}{\mathgamma}}
+\renewcommand*{\delta}{\TextOrMath{\textdelta}{\mathdelta}}
+\renewcommand*{\epsilon}{\TextOrMath{\textepsilon}{\mathepsilon}} % ε/ϵ
+\renewcommand*{\zeta}{\TextOrMath{\textzeta}{\mathzeta}}
+\renewcommand*{\eta}{\TextOrMath{\texteta}{\matheta}}
+\renewcommand*{\theta}{\TextOrMath{\texttheta}{\maththeta}}
+\renewcommand*{\iota}{\TextOrMath{\textiota}{\mathiota}}
+\renewcommand*{\kappa}{\TextOrMath{\textkappa}{\mathkappa}}
+\renewcommand*{\lambda}{\TextOrMath{\textlambda}{\mathlambda}}
+\renewcommand*{\mu}{\TextOrMath{\textmu}{\mathmu}}
+\renewcommand*{\nu}{\TextOrMath{\textnu}{\mathnu}}
+\renewcommand*{\xi}{\TextOrMath{\textxi}{\mathxi}}
+\providecommand*{\omicron}{\textomicron}
+\renewcommand*{\pi}{\TextOrMath{\textpi}{\mathpi}}
+\renewcommand*{\rho}{\TextOrMath{\textrho}{\mathrho}}
+\renewcommand*{\sigma}{\TextOrMath{\textsigma}{\mathsigma}}
+\renewcommand*{\varsigma}{\TextOrMath{\textvarsigma}{\mathvarsigma}}
+\providecommand*{\finalsigma}{\varsigma}
+\renewcommand*{\tau}{\TextOrMath{\texttau}{\mathtau}}
+\renewcommand*{\upsilon}{\TextOrMath{\textupsilon}{\mathupsilon}}
+\renewcommand*{\phi}{\TextOrMath{\textphi}{\mathphi}}             % ϕ/φ
+\renewcommand*{\chi}{\TextOrMath{\textchi}{\mathchi}}
+\renewcommand*{\psi}{\TextOrMath{\textpsi}{\mathpsi}}
+\renewcommand*{\omega}{\TextOrMath{\textomega}{\mathomega}}
+
+

Archaic letters

+
\renewcommand*{\digamma}{\TextOrMath{\textdigamma}{\mathdigamma}} % ϝ
+\providecommand*{\Digamma}{\textDigamma}     % Ϝ
+\providecommand*{\stigma}{\textstigma}       % ϛ
+\providecommand*{\varstigma}{\textvarstigma} % stigma variant (CB.enc, teubner)
+\providecommand*{\koppa}{\textkoppa}         % ϟ (greek small letter koppa)
+\providecommand*{\qoppa}{\textqoppa}         % ϙ (archaic koppa)
+\providecommand*{\Qoppa}{\textQoppa}         % Ϙ (archaic Koppa)
+\providecommand*{\Stigma}{\textStigma}       % Ϛ (in some fonts ϹΤ ligature)
+\providecommand*{\Sampi}{\textSampi}         % Ϡ
+\providecommand*{\sampi}{\textsampi}         % ϡ
+
+
+

Variant shape symbols

+

TeX’s concept of “standard” vs. “variant” math symbols does not map to the +distinction between GREEK LETTER … vs. GREEK … SYMBOL in the Unicode +standard (see greek-euenc-doc.pdf).

+

The \...symbol macros select the GREEK … SYMBOL in both, text and +math mode. For \epsilonsymbol and \phisymbol this is the default +shape in math mode. The \var... macros select the shape used by TeX +math (or, if not supported, the SYMBOL shape):

+
% ..symbol == var..
+\renewcommand*{\varpi}{\TextOrMath{\textpisymbol}{\mathvarpi}}          % ϖ
+\providecommand*{\pisymbol}{\varpi}                                     % ϖ
+\renewcommand*{\varrho}{\TextOrMath{\textrhosymbol}{\mathvarrho}}       % ϱ
+\providecommand*{\rhosymbol}{\TextOrMath{\textrhosymbol}{\mathvarrho}}  % ϱ
+\renewcommand*{\vartheta}{\TextOrMath{\textthetasymbol}{\mathvartheta}} % ϑ
+\providecommand*{\thetasymbol}{\vartheta}                               % ϑ
+% ..symbol != var..
+\renewcommand*{\varepsilon}{\TextOrMath{\textepsilon}{\mathvarepsilon}} % ε
+\providecommand*{\epsilonsymbol}{\TextOrMath{\textepsilonsymbol}{\mathepsilon}} % ϵ
+\renewcommand*{\varphi}{\TextOrMath{\textphi}{\mathvarphi}}             % φ
+\providecommand*{\phisymbol}{\TextOrMath{\textphisymbol}{\mathphi}}     % ϕ
+% only text (in standard 8-bit TeX, may be defined with additional packages):
+\ifdefined\mathvarbeta
+  \renewcommand*{\varbeta}{\TextOrMath{\textbetasymbol}{\mathvarbeta}}  % ϐ
+\else
+  \providecommand*{\varbeta}{\textbetasymbol}
+\fi
+\providecommand*{\betasymbol}{\varbeta}
+\ifdefined\mathvarkappa                                                 % ϰ
+  \renewcommand*{\varkappa}{\TextOrMath{\textkappasymbol}{\mathvarkappa}}
+\else
+  \providecommand*{\varkappa}{\textkappasymbol}
+\fi
+\providecommand*{\kappasymbol}{\varkappa}
+% \Theta/\varTheta are not a symbol variants but upright/italic shape of Theta
+\providecommand*{\Thetasymbol}{\textThetasymbol}                        % ϴ
+
+
+
+

TextCompositeCommands for the generic macros

+

The NFSS TextComposite mechanism looks for the next token without expanding +it. In order to let compositions like \ensuregreek{\'\Alpha} or +\ensuregreek{\>"\alpha} work as expected we define TextComposites with the +letter name commands. (Composition only works if the active font encoding +is LGR).

+
\ifdefined\XeTeXrevision
+  \input{alphabeta-euenc.def}
+  % \expandafter\endinput % "return"
+\else\ifdefined\luatexversion
+  \input{alphabeta-euenc.def}
+  % \expandafter\endinput % "return"
+\else % 8-bit TeX
+  \input{alphabeta-lgr.def}
+\fi\fi
+
+
+

Re-definition for Greek Unicode input in math mode

+

Check with \ifdefined for the definition of +\DeclareUnicodeCharacter. In contrast to \@ifdefined, this works +without side-effects. It makes the package dependent on the e-TeX +extensions but these are standard in all current TeX distributions anyway.

+

Map Greek characters that are also defined in math mode to the generic +macros:

+
\ifdefined\DeclareUnicodeCharacter
+  \DeclareUnicodeCharacter{0393}{\Gamma}         % Γ
+  \DeclareUnicodeCharacter{0394}{\Delta}         % Δ
+  \DeclareUnicodeCharacter{0398}{\Theta}         % Θ
+  \DeclareUnicodeCharacter{039B}{\Lambda}        % Λ
+  \DeclareUnicodeCharacter{039E}{\Xi}            % Ξ
+  \DeclareUnicodeCharacter{03A0}{\Pi}            % Π
+  \DeclareUnicodeCharacter{03A3}{\Sigma}         % Σ
+  \DeclareUnicodeCharacter{03A5}{\Upsilon}       % Υ
+  \DeclareUnicodeCharacter{03A6}{\Phi}           % Φ
+  \DeclareUnicodeCharacter{03A8}{\Psi}           % Ψ
+  \DeclareUnicodeCharacter{03A9}{\Omega}         % Ω
+
+  \DeclareUnicodeCharacter{03B1}{\alpha}         % α
+  \DeclareUnicodeCharacter{03B2}{\beta}          % β
+  \DeclareUnicodeCharacter{03B3}{\gamma}         % γ
+  \DeclareUnicodeCharacter{03B4}{\delta}         % δ
+  \DeclareUnicodeCharacter{03B5}{\varepsilon}    % ε textepsilon/varepsilon
+  \DeclareUnicodeCharacter{03B6}{\zeta}          % ζ
+  \DeclareUnicodeCharacter{03B7}{\eta}           % η
+  \DeclareUnicodeCharacter{03B8}{\theta}         % θ
+  \DeclareUnicodeCharacter{03B9}{\iota}          % ι
+  \DeclareUnicodeCharacter{03BA}{\kappa}         % κ
+  \DeclareUnicodeCharacter{03BB}{\lambda}        % λ
+  \DeclareUnicodeCharacter{03BC}{\mu}            % μ
+  \DeclareUnicodeCharacter{03BD}{\nu}            % ν
+  \DeclareUnicodeCharacter{03BE}{\xi}            % ξ
+  \DeclareUnicodeCharacter{03C0}{\pi}            % π
+  \DeclareUnicodeCharacter{03C1}{\rho}           % ρ
+  \DeclareUnicodeCharacter{03C2}{\varsigma}      % ς
+  \DeclareUnicodeCharacter{03C3}{\sigma}         % σ
+  \DeclareUnicodeCharacter{03C4}{\tau}           % τ
+  \DeclareUnicodeCharacter{03C5}{\upsilon}       % υ
+  \DeclareUnicodeCharacter{03C6}{\varphi}        % φ textphi/varphi
+  \DeclareUnicodeCharacter{03C7}{\chi}           % χ
+  \DeclareUnicodeCharacter{03C8}{\psi}           % ψ
+  \DeclareUnicodeCharacter{03C9}{\omega}         % ω
+
+  \DeclareUnicodeCharacter{03D1}{\thetasymbol}   % ϑ
+  \DeclareUnicodeCharacter{03D5}{\phisymbol}     % ϕ $\phi$
+  \DeclareUnicodeCharacter{03D6}{\pisymbol}      % ϖ
+  \DeclareUnicodeCharacter{03DD}{\digamma}       % ϝ
+  \DeclareUnicodeCharacter{03F1}{\rhosymbol}     % ϱ
+  \DeclareUnicodeCharacter{03F5}{\epsilonsymbol} % ϵ $\epsilon$
+
+\fi
+
} % close the \AtBeginDocument macro
+ +
+
+
+ + diff --git a/language/greek/greek-fontenc/diacritics.pdf b/language/greek/greek-fontenc/diacritics.pdf new file mode 100644 index 0000000000..e49d902ef7 Binary files /dev/null and b/language/greek/greek-fontenc/diacritics.pdf differ diff --git a/language/greek/greek-fontenc/diacritics.tex b/language/greek/greek-fontenc/diacritics.tex new file mode 100644 index 0000000000..4a6f89d078 --- /dev/null +++ b/language/greek/greek-fontenc/diacritics.tex @@ -0,0 +1,176 @@ +% Test definitions for accents and composite accents in Greek +\documentclass[a4paper,british,polutonikogreek]{article} +\pagestyle{empty} +\usepackage[margin=2.5cm]{geometry} +\usepackage{cmap} % fix search and cut-and-paste in Acrobat Reader + +\usepackage% +{lmodern} +% {gfsartemisia} +% {gfsbaskerville} +% [default]{gfsbodoni} +% [default]{gfscomplutum} +% {gfsdidot} +% [default]{gfsneohellenic} +% {lmodern} \usepackage{gfsporson} \renewcommand*\rmdefault{porson} +% [default]{gfssolomos} +% {kerkis} +% {teubner} +% \renewcommand{\ttdefault}{txtt} + +% Load encoding definitions (after font package) +\usepackage[LGR,T1]{fontenc} +\usepackage{textalpha} + +\usepackage{listings} +\lstset{basicstyle=\ttfamily} + +% Babel package: + +\usepackage{babel} + +% With XeTeX/LuaTeX, load fontspec after babel to use Unicode +% fonts for Latin script and LGR for Greek: +\ifdefined\luatexversion \usepackage{fontspec}\fi +\ifdefined\XeTeXrevision \usepackage{fontspec}\fi + + +% "Lipsiakos" italic font `cbleipzig`: +\newcommand*{\lishape}{\fontencoding{LGR}\fontfamily{cmr}% + \fontshape{li}\selectfont} +\DeclareTextFontCommand{\textli}{\lishape} + + +\begin{document} + +\selectlanguage{british} + +\section*{Greek diacritics with standard accent macros} + +The font encoding definition file \texttt{lgrenc.def} defines LICR macros +for all non-ASCII characters in the LGR font encoding. Greek accent macros +have names starting with \verb|\acc| followed by the Greek accent name as +used in the Unicode standard (e.g. \verb|\acctonos|). The standard symbol +accents \verb|\' \` \~| behave according to Greek typography if used in the +LGR font encoding. + +The \emph{textalpha} or \emph{alphabeta} packages define the symbol macros +\verb|\<| and \verb|\>| as alias for the breathings (Dasia and Psili). With +this, all diacritics can be input as backslash followed +by the LGR transliteration. % +\footnote{This makes it easy to follow the advise in + \emph{teubner-doc}: ``typeset your paper with the regular + accent vowel ligatures and [{\ldots}] substitute them in the + final revision with the accented vowel macros only in those + instances where the lack of kerning is disturbing''.} +\footnote{The definition of the macros + \texttt{\textbackslash<} and \texttt{\textbackslash>} was moved + from the font definition file \texttt{greek-fontenc.def} to + \texttt{textalpha.sty} in order to avoid clashes with local + definitions of this macros in documents using the LGR font + encoding via \emph{fontenc} or \emph{babel}.} + +The example in greek-usage.pdf: +% +\begin{quote} \selectlanguage{greek} + T\'i f\'hic? \enj\'ede pa\~id'' + \>eleuj\'eran t\`ac plhs\'ion N\'umfac stefano\~usan, + S\'wstrate, \>er\~wn \'ap\~hljec e\>uj\'uc? +\end{quote} +can be input as +\begin{lstlisting} + T\'i f\'hic? \enj\'ede pa\~id'' + \>eleuj\'eran t\`ac plhs\'ion N\'umfac stefano\~usan, + S\'wstrate, \>er\~wn \'ap\~hljec e\>uj\'uc? +\end{lstlisting} +% +Improvements over the ligature-based approach in LGR: +% +\begin{itemize} + +\item Accents can be placed on any character:% + \footnote{In babel-greek versions < 1.4, Babel's \emph{polutonikogreek} + option re-defined \textbackslash\textasciitilde (even for + Latin with \textbackslash textlatin). + This document reverted the babel definition in the preamble + to make the tilde/perispomeni-accent work as usual in both, + English (\textgreek{ni\~n\~o} ni\~n\~o) and Greek % + % (\foreignlanguage{greek}{ni\~n\~o \textlatin{ni\~n\~o}}). + .} + \textgreek{\"k \`l \'m \~'p \>9 \`\>-} + +\item Kerning is preserved + \selectlanguage{greek} + \begin{tabular}[t]{llll} + & \textlatin{roman} & \textlatin{italic} & \textlatin{cbleipzig} \\ + \foreignlanguage{british}{accent macro:} & + a\>ut'os & \emph{a\>ut\'os} & \textli{a\>ut\'os} \\ + \foreignlanguage{british}{transliteration:} & + a>ut'os & \emph{a>ut'os} & \textli{a>ut'os}\\ + \end{tabular} + \selectlanguage{british} + + Like in any font encoding, kerning only works with pre-composed glyphs: + \textgreek{A\"UA $\ne$ A\~UA}, AVA $\ne$ A\~VA. + +\item Compatible with hyperref (see greekhyperref.pdf). + +\item Following Greek typesetting convention, diacritics (except the + dialytika) are placed to the left of capital letters and and dropped + by \verb|\MakeUppercase|: + + \begin{quote} \selectlanguage{greek} + \'antropos $\mapsto$ \MakeUppercase{\'antropos}, + \>'antropos $\mapsto$ \MakeUppercase{\>'antropos},\\ + Aqill\'eas $\mapsto$ \MakeUppercase{Aqill\'eas}, + \>Aqille\'us $\mapsto$ \MakeUppercase{\>Aqille\'us}. + \end{quote} + + The dialytika is printed even in cases where it's not needed + in lowercase: % the "hiatus" feature + \begin{quote} \selectlanguage{greek} + \'aulos $\mapsto$ \MakeUppercase{\'aulos}, + \'>aulos $\mapsto$ \MakeUppercase{\'\>aulos}, + % from http://diacritics.typo.cz/index.php?id=69 μάινα -> ΜΑΪΝΑ + m\'aina $\mapsto$ \MakeUppercase{m\'aina},\\ + % from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema + % κέικ, ἀυπνία/αϋπνία + k\'eik, $\mapsto$ \MakeUppercase{k\'eik}, + \>aupn\'ia $\mapsto$ \MakeUppercase{\>aupn\'ia}. + \end{quote} +\end{itemize} + +\selectlanguage{british} Composite diacritics can be specified as +named macro, backslash + LGR transliteration, or combined accent macros, +e.\,g. \textgreek{\~>a} can be written as +\begin{quote} + \verb+\accpsiliperispomeni{a}+, + \verb+\~>a+, \verb+\>~a+, + \verb+\~\>{a}+, or \verb+\~\>a+. +\end{quote} +However, braces in composite accents +(\verb+\~{\>a}+, \verb+\~{>a}+, or \verb+\~{\>{a}}+) +lead to errors. + +\verb+\MakeUppercase+ works with most input variants but fails with a tilde +in a document which does \textbf{not} define the \texttt{greek} or +\texttt{polutonikogreek} language (where the tilde is an active character +denoting a \verb|\nobreakspace|). +Combining ``symbol macros'' (\verb+\>\~+) or reversing the order +(\verb+\~>+) is safe: +\foreignlanguage{greek}{\~>a $\mapsto$ \MakeUppercase{\~>a}}. + +Accent macros can start with \verb|\a| instead of \verb|\| when the +short form is redefined, e.\,g. inside a \emph{tabbing} environment. +This also works for the new-defined Dasia and Psili shortcuts +(\verb|\a<| and \verb|\a>|): +% +\begin{quote} +\selectlanguage{greek} +\begin{tabbing} +T'i f'hic? \= T\a'i f\a'hic? \\ + \a>enj\a'ede pa\a~id +\end{tabbing} +\end{quote} + +\end{document} diff --git a/language/greek/greek-fontenc/greek-euenc-doc.pdf b/language/greek/greek-fontenc/greek-euenc-doc.pdf new file mode 100644 index 0000000000..4f43326dab Binary files /dev/null and b/language/greek/greek-fontenc/greek-euenc-doc.pdf differ diff --git a/language/greek/greek-fontenc/greek-euenc-doc.tex b/language/greek/greek-fontenc/greek-euenc-doc.tex new file mode 100644 index 0000000000..78ed736ef1 --- /dev/null +++ b/language/greek/greek-fontenc/greek-euenc-doc.tex @@ -0,0 +1,852 @@ +\documentclass[a4paper]{article} +% \usepackage{textcomp} +\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref} +\usepackage{bookmark} +% \usepackage{parskip} +\usepackage{booktabs} +\usepackage{amssymb} + +% 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 +% »fontspec« and »textalpha«: +\usepackage[LGR]{fontenc} + +% Unicode font setup: +\usepackage[tuenc]{fontspec} +% \setmainfont{DejaVu Serif} +% \setsansfont{DejaVu Sans} +% \usepackage{libertineotf} +\setmainfont{Linux Libertine O} +\setsansfont{Linux Biolinum O} +\setmainfont{FreeSerif}% +% \setmainfont{Droid Sans} + +% Declare the font encoding and Greek LICR definitions: +\usepackage[normalize-symbols]{textalpha} + +\begin{document} + +\title{Font setup for Greek with XeTeX/LuaTeX} +\author{Günter Milde} +\maketitle + +\noindent +The file \href{greek-euenc.def.html}{greek-euenc.def} provides support for +Greek LICR macros and upcasing of text with XeTeX and LuaTeX. It is +automatically loaded by the \href{textalpha-doc.pdf}{\emph{textalpha}} and +\href{alphabeta-doc.pdf}{\emph{alphabeta}} packages as well as +\href{http://www.ctan.org/pkg/babel-greek}{\emph{babel-greek}} if the font +encoding is set to the Unicode font encoding TU (usually via +the \href{http://www.ctan.org/pkg/fontspec}{\emph{fontspec}} package for +font setup with LuaTeX and XeTeX). + +\tableofcontents + +\section{Requirements} + +\subsection{fontspec} + The \href{http://www.ctan.org/pkg/fontspec}{\emph{fontspec}} package sets + up the TU Unicode font encoding for XeTeX and LuaTeX. However, it does not + include support for the Greek script. + +\subsection{suitable Unicode fonts} +With the XeTeX or LuaTeX engines, the user must ensure that the selected +font contains Greek glyphs (the default Latin Modern fonts have only capital +Greek letters). +There are no errors for missing glyphs, just warnings in the log file (but +not the console output) and empty spaces in the output document. + +Examples for suitable fonts are given in the +\href{http://mirrors.ctan.org/language/greek/greek-fontenc/README.html#TU} +{greek-fontenc README}. + + +\section{Usage} + +\texttt{greek-euenc.def} is usually not loaded directly, but by one of +\href{textalpha-doc.pdf}{\emph{textalpha}}, +\href{alphabeta-doc.pdf}{\emph{alphabeta}}, or \emph{Babel} (with the +language option \href{http://www.ctan.org/pkg/babel-greek}{greek}). If these +packages are loaded after +\href{http://www.ctan.org/pkg/fontspec}{\emph{fontspec}}, Unicode font setup +is amended for use of the Greek script. + +\section{LICR input} + +The LaTeX internal character representation (LICR) is a verbose, +fail-safe 7-bit ASCII encoding that can be used unaltered under both, 8-bit +TeX and XeTeX/LuaTeX. Use cases are macro definitions and generated text. + +See the source of this document, +\href{greek-euenc-doc.tex}{\texttt{greek-euenc-doc.tex}} for the input used +in the examples below. + +\subsection{Greek alphabet} + +Greek letters via LICR macros: +\begin{quote} + \textAlpha{} \textBeta{} \textGamma{} \textDelta{} \textEpsilon{} + \textZeta{} \textEta{} \textTheta{} \textIota{} \textKappa{} + \textLambda{} \textMu{} \textNu{} \textXi{} \textOmicron{} \textPi{} + \textRho{} \textSigma{} \textTau{} \textUpsilon{} \textPhi{} + \textChi{} \textPsi{} \textOmega{} + + \textalpha{} \textbeta{} \textgamma{} \textdelta{} \textepsilon{} + \textzeta{} \texteta{} \texttheta{} \textiota{} \textkappa{} + \textlambda{} \textmu{} \textnu{} \textxi{} \textomicron{} \textpi{} + \textrho{} \textsigma{} \texttau{} \textupsilon{} + \textphi{} \textchi{} \textpsi{} \textomega{} +\end{quote} +The small sigma is set with a different +glyph if it ends a word: +\begin{quote} + \textsigma{} \verb|textsigma|\\ + \textfinalsigma{} \verb|textfinalsigma| or \verb|textvarsigma| +\end{quote} +The \verb|\textautosigma| macro, which automatically chooses the +glyph according to the position, is not implemented for Unicode fonts. + +\subsection{Diacritics} + +Greek diacritics can be input by named macro or symbol macro: +\begin{quote} + \acctonos\textalpha \'\textalpha{} \acctonos x\'x + \accvaria\textalpha \`\textalpha{} \accvaria x\`x + \accdialytika\textiota \"\textiota{} \accdialytika x\"x + \accperispomeni\textalpha \~\textalpha{} \accperispomeni x\~x + \accpsili\textalpha \>\textalpha{} \accpsili x\>x + \accdasia\textalpha \<\textalpha{} \accdasia x\α + \accdasia α \<α +\end{quote} + + +\subsubsection{perispomeni vs. tilde} + +The Greek \emph{perispomeni} has the look of a tilde but the semantic +of a circumflex accent. +The ``named'' \verb|\accperispomeni| macro uses COMBINING GREEK PERISPOMENI, +while the standard tilde-accent macro \verb|\~| uses the COMBINING TILDE +which is not normalized to GREEK LETTER ... WITH PERISPOMENI +characters. + +Composite definitions for \verb|\~| select the pre-composed character: + +\begin{quote} + \~α = ᾶ, \~η = ῆ, \~ι = ῖ, \~υ = ῦ, \~ω = ῶ +\end{quote} + + +\subsubsection{combined diacritics} + +Combined accents are defined using combining diacritical characters. + +\begin{quote} +\accdialytikatonos\textiota{} \"'\textiota{} \"\'\textiota{} +\accdialytikatonos x \"'x \"\'x +\accdialytikavaria\textiota{} \"`\textiota{} \"\`\textiota{} +\accdialytikavaria x \"`x \"\`x +\accdialytikaperispomeni\textiota{} \~"\textiota{} \~\"\textiota{} +\accdialytikaperispomeni x \~"x \~\"x + +\accdasiaoxia\textiota{} \<'\textiota{} \<\'\textiota{} +\accdasiaoxia x \<'x \<\'x +\accdasiavaria\textiota{} \<`\textiota{} \<\`\textiota{} +\accdasiavaria x \<`x \<\`x +\accdasiaperispomeni\textiota{} \~<\textiota{} \~\<\textiota{} +\accdasiaperispomeni x \~'\textiota{} \>\'\textiota{} +\accpsilioxia x \>'x \>\'x +\accpsilivaria\textiota{} \>`\textiota{} \>\`\textiota{} +\accpsilivaria x \>`x \>\`x +\accpsiliperispomeni\textiota{} \~>\textiota{} \~\>\textiota{} +\accpsiliperispomeni x \~>x \~\>x +\end{quote} +Composite diacritics overlap when they are not normalized to a pre-composed +character. However, this is not a major problem in the real world, as +pre-composed characters exist in Unicode for all letters that are actually +used in (ancient, polytonic or monotonoc) Greek. + + +\subsubsection{sub-iota} + +The sub-iota (ypogegrammeni/prosgegrammeni) is input after the base letter. + + +\begin{quote} +\verb|\prosgegrammeni| sets a spacing GREEK PROSGEGRAMMENI: + \textAlpha\prosgegrammeni{} K\prosgegrammeni{}. + +\verb|\ypogegrammeni| sets a COMBINING GREEK YPOGEGRAMMENI. \\ +A Greek capital letter followed by COMBINING GREEK YPOGEGRAMMENI is +normalized to the corresponding GREEK CAPITAL LETTER ... WITH [.. AND] +PROSGEGRAMMENI), if a mapping exists in the Unicode standard: +\textalpha\ypogegrammeni{} k\ypogegrammeni{} \textAlpha\ypogegrammeni{} +K\ypogegrammeni{}. +\end{quote} + +\subsection{Additional Greek symbols} + +\subsubsection{symbols for Greek numbers} + +\begin{quote} +\textkoppa{} textkoppa \\ % ϟ +\textKoppa{} textKoppa \\ % Ϟ +\textqoppa{} textqoppa (archaic koppa) \\ % ϙ +\textQoppa{} textQoppa (archaic Koppa) \\ % Ϙ +\textstigma{} textstigma \\ % ϛ +% \textvarstigma{} textvarstigma \\ % no separate Unicode character +\textStigma{} textStigma (Sigma-Tau-Ligature in CB-fonts)% +\footnote{the name “stigma” originally applied to a medieval sigma-tau + ligature, whose shape was confusingly similar to the cursive + digamma} \\ % Ϛ +\textsampi{} textsampi \\ % ϡ +\textSampi{} textSampi \\ % Ϡ +\textdigamma{} textdigamma \\ % ϝ (\digamma used by amsmath!) +\textDigamma{} textDigamma \\ % Ϝ +% numeral signs: http://en.wikipedia.org/wiki/Greek_numerals +\textdexiakeraia{} textdexiakeraia \\ % ʹ +\textaristerikeraia{} textaristerikeraia \\ % ͵ +\end{quote} + +\subsubsection{symbol variants} + +Mathematical notation uses variant shapes of some Greek letters as +additional symbols. The variations have no syntactic meaning in Greek text +and text fonts may use the variant shapes in place of the “regular” ones as +a stylistic choice. + +Unicode defines separate code points for the symbol variants. TeX supports +some of the variant shape symbols in mathematical mode, but its concept of +“standard” vs. “variant” symbols differs from the distinction between +“GREEK LETTER ...” vs. “GREEK ... SYMBOL” in the Unicode standard (see +Table \ref{tab:symbol-variants}). + +\begin{table}[tbp] + \centering + \begin{tabular}{cccc} + \hline + \multicolumn{2}{c}{TeX math} & \multicolumn{2}{c}{Unicode} \\ + symbol & var symbol & “letter” & “symbol” \\ + \hline + $\pi$ & $\varpi$ & π & ϖ \\ + $\rho$ & $\varrho$ & ρ & ϱ \\ + $\theta$ & $\vartheta$ & θ & ϑ \\ + \hline + $\epsilon$ & $\varepsilon$ & ε & ϵ \\ + $\phi$ & $\varphi$ & φ & ϕ \\ + \hline + $\beta$ & \emph{missing} & β & ϐ \\ + $\kappa$ & \emph{missing} & κ & ϰ \\ + $\Theta$ & \emph{missing} & Θ & ϴ \\ + \hline + \end{tabular} + \caption{Greek symbol variants in TeX and Unicode} + \label{tab:symbol-variants} +\end{table} + +\texttt{greek-euenc.def} defines three TextCommands for each of these +letters: +\begin{quote} + \verb|\text| selects the Unicode GREEK LETTER ... variant, + + \verb|\textsymbol| selects the Unicode + GREEK ... SYMBOL variant, + + \verb|\textvar| selects the variant + shape according to TeX' mathematical mode +\end{quote} +See Table \ref{tab:symbol-variant-macros} for the full list. The +\href{alphabeta-doc.pdf}{\emph{alphabeta}} package defines short macros that +work in text and math mode. + +\begin{table}[tbp] + \centering + \begin{tabular}{lclc} + \hline + \multicolumn{2}{c}{text} & \multicolumn{2}{c}{mathematics} \\ + macro & output & macro & output \\ + \hline + \verb$\textpi$ & \textpi & \verb$\pi$ & $\pi$ \\ + \verb$\textvarpi$ & \textvarpi & \verb$\varpi$ & $\varpi$ \\ + \verb$\textpisymbol$ & \textpisymbol & & \\ + \hline + \verb$\textrho$ & \textrho & \verb$\rho$ & $\rho$ \\ + \verb$\textvarrho$ & \textvarrho & \verb$\varrho$ & $\varrho$ \\ + \verb$\textrhosymbol$ & \textrhosymbol & & \\ + \hline + \verb$\texttheta$ & \texttheta & \verb$\theta$ & $\theta$ \\ + \verb$\textvartheta$ & \textvartheta & \verb$\vartheta$ & $\vartheta$ \\ + \verb$\textthetasymbol$ & \textthetasymbol & & \\ + \hline + \verb$\textepsilon$ & \textepsilon & \verb$\epsilon$ & $\epsilon$ \\ + \verb$\textvarepsilon$ & \textvarepsilon & \verb$\varepsilon$ & $\varepsilon$ \\ + \verb$\textepsilonsymbol$ & \textepsilonsymbol & & \\ + \hline + \verb$\textphi$ & \textphi & \verb$\phi$ & $\phi$ \\ + \verb$\textvarphi$ & \textvarphi & \verb$\varphi$ & $\varphi$ \\ + \verb$\textphisymbol$ & \textphisymbol & & \\ + \hline + \verb$\textbeta$ & \textbeta & \verb$\beta$ & $\beta$ \\ + \verb$\textvarbeta$ & \textvarbeta & \emph{missing} & \\ + \verb$\textbetasymbol$ & \textbetasymbol & & \\ + \hline + \verb$\textkappa$ & \textkappa & \verb$\kappa$ & $\kappa$ \\ + \verb$\textvarkappa$ & \textvarkappa & \verb$\varkappa$ & $\varkappa$ \\ + \verb$\textkappasymbol$ & \textkappasymbol & & \\ + \hline + \verb$\textTheta$ & \textTheta & \verb$\Theta$ & $\Theta$ \\ + \verb$\textvarTheta$ & \textvarTheta & \emph{missing} & \\ + \verb$\textThetasymbol$ & \textThetasymbol & & \\ + \hline + \end{tabular} + \caption{Macros for Greek symbol variants} + \label{tab:symbol-variant-macros} +\end{table} + +\subsubsection{Ancient Greek Numbers} + +Ancient Greek Numbers are missing in most fonts (including Libertine and +Deja Vu). The “FreeSerif” font works fine: +\begin{quote} +\textpentedeka % GREEK ACROPHONIC ATTIC FIFTY +\textpentehekaton % GREEK ACROPHONIC ATTIC FIVE HUNDRED +\textpenteqilioi % GREEK ACROPHONIC ATTIC FIVE THOUSAND +\textpentemuria % GREEK ACROPHONIC ATTIC FIFTY THOUSAND +\end{quote} +If the LGR font encoding is loaded via «fontenc» in the document preamble, +Ancient Greek Numbers (as well as any other character) from LGR encoded +8-bit TeX fonts can be used after a font-encoding switch. babel-greek +defines the \verb|\textgreek| command for this purpose. +\providecommand*{\textgreek}[1]{\leavevmode{% + \fontfamily{cmr}\fontencoding{LGR}\selectfont#1}% +} +\begin{quote} +\textgreek{ +\textpentedeka % GREEK ACROPHONIC ATTIC FIFTY +\textpentehekaton % GREEK ACROPHONIC ATTIC FIVE HUNDRED +\textpenteqilioi % GREEK ACROPHONIC ATTIC FIVE THOUSAND +\textpentemuria % GREEK ACROPHONIC ATTIC FIFTY THOUSAND +} +\end{quote} + +\section{Latin transcription} + +The Latin transcription known from LGR encoded 8-bit fonts% +\footnote{ See the \href{http://www.ctan.org/pkg/teubner}{teubner} package +or the file usage.pdf from the +\href{http://www.ctan.org/pkg/babel-greek}{\emph{babel-greek}} package for a +description.} +does not work with Unicode fonts. + +It is possible to set up LGR encoded fonts parallel to Unicode fonts (see +the preamble of the source file \url{greek-euenc-doc.tex} for an example). +The \verb|\textgreek| macro can then be used for the input of Greek letters +via the \emph{Latin transcription}, e.g. «logos» becomes «\textgreek{logos}» +and «\verb|\>aupn\'ia|» becomes «\textgreek{\>aupn\'ia}». + +Mark that you cannot use Unicode input with LGR encoded fonts except when +running in 8-bit compatibility mode. +LICR macros work in both, Unicode font encoding and LGR: compare + \>\textIota\textalpha\textnu\textomicron\textupsilon\textalpha + \textrho\acctonos\textiota\textomicron\textupsilon{} +(Unicode font set up via fontspec) vs. +\textgreek{\>\textIota\textalpha\textnu\textomicron\textupsilon\textalpha + \textrho\acctonos\textiota\textomicron\textupsilon} +(LGR-encoded 8-bit font set up via NFSS commands). + + +\section{UPPERCASE and lowercase} + +Capital Greek letters have Greek diacritics (except the dialytika and +sub-iota) to the left (instead of above) and drop them if text is set in +UPPERCASE, e.g. +\ensuregreek{μαΐστρος $\mapsto$ \MakeUppercase{μαΐστρος}}. + +The uccode/lccode corrections (taken from Apostolos Syropoulos xgreek +package) ensure dropping of accents with \verb|\MakeUppercase| for literal +Unicode characters. + +@uclclist additions ensure that upcasing also drops Greek diacritics. +However, when the tonos, varia, and perispomeni accents +are input using the symbol macros (\verb|\' \` \~|), this does not work, as +they cannot be distinguished from Latin acute, grave, and tilde accents.% +\footnote{This might be fixed with \textbackslash accACUTE, + \textbackslash accGRAVE, and \textbackslash accTILDE definitions + with corresponding @uclclist entries and composite definitions.} +If these accents should be dropped by MakeUppercase, they must be input as +named macro: + +\begin{quote} +\acctonos\textalpha \'\textalpha{} \acctonos a\'a +\accvaria\textalpha \`\textalpha{} \accvaria a\`a +$\mapsto$ +\MakeUppercase{ +\acctonos\textalpha \'\textalpha{} \acctonos a\'a +\accvaria\textalpha \`\textalpha{} \accvaria a\`a +} +\end{quote} + +\subsubsection{hiatus} + +Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if placed on +the first vowel of a diphtong (άι, άυ, έι, ἄι, ἄυ, ἔι). A dialytika must be +placed on the second vowel if they are dropped. + +The «hiatus» feature works with macro input: +\begin{quote} + % from teubner: άυλος/ΑΫΛΟΣ + \acctonos\textalpha\textupsilon λος $\mapsto$ + \MakeUppercase{\acctonos\textalpha\textupsilon λος}, + \accpsilioxia\textalpha\textupsilon λος $\mapsto$ + \MakeUppercase{\accpsilioxia\textalpha\textupsilon λος}, + + % from http://diacritics.typo.cz/index.php?id=69 μάινα -> ΜΑΪΝΑ + m\acctonos\textalpha\textiota να $\mapsto$ + \MakeUppercase{m\acctonos\textalpha\textiota να}, + % from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema + % κέικ, ἀυπνία/αϋπνία + \textkappa\acctonos\textepsilon\textiota\textkappa $\mapsto$ + \MakeUppercase{\textkappa\acctonos\textepsilon\textiota\textkappa}, + \accpsili\textalpha\textupsilon πνία $\mapsto$ + \MakeUppercase{\accpsili\textalpha\textupsilon πνία}. +\end{quote} + +It does not work with Unicode literals: +\begin{quote} + άι, άυ, έι, ἄι, ἄυ, ἔι $\mapsto$ \MakeUppercase{άι, άυ, έι, ἄι, ἄυ, ἔι} +\end{quote} + +or accent-macro + Unicode literals (yet?): +\begin{quote} + \acctonos αι, \acctonos αυ, \acctonos ει, \'>αι, \'>αυ, \'>ει + $\mapsto$ + \MakeUppercase{\acctonos αι, \acctonos αυ, \acctonos ει, \'>αι, \'>αυ, \'>ει} +\end{quote} + +\section{Character Tables} + +The following tables list the Greek Unicode characters. In the input, the +LICR macro is followed by the corresponding literal Unicode character. + +\subsection{Greek and Coptic Unicode block} + +Seldom used characters that are not part of LGR encoded TeX fonts have no +LICR definition: + +\newcommand{\greekandcoptic}{ +% NR Unicode Name % babel name, UCS name +% 0370 GREEK CAPITAL LETTER HETA % Ͱ +% 0371 GREEK SMALL LETTER HETA % ͱ +% 0372 GREEK CAPITAL LETTER ARCHAIC SAMPI % Ͳ +% 0373 GREEK SMALL LETTER ARCHAIC SAMPI % Ͳ +\textnumeralsigngreek ʹ % \anwtonos, \textdexiakeraia +\textnumeralsignlowergreek ͵ % \katwtonos, \textaristerikeraia, +% 0376 GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA % Ͷ +% 0377 GREEK SMALL LETTER PAMPHYLIAN DIGAMMA % ͷ +{ }\ypogegrammeni ͺ % \textsubiota{\empty} +% 037B GREEK SMALL REVERSED LUNATE SIGMA SYMBOL % +% 037C GREEK SMALL DOTTED LUNATE SIGMA SYMBOL % +% 037D GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL % +\texterotimatiko ; % \textquestion + +\acctonos{ } % ΄ +\"'{ } % ΅ +\'\textAlpha Ά +\textanoteleia · % \anoteleia +\'\textEpsilon Έ +\'\textEta Ή +\'\textIota Ί +\'\textOmicron Ό +\'\textUpsilon Ύ +\'\textOmega Ώ + +\'"\textiota ΐ +\textAlpha Α +\textBeta Β +\textGamma Γ +\textDelta Δ +\textEpsilon Ε +\textZeta Ζ +\textEta Η +\textTheta Θ +\textIota Ι +\textKappa Κ +\textLambda Λ +\textMu Μ +\textNu Ν +\textXi Ξ +\textOmicron Ο + +\textPi Π +\textRho Ρ +\textSigma Σ +\textTau Τ +\textUpsilon Υ +\textPhi Φ +\textChi Χ +\textPsi Ψ +\textOmega Ω +\"\textIota Ϊ +\"\textUpsilon Ϋ +\'\textalpha ά +\'\textepsilon έ +\'\texteta ή +\'\textiota ί + +\"'\textupsilon ΰ +\textalpha α +\textbeta β +\textgamma γ +\textdelta δ +\textepsilon ε +\textzeta ζ +\texteta η +\texttheta θ +\textiota ι +\textkappa κ +\textlambda λ +\textmu μ % \textmugreek +\textnu ν +\textxi ξ +\textomicron ο + +\textpi π +\textrho ρ +\textvarsigma ς +\textsigma σ +\texttau τ +\textupsilon υ +\textphi φ +\textchi χ +\textpsi ψ +\textomega ω +\"\textiota ϊ +\"\textupsilon ϋ +\'\textomicron ό +\'\textupsilon ύ +\'\textomega ώ + +ϐ ϑ ϒ ϓ ϔ ϕ ϖ %ϗ +\textQoppa Ϙ +\textqoppa ϙ +\textStigma Ϛ +\textstigma ϛ +\textDigamma Ϝ +\textdigamma ϝ +\textKoppa Ϟ % \textKoppagreek +\textkoppa ϟ % \koppa, \textqoppa [sic!] + +\textSampi Ϡ +\textsampi ϡ + +% Ϣ ϣ Ϥ ϥ Ϧ ϧ Ϩ ϩ Ϫ ϫ Ϭ ϭ Ϯ ϯ + +ϰ ϱ ϲ +% ϳ +ϴ ϵ ϶ +% Ϸ ϸ +Ϲ +% Ϻ ϻ ϼ +Ͻ Ͼ Ͽ +} + +\greekandcoptic + +\noindent MakeUppercase: + +\MakeUppercase{\greekandcoptic} + +\noindent MakeLowercase: + +\MakeLowercase{\greekandcoptic} + +The lowercase of Σ is σ (GREEK SMALL LETTER SIGMA).\footnote{% +With LICRs, it is \texttt{\textbackslash textautosigma}.} +The lowercase of Ϛ (GREEK LETTER STIGMA) is \MakeLowercase{Ϛ}. + + + +\subsection{Greek Extended Unicode block} + +There are no LICR definitions for spacing diacritical characters. + +% \accvaria\textalpha ὰ +% \accoxia\textalpha ά + + +\newcommand{\greekextended}{ +\>\textalpha ἀ +\<\textalpha ἁ +\>`\textalpha ἂ +\<`\textalpha ἃ +\>'\textalpha ἄ +\<'\textalpha ἅ +\~>\textalpha ἆ +\~<\textalpha ἇ +\>\textAlpha Ἀ +\<\textAlpha Ἁ +\>`\textAlpha Ἂ +\<`\textAlpha Ἃ +\>'\textAlpha Ἄ +\<'\textAlpha Ἅ +\~>\textAlpha Ἆ +\~<\textAlpha Ἇ + +\>\textepsilon ἐ +\<\textepsilon ἑ +\>`\textepsilon ἒ +\<`\textepsilon ἓ +\>'\textepsilon ἔ +\<'\textepsilon ἕ +\>\textEpsilon Ἐ +\<\textEpsilon Ἑ +\>`\textEpsilon Ἒ +\<`\textEpsilon Ἓ +\>'\textEpsilon Ἔ +\<'\textEpsilon Ἕ + +\>\texteta ἠ +\<\texteta ἡ +\>`\texteta ἢ +\<`\texteta ἣ +\>'\texteta ἤ +\<'\texteta ἥ +\~>\texteta ἦ +\~<\texteta ἧ +\>\textEta Ἠ +\<\textEta Ἡ +\>`\textEta Ἢ +\<`\textEta Ἣ +\>'\textEta Ἤ +\<'\textEta Ἥ +\~>\textEta Ἦ +\~<\textEta Ἧ + +\>\textiota ἰ +\<\textiota ἱ +\>`\textiota ἲ +\<`\textiota ἳ +\>'\textiota ἴ +\<'\textiota ἵ +\~>\textiota ἶ +\~<\textiota ἷ +\>\textIota Ἰ +\<\textIota Ἱ +\>`\textIota Ἲ +\<`\textIota Ἳ +\>'\textIota Ἴ +\<'\textIota Ἵ +\~>\textIota Ἶ +\~<\textIota Ἷ + +\>\textomicron ὀ +\<\textomicron ὁ +\>`\textomicron ὂ +\<`\textomicron ὃ +\>'\textomicron ὄ +\<'\textomicron ὅ +\>\textOmicron Ὀ +\<\textOmicron Ὁ +\>`\textOmicron Ὂ +\<`\textOmicron Ὃ +\>'\textOmicron Ὄ +\<'\textOmicron Ὅ + +\>\textupsilon ὐ +\<\textupsilon ὑ +\>`\textupsilon ὒ +\<`\textupsilon ὓ +\>'\textupsilon ὔ +\<'\textupsilon ὕ +\~>\textupsilon ὖ +\~<\textupsilon ὗ +\<\textUpsilon Ὑ +\<`\textUpsilon Ὓ +\<'\textUpsilon Ὕ +\~<\textUpsilon Ὗ + +\>\textomega ὠ +\<\textomega ὡ +\>`\textomega ὢ +\<`\textomega ὣ +\>'\textomega ὤ +\<'\textomega ὥ +\~>\textomega ὦ +\~<\textomega ὧ +\>\textOmega Ὠ +\<\textOmega Ὡ +\>`\textOmega Ὢ +\<`\textOmega Ὣ +\>'\textOmega Ὤ +\<'\textOmega Ὥ +\~>\textOmega Ὦ +\~<\textOmega Ὧ + +\accvaria\textalpha ὰ +\accoxia\textalpha ά +\accvaria\textepsilon ὲ +\accoxia\textepsilon έ +\accvaria\texteta ὴ +\accoxia\texteta ή +\accvaria\textiota ὶ +\accoxia\textiota ί +\accvaria\textomicron ὸ +\accoxia\textomicron ό +\accvaria\textupsilon ὺ +\accoxia\textupsilon ύ +\accvaria\textomega ὼ +\accoxia\textomega ώ + +\>\textalpha\ypogegrammeni ᾀ +\<\textalpha\ypogegrammeni ᾁ +\>`\textalpha\ypogegrammeni ᾂ +\<`\textalpha\ypogegrammeni ᾃ +\>'\textalpha\ypogegrammeni ᾄ +\<'\textalpha\ypogegrammeni ᾅ +\~>\textalpha\ypogegrammeni ᾆ +\~<\textalpha\ypogegrammeni ᾇ +\>\textAlpha\ypogegrammeni ᾈ +\<\textAlpha\ypogegrammeni ᾉ +\>`\textAlpha\ypogegrammeni ᾊ +\<`\textAlpha\ypogegrammeni ᾋ +\>'\textAlpha\ypogegrammeni ᾌ +\<'\textAlpha\ypogegrammeni ᾍ +\~>\textAlpha\ypogegrammeni ᾎ +\~<\textAlpha\ypogegrammeni ᾏ + +\>\texteta\ypogegrammeni ᾐ +\<\texteta\ypogegrammeni ᾑ +\>`\texteta\ypogegrammeni ᾒ +\<`\texteta\ypogegrammeni ᾓ +\>'\texteta\ypogegrammeni ᾔ +\<'\texteta\ypogegrammeni ᾕ +\~>\texteta\ypogegrammeni ᾖ +\~<\texteta\ypogegrammeni ᾗ +\>\textEta\ypogegrammeni ᾘ +\<\textEta\ypogegrammeni ᾙ +\>`\textEta\ypogegrammeni ᾚ +\<`\textEta\ypogegrammeni ᾛ +\>'\textEta\ypogegrammeni ᾜ +\<'\textEta\ypogegrammeni ᾝ +\~>\textEta\ypogegrammeni ᾞ +\~<\textEta\ypogegrammeni ᾟ + +\>\textomega\ypogegrammeni ᾠ +\<\textomega\ypogegrammeni ᾡ +\>`\textomega\ypogegrammeni ᾢ +\<`\textomega\ypogegrammeni ᾣ +\>'\textomega\ypogegrammeni ᾤ +\<'\textomega\ypogegrammeni ᾥ +\~>\textomega\ypogegrammeni ᾦ +\~<\textomega\ypogegrammeni ᾧ +\>\textOmega\ypogegrammeni ᾨ +\<\textOmega\ypogegrammeni ᾩ +\>`\textOmega\ypogegrammeni ᾪ +\<`\textOmega\ypogegrammeni ᾫ +\>'\textOmega\ypogegrammeni ᾬ +\<'\textOmega\ypogegrammeni ᾭ +\~>\textOmega\ypogegrammeni ᾮ +\~<\textOmega\ypogegrammeni ᾯ + +\u\textalpha ᾰ +\=\textalpha ᾱ +\accvaria\textalpha\ypogegrammeni ᾲ +\textalpha\ypogegrammeni ᾳ +\accoxia\textalpha\ypogegrammeni ᾴ +\~\textalpha ᾶ +\~\textalpha\ypogegrammeni ᾷ +\u\textAlpha Ᾰ +\=\textAlpha Ᾱ +\accvaria\textAlpha Ὰ +\accoxia\textAlpha Ά +\textAlpha\ypogegrammeni ᾼ +\>{ } ᾽ +{ }\prosgegrammeni ι +\>{ } ᾿ + +\accperispomeni\textcompwordmark ῀ +\"\~{ } ῁ +\accvaria\texteta\ypogegrammeni ῂ +\texteta\ypogegrammeni ῃ +\accoxia\texteta\ypogegrammeni ῄ +\~\texteta ῆ +\~\texteta\ypogegrammeni ῇ +\accvaria\textEpsilon Ὲ +\accoxia\textEpsilon Έ +\accvaria\textEta Ὴ +\accoxia\textEta Ή +\textEta\ypogegrammeni ῌ +\>`{ } ῍ +\>'{ } ῎ +\~>{ } ῏ + +\u\textiota ῐ +\=\textiota ῑ +\`"\textiota ῒ +\'"\textiota ΐ +\~\textiota ῖ +\~"\textiota ῗ +\u\textIota Ῐ +\=\textIota Ῑ +\accvaria\textIota Ὶ +\accoxia\textIota Ί +\<`{ } ῝ +\>'{ } ῞ +\~<{ } ῟ + +\u\textupsilon ῠ +\=\textupsilon ῡ +\`"\textupsilon ῢ +\'"\textupsilon ΰ +\>\textrho ῤ +\<\textrho ῥ +\~\textupsilon ῦ +\~"\textupsilon ῧ +\u\textUpsilon Ῠ +\=\textUpsilon Ῡ +\accvaria\textUpsilon Ὺ +\accoxia\textUpsilon Ύ +\<\textRho Ῥ +\`"{ } ῭ +\'"{ } ΅ +\accvaria{ } ` + +\accvaria\textomega\ypogegrammeni ῲ +\textomega\ypogegrammeni ῳ +\accoxia\textomega\ypogegrammeni ῴ +\~\textomega ῶ +\~\textomega\ypogegrammeni ῷ +\accvaria\textOmicron Ὸ +\accoxia\textOmicron Ό +\accvaria\textOmega Ὼ +\accoxia\textOmega Ώ +\textOmega\ypogegrammeni ῼ +\accoxia{ } ´ +\<{ } ῾ +} + +\greekextended + +\noindent MakeUppercase: + +\MakeUppercase{\greekextended} + +\noindent MakeLowercase: + +\MakeLowercase{\greekextended} + + +\end{document} diff --git a/language/greek/greek-fontenc/greek-euenc.def b/language/greek/greek-fontenc/greek-euenc.def new file mode 100644 index 0000000000..b48535fe30 --- /dev/null +++ b/language/greek/greek-fontenc/greek-euenc.def @@ -0,0 +1,881 @@ +% greek-euenc.def +% +++++++++++++++ +% Greek LICR definitions for XeTeX and LuaTeX +% ******************************************* +% +% :Copyright: © 2013 Günter Milde +% :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: +% :: + +\ProvidesFile{greek-euenc.def} +[2018/01/06 0.13.3 Greek LICRs for XeTeX and LuaTeX] + +% :abstract: +% Experimental support for Greek LICR macros with XeTeX and LuaTeX. +% Extends euenc_. Used by babel-greek_ and textalpha_. +% +% **History**: +% .. class:: borderless +% +% ====== ========== ======================================================== +% 0.1 2013-07-16 initial version +% 0.1.1 2013-07-18 bugfix: wrong breathings psilioxia -> dasiaoxia +% 0.1.2 2013-07-19 bugfix: Disable composite defs starting with char macro, +% .. fix "hiatus" handling. +% 0.1.3 2013-07-24 fix "input" path. +% 0.1.4 2013-10-01 remove clashing defs for legacy characters with oxia, +% .. fix upcasing of ``\finalsigma``. +% 0.11.1 2013-12-01 fix identification. +% 0.11.2 2014-09-08 ``\textKoppa`` macro +% .. (Capital Koppa is not defined in LGR but Unicode). +% 0.12 2014-12-12 Remove symbol macros for breathing accents. +% 0.13 2015-08-07 ``\lccode``/``\uccode`` corrections from xgreek_. +% .. LICR macros for symbol variants. +% 0.13.3 2018-01-06 Documentation update. +% ====== ========== ======================================================== +% +% .. contents:: +% +% Motivation +% ========== +% +% LICR macro definitions for the Greek script are missing in both, xunicode_ +% and euenc_. +% +% This file expands the font encoding definition files ``eu1enc.def`` rsp. +% ``eu2enc.def`` from euenc_ defining `LaTeX Internal Character +% Representaction` (LICR) macros for Greek letters and symbols. It works +% independed of xunicode_ using the standard commands for `LaTeX2e font +% selection`_. +% +% Requirements +% ============ +% +% Requires XeTeX or LuaTeX, fontspec_, and a font with Greek characters. +% +% See ``_ and ``_ for setup and +% usage examples. +% +% +% Greek Diacritics +% ================ +% +% Define "named macros" for simple and combined diacritics. +% +% * Named accent macros can be used instead of the ``\@tabacckludge`` by +% to-LaTeX converters to ensure working also inside the tabbing environment. +% +% * Named macros are required for upcasing according to Greek typesetting +% conventions and in the definition of composite commands. +% +% Greek alias names for standard accents:: + +\DeclareTextCommand{\acctonos}{\LastDeclaredEncoding}{\@tabacckludge'} +\DeclareTextCommand{\accvaria}{\LastDeclaredEncoding}{\@tabacckludge`} +\DeclareTextCommand{\accdialytika}{\LastDeclaredEncoding}{\@tabacckludge"} + +% The combining perispomeni character is normalized with Greek base letters, +% while the (standard) combining tilde is not:: + +\DeclareTextCommand{\accperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 } + +% Breathings: +% +% (The COMBINING GREEK KORONIS is a legacy character, discarded in favour of +% COMBINING COMMA ABOVE) :: + +\DeclareTextCommand{\accpsili}{\LastDeclaredEncoding}[1]{#1\char"0313 } % ψιλή spiritus lenis (smooth breathing) +\DeclareTextCommand{\accdasia}{\LastDeclaredEncoding}[1]{#1\char"0314 } % δασεῖα spiritus asper (rough breathing) + + +% Sub-iota: +% +% ``\ypogegrammeni`` is a postfix accent (ligature in LGR) :: + +\DeclareTextSymbol{\ypogegrammeni}{\LastDeclaredEncoding}{0837} % COMBINING GREEK YPOGEGRAMMENI + +% Combined diacritics:: + +% The COMBINING DIALYTIKA TONOS is discarded and not well supported by fonts: +\DeclareTextCommand{\accdialytikatonos}{\LastDeclaredEncoding}[1]{#1\char"0308 \char"0301 } +\DeclareTextCommand{\accdialytikavaria}{\LastDeclaredEncoding}[1]{#1\char"0308 \char"0300 } +\DeclareTextCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 \char"0308 } + +\DeclareTextCommand{\accdasiaoxia}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0301 } +\DeclareTextCommand{\accdasiavaria}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0300 } +\DeclareTextCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0342 } + +\DeclareTextCommand{\accpsilioxia}{\LastDeclaredEncoding}[1]{#1\char"0301 \char"0313 } +\DeclareTextCommand{\accpsilivaria}{\LastDeclaredEncoding}[1]{#1\char"0300 \char"0313 } +\DeclareTextCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 \char"0313 } + + +% Common Definitions +% ================== +% +% Use the `common Greek font encoding definitions`_:: + +\input{greek-fontenc.def} + + +% Character Definitions +% ===================== +% +% General Punctuation +% ~~~~~~~~~~~~~~~~~~~ +% +% Ligature break up with ZERO WIDTH NON-JOINER:: + +\DeclareTextCommand{\textcompwordmark}{\LastDeclaredEncoding}{\char"200C} + +% Greek and Coptic +% ~~~~~~~~~~~~~~~~ +% +% :: + +% NR Unicode Name % babel name, % PU name +% 0370 GREEK CAPITAL LETTER HETA % Ͱ +% 0371 GREEK SMALL LETTER HETA % ͱ +% 0372 GREEK CAPITAL LETTER ARCHAIC SAMPI % Ͳ +% 0373 GREEK SMALL LETTER ARCHAIC SAMPI % ͳ +\DeclareTextCommand{\textdexiakeraia}{\LastDeclaredEncoding}{ʹ} % \anwtonos, \textnumeralsigngreek +\DeclareTextCommand{\textaristerikeraia}{\LastDeclaredEncoding}{͵} % \katwtonos, \textnumeralsignlowergreek +% 0376 GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA % Ͷ +% 0377 GREEK SMALL LETTER PAMPHYLIAN DIGAMMA % ͷ + +% 037A GREEK YPOGEGRAMMENI (use \textcompwordmark\ypogegrammeni) % ͺ +% 037B GREEK SMALL REVERSED LUNATE SIGMA SYMBOL +% 037C GREEK SMALL DOTTED LUNATE SIGMA SYMBOL +% 037D GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL +\DeclareTextCommand{\texterotimatiko}{\LastDeclaredEncoding}{;} % 037E GREEK QUESTION MARK + +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textcompwordmark}{΄} +\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textcompwordmark}{΅} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textAlpha}{Ά} +\DeclareTextCommand{\textanoteleia}{\LastDeclaredEncoding}{·} % \anoteleia +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textEpsilon}{Έ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textEta}{Ή} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textIota}{Ί} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textOmicron}{Ό} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textUpsilon}{Ύ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textOmega}{Ώ} +\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textiota}{ΐ} + +\DeclareTextCommand{\textAlpha}{\LastDeclaredEncoding}{Α} +\DeclareTextCommand{\textBeta}{\LastDeclaredEncoding}{Β} +\DeclareTextCommand{\textGamma}{\LastDeclaredEncoding}{Γ} +\DeclareTextCommand{\textDelta}{\LastDeclaredEncoding}{Δ} +\DeclareTextCommand{\textEpsilon}{\LastDeclaredEncoding}{Ε} +\DeclareTextCommand{\textZeta}{\LastDeclaredEncoding}{Ζ} +\DeclareTextCommand{\textEta}{\LastDeclaredEncoding}{Η} +\DeclareTextCommand{\textTheta}{\LastDeclaredEncoding}{Θ} +\DeclareTextCommand{\textIota}{\LastDeclaredEncoding}{Ι} +\DeclareTextCommand{\textKappa}{\LastDeclaredEncoding}{Κ} +\DeclareTextCommand{\textLambda}{\LastDeclaredEncoding}{Λ} +\DeclareTextCommand{\textMu}{\LastDeclaredEncoding}{Μ} +\DeclareTextCommand{\textNu}{\LastDeclaredEncoding}{Ν} +\DeclareTextCommand{\textXi}{\LastDeclaredEncoding}{Ξ} +\DeclareTextCommand{\textOmicron}{\LastDeclaredEncoding}{Ο} +\DeclareTextCommand{\textPi}{\LastDeclaredEncoding}{Π} +\DeclareTextCommand{\textRho}{\LastDeclaredEncoding}{Ρ} +\DeclareTextCommand{\textSigma}{\LastDeclaredEncoding}{Σ} +\DeclareTextCommand{\textTau}{\LastDeclaredEncoding}{Τ} +\DeclareTextCommand{\textUpsilon}{\LastDeclaredEncoding}{Υ} +\DeclareTextCommand{\textPhi}{\LastDeclaredEncoding}{Φ} +\DeclareTextCommand{\textChi}{\LastDeclaredEncoding}{Χ} +\DeclareTextCommand{\textPsi}{\LastDeclaredEncoding}{Ψ} +\DeclareTextCommand{\textOmega}{\LastDeclaredEncoding}{Ω} + +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textIota}{Ϊ} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textUpsilon}{Ϋ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textalpha}{ά} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textepsilon}{έ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\texteta}{ή} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textiota}{ί} +\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textupsilon}{ΰ} + +\DeclareTextCommand{\textalpha}{\LastDeclaredEncoding}{α} +\DeclareTextCommand{\textbeta}{\LastDeclaredEncoding}{β} +\DeclareTextCommand{\textgamma}{\LastDeclaredEncoding}{γ} +\DeclareTextCommand{\textdelta}{\LastDeclaredEncoding}{δ} +\DeclareTextCommand{\textepsilon}{\LastDeclaredEncoding}{ε} +\DeclareTextCommand{\textvarepsilon}{\LastDeclaredEncoding}{ε} % cf. $\varepsiolon$ +\DeclareTextCommand{\textzeta}{\LastDeclaredEncoding}{ζ} +\DeclareTextCommand{\texteta}{\LastDeclaredEncoding}{η} +\DeclareTextCommand{\texttheta}{\LastDeclaredEncoding}{θ} +\DeclareTextCommand{\textiota}{\LastDeclaredEncoding}{ι} +\DeclareTextCommand{\textkappa}{\LastDeclaredEncoding}{κ} +\DeclareTextCommand{\textlambda}{\LastDeclaredEncoding}{λ} +\DeclareTextCommand{\textmu}{\LastDeclaredEncoding}{μ} % \textmugreek +\DeclareTextCommand{\textnu}{\LastDeclaredEncoding}{ν} +\DeclareTextCommand{\textxi}{\LastDeclaredEncoding}{ξ} +\DeclareTextCommand{\textomicron}{\LastDeclaredEncoding}{ο} +\DeclareTextCommand{\textpi}{\LastDeclaredEncoding}{π} +\DeclareTextCommand{\textrho}{\LastDeclaredEncoding}{ρ} +\DeclareTextCommand{\textvarsigma}{\LastDeclaredEncoding}{ς} % final sigma +\DeclareTextCommand{\textfinalsigma}{\LastDeclaredEncoding}{\textvarsigma} +\DeclareTextCommand{\textsigma}{\LastDeclaredEncoding}{σ} +% Dummy definition (\textautosigma is lowercase of \textSigma): +\ProvideTextCommand{\textautosigma}{\LastDeclaredEncoding}{\textsigma} +\DeclareTextCommand{\texttau}{\LastDeclaredEncoding}{τ} +\DeclareTextCommand{\textupsilon}{\LastDeclaredEncoding}{υ} +\DeclareTextCommand{\textphi}{\LastDeclaredEncoding}{φ} +\DeclareTextCommand{\textvarphi}{\LastDeclaredEncoding}{φ} % cf. $\varphi$ +\DeclareTextCommand{\textchi}{\LastDeclaredEncoding}{χ} +\DeclareTextCommand{\textpsi}{\LastDeclaredEncoding}{ψ} +\DeclareTextCommand{\textomega}{\LastDeclaredEncoding}{ω} + +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textiota}{ϊ} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textupsilon}{ϋ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textomicron}{ό} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textupsilon}{ύ} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textomega}{ώ} + +\DeclareTextCommand{\textQoppa}{\LastDeclaredEncoding}{Ϙ} +\DeclareTextCommand{\textqoppa}{\LastDeclaredEncoding}{ϙ} +\DeclareTextCommand{\textStigma}{\LastDeclaredEncoding}{Ϛ} +\DeclareTextCommand{\textstigma}{\LastDeclaredEncoding}{ϛ} +\DeclareTextCommand{\textDigamma}{\LastDeclaredEncoding}{Ϝ} +\DeclareTextCommand{\textdigamma}{\LastDeclaredEncoding}{ϝ} +\DeclareTextCommand{\textKoppa}{\LastDeclaredEncoding}{Ϟ} % not defined in LGR +\DeclareTextCommand{\textkoppa}{\LastDeclaredEncoding}{ϟ} % \koppa, \textqoppa [sic!] +\DeclareTextCommand{\textSampi}{\LastDeclaredEncoding}{Ϡ} +\DeclareTextCommand{\textsampi}{\LastDeclaredEncoding}{ϡ} + +% Symbol variants +\DeclareTextCommand{\textbetasymbol}{\LastDeclaredEncoding}{ϐ} +\DeclareTextCommand{\textkappasymbol}{\LastDeclaredEncoding}{ϰ} +\DeclareTextCommand{\textThetasymbol}{\LastDeclaredEncoding}{ϴ} +\DeclareTextCommand{\textthetasymbol}{\LastDeclaredEncoding}{ϑ} +\DeclareTextCommand{\textphisymbol}{\LastDeclaredEncoding}{ϕ} +\DeclareTextCommand{\textpisymbol}{\LastDeclaredEncoding}{ϖ} +\DeclareTextCommand{\textrhosymbol}{\LastDeclaredEncoding}{ϱ} +\DeclareTextCommand{\textepsilonsymbol}{\LastDeclaredEncoding}{ϵ} +% math compatibility aliases +% $\varphi$ and $\varepsilon$ refer to the letter characters (see above)! +\DeclareTextCommand{\textvarbeta}{\LastDeclaredEncoding}{\textbetasymbol} +\DeclareTextCommand{\textvarkappa}{\LastDeclaredEncoding}{ϰ} +\DeclareTextCommand{\textvarTheta}{\LastDeclaredEncoding}{ϴ} +\DeclareTextCommand{\textvartheta}{\LastDeclaredEncoding}{ϑ} +\DeclareTextCommand{\textvarpi}{\LastDeclaredEncoding}{ϖ} +\DeclareTextCommand{\textvarrho}{\LastDeclaredEncoding}{ϱ} + +% Greek Extended +% ~~~~~~~~~~~~~~ +% +% We skip definitions for characters "... WITH OXIA", because they would +% overwrite the defintions for "... WITH TONOS" in the `Greek and Coptic` +% block. +% +% :: + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textalpha}{ἀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textalpha}{ἁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textalpha}{ἂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textalpha}{ἃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textalpha}{ἄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textalpha}{ἅ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textalpha}{ἆ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textalpha}{ἇ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textAlpha}{Ἀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textAlpha}{Ἁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textAlpha}{Ἂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textAlpha}{Ἃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textAlpha}{Ἄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textAlpha}{Ἅ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textAlpha}{Ἆ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textAlpha}{Ἇ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textepsilon}{ἐ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textepsilon}{ἑ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textepsilon}{ἒ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textepsilon}{ἓ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textepsilon}{ἔ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textepsilon}{ἕ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textEpsilon}{Ἐ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textEpsilon}{Ἑ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textEpsilon}{Ἒ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textEpsilon}{Ἓ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textEpsilon}{Ἔ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textEpsilon}{Ἕ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\texteta}{ἠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\texteta}{ἡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\texteta}{ἢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\texteta}{ἣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\texteta}{ἤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\texteta}{ἥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\texteta}{ἦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\texteta}{ἧ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textEta}{Ἠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textEta}{Ἡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textEta}{Ἢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textEta}{Ἣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textEta}{Ἤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textEta}{Ἥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textEta}{Ἦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textEta}{Ἧ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textiota}{ἰ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textiota}{ἱ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textiota}{ἲ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textiota}{ἳ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textiota}{ἴ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textiota}{ἵ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textiota}{ἶ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textiota}{ἷ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textIota}{Ἰ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textIota}{Ἱ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textIota}{Ἲ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textIota}{Ἳ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textIota}{Ἴ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textIota}{Ἵ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textIota}{Ἶ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textIota}{Ἷ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textomicron}{ὀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textomicron}{ὁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textomicron}{ὂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textomicron}{ὃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textomicron}{ὄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textomicron}{ὅ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textOmicron}{Ὀ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textOmicron}{Ὁ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textOmicron}{Ὂ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textOmicron}{Ὃ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textOmicron}{Ὄ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textOmicron}{Ὅ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textupsilon}{ὐ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textupsilon}{ὑ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textupsilon}{ὒ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textupsilon}{ὓ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textupsilon}{ὔ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textupsilon}{ὕ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ὖ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ὗ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textUpsilon}{Ὑ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textUpsilon}{Ὓ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textUpsilon}{Ὕ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textUpsilon}{Ὗ} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textomega}{ὠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textomega}{ὡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textomega}{ὢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textomega}{ὣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textomega}{ὤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textomega}{ὥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textomega}{ὦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textomega}{ὧ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textOmega}{Ὠ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textOmega}{Ὡ} +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textOmega}{Ὢ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textOmega}{Ὣ} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textOmega}{Ὤ} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textOmega}{Ὥ} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textOmega}{Ὦ} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textOmega}{Ὧ} + +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textalpha}{ὰ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textepsilon}{ὲ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\texteta}{ὴ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textiota}{ὶ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textomicron}{ὸ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textupsilon}{ὺ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textomega}{ὼ} + +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textalpha}{ᾰ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textalpha}{ᾱ} +% ᾲ +% ᾳ +% ᾴ +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textalpha}{ᾶ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{α}{ᾶ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textalpha}{ᾶ} +% ᾷ +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textAlpha}{Ᾰ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textAlpha}{Ᾱ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textAlpha}{Ὰ} +% ᾼ +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textcompwordmark}{᾽} +\DeclareTextCommand{\prosgegrammeni}{\LastDeclaredEncoding}{ι} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textcompwordmark}{᾿} + +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῀} +\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῁} +% ῂ +% ῃ +% ῄ +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\texteta}{ῆ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{η}{ῆ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\texteta}{ῆ} +% ῇ +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textEpsilon}{Ὲ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textEta}{Ὴ} +% ῌ +\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textcompwordmark}{῍} +\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textcompwordmark}{῎} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῏} + +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textiota}{ῐ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textiota}{ῑ} +\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textiota}{ῒ} +\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textiota}{ΐ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textiota}{ῖ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{ι}{ῖ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textiota}{ῖ} +\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textiota}{ῗ} +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textIota}{Ῐ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textIota}{Ῑ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textIota}{Ὶ} +\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textcompwordmark}{῝} +\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textcompwordmark}{῞} +\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῟} + +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textupsilon}{ῠ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textupsilon}{ῡ} +\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textupsilon}{ῢ} +\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textupsilon}{ΰ} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textrho}{ῤ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textrho}{ῥ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textupsilon}{ῦ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{υ}{ῦ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ῦ} +\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ῧ} +\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textUpsilon}{Ῠ} +\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textUpsilon}{Ῡ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textUpsilon}{Ὺ} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textRho}{Ῥ} +\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textcompwordmark}{῭} +\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textcompwordmark}{΅} + +% ῲ +% ῳ +% ῴ +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textomega}{ῶ} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{ω}{ῶ} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textomega}{ῶ} +% ῷ +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textOmicron}{Ὸ} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textOmega}{Ὼ} +% ῼ +\DeclareTextCompositeCommand{\accoxia}{\LastDeclaredEncoding}{\textcompwordmark}{´} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textcompwordmark}{῾} + +% Letterlike Symbols +% ~~~~~~~~~~~~~~~~~~ +% :: + +\DeclareTextCommand{\textohm}{\LastDeclaredEncoding}{Ω} % OHM SIGN + +% Ancient Greek Numbers +% ~~~~~~~~~~~~~~~~~~~~~ +% TODO: map other chars to corresponding Greek letters. +% See also the grnumalt_ package. +% +% Definition with literal Unicode characters, because the code-point has 5 +% hexadecimal digits: +% +% :: + +\DeclareTextCommand{\textpentedeka}{\LastDeclaredEncoding}{𐅄} % GREEK ACROPHONIC ATTIC FIFTY +\DeclareTextCommand{\textpentehekaton}{\LastDeclaredEncoding}{𐅅} % GREEK ACROPHONIC ATTIC FIVE HUNDRED +\DeclareTextCommand{\textpenteqilioi}{\LastDeclaredEncoding}{𐅆} % GREEK ACROPHONIC ATTIC FIVE THOUSAND +\DeclareTextCommand{\textpentemuria}{\LastDeclaredEncoding}{𐅇} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND + + +% UPPERCASE +% ========= +% +% Greek letters drop diacritics (eccept dialytika and sub-iota) in UPPERCASE. +% +% uc/lc values +% ~~~~~~~~~~~~ +% +% ``\lccode`` and ``\uccode`` corrections from the xgreek_ package by Apostolos Syropoulos:: + +\global\lccode"0370="0371 \global\uccode"0370="0370 +\global\lccode"0371="0371 \global\uccode"0371="0370 +\global\lccode"0372="0373 \global\uccode"0372="0372 +\global\lccode"0373="0373 \global\uccode"0373="0372 +\global\lccode"0376="0377 \global\uccode"0376="0376 +\global\lccode"0377="0377 \global\uccode"0377="0376 +\global\lccode"03FD="037B \global\uccode"03FD="03FD +\global\lccode"037B="037B \global\uccode"037B="03FD +\global\lccode"03FE="037C \global\uccode"03FE="03FE +\global\lccode"037C="037C \global\uccode"037C="03FE +\global\lccode"03FF="037D \global\uccode"03FF="03FF +\global\lccode"037D="037D \global\uccode"037D="03FF +\global\lccode"0386="03AC \global\uccode"0386="0391 +\global\lccode"0388="03AD \global\uccode"0388="0395 +\global\lccode"0389="03AC \global\uccode"0389="0397 +\global\lccode"038A="03AF \global\uccode"038A="0399 +\global\lccode"038C="03CC \global\uccode"038C="039F +\global\lccode"038E="03CD \global\uccode"038E="03A5 +\global\lccode"038F="03CE \global\uccode"038F="03A9 +\global\lccode"0390="0390 \global\uccode"0390="03AA +\global\lccode"0391="03B1 \global\uccode"0391="0391 +\global\lccode"0392="03B2 \global\uccode"0392="0392 +\global\lccode"0393="03B3 \global\uccode"0393="0393 +\global\lccode"0394="03B4 \global\uccode"0394="0394 +\global\lccode"0395="03B5 \global\uccode"0395="0395 +\global\lccode"0396="03B6 \global\uccode"0396="0396 +\global\lccode"0397="03B7 \global\uccode"0397="0397 +\global\lccode"0398="03B8 \global\uccode"0398="0398 +\global\lccode"0399="03B9 \global\uccode"0399="0399 +\global\lccode"039A="03BA \global\uccode"039A="039A +\global\lccode"039B="03BB \global\uccode"039B="039B +\global\lccode"039C="03BC \global\uccode"039C="039C +\global\lccode"039D="03BD \global\uccode"039D="039D +\global\lccode"039E="03BE \global\uccode"039E="039E +\global\lccode"039F="03BF \global\uccode"039F="039F +\global\lccode"03A0="03C0 \global\uccode"03A0="03A0 +\global\lccode"03A1="03C1 \global\uccode"03A1="03A1 +\global\lccode"03A3="03C3 \global\uccode"03A3="03A3 +\global\lccode"03A4="03C4 \global\uccode"03A4="03A4 +\global\lccode"03A5="03C5 \global\uccode"03A5="03A5 +\global\lccode"03A6="03C6 \global\uccode"03A6="03A6 +\global\lccode"03A7="03C7 \global\uccode"03A7="03A7 +\global\lccode"03A8="03C8 \global\uccode"03A8="03A8 +\global\lccode"03A9="03C9 \global\uccode"03A9="03A9 +\global\lccode"03AA="03CA \global\uccode"03AA="03AA +\global\lccode"03AB="03CB \global\uccode"03AB="03AB +\global\lccode"03AC="03AC \global\uccode"03AC="0391 +\global\lccode"03AD="03AD \global\uccode"03AD="0395 +\global\lccode"03AE="03AE \global\uccode"03AE="0397 +\global\lccode"03AF="03AF \global\uccode"03AF="0399 +\global\lccode"03B0="03B0 \global\uccode"03B0="03AB +\global\lccode"03B1="03B1 \global\uccode"03B1="0391 +\global\lccode"03B2="03B2 \global\uccode"03B2="0392 +\global\lccode"03B3="03B3 \global\uccode"03B3="0393 +\global\lccode"03B4="03B4 \global\uccode"03B4="0394 +\global\lccode"03B5="03B5 \global\uccode"03B5="0395 +\global\lccode"03B6="03B6 \global\uccode"03B6="0396 +\global\lccode"03B7="03B7 \global\uccode"03B7="0397 +\global\lccode"03B8="03B8 \global\uccode"03B8="0398 +\global\lccode"03B9="03B9 \global\uccode"03B9="0399 +\global\lccode"03BA="03BA \global\uccode"03BA="039A +\global\lccode"03BB="03BB \global\uccode"03BB="039B +\global\lccode"03BC="03BC \global\uccode"03BC="039C +\global\lccode"03BD="03BD \global\uccode"03BD="039D +\global\lccode"03BE="03BE \global\uccode"03BE="039E +\global\lccode"03BF="03BF \global\uccode"03BF="039F +\global\lccode"03C0="03C0 \global\uccode"03C0="03A0 +\global\lccode"03C1="03C1 \global\uccode"03C1="03A1 +\global\lccode"03C2="03C2 \global\uccode"03C2="03A3 +\global\lccode"03C3="03C3 \global\uccode"03C3="03A3 +\global\lccode"03C4="03C4 \global\uccode"03C4="03A4 +\global\lccode"03C5="03C5 \global\uccode"03C5="03A5 +\global\lccode"03C6="03C6 \global\uccode"03C6="03A6 +\global\lccode"03C7="03C7 \global\uccode"03C7="03A7 +\global\lccode"03C8="03C8 \global\uccode"03C8="03A8 +\global\lccode"03C9="03C9 \global\uccode"03C9="03A9 +\global\lccode"03CA="03CA \global\uccode"03CA="03AA +\global\lccode"03CB="03CB \global\uccode"03CB="03AB +\global\lccode"03CC="03CC \global\uccode"03CC="039F +\global\lccode"03CD="03CD \global\uccode"03CD="03A5 +\global\lccode"03CE="03CE \global\uccode"03CE="03A9 +\global\lccode"03D0="03D0 \global\uccode"03D0="0392 +\global\lccode"03D1="03D1 \global\uccode"03D1="0398 +\global\lccode"03D2="03C5 \global\uccode"03D2="03A5 +\global\lccode"03D3="03CD \global\uccode"03D3="03A5 +\global\lccode"03D4="03CB \global\uccode"03D4="03AB +\global\lccode"03D5="03C6 \global\uccode"03D5="03A6 +\global\lccode"03D6="03C0 \global\uccode"03D6="03A0 +\global\lccode"03DA="03DB \global\uccode"03DA="03DA +\global\lccode"03DB="03DB \global\uccode"03DB="03DA +\global\lccode"03DC="03DD \global\uccode"03DC="03DC +\global\lccode"03DD="03DD \global\uccode"03DD="03DC +\global\lccode"03DE="03DF \global\uccode"03DE="03DE +\global\lccode"03DF="03DF \global\uccode"03DF="03DE +\global\lccode"03E0="03E1 \global\uccode"03E0="03E0 +\global\lccode"03E1="03E1 \global\uccode"03E1="03E0 +\global\lccode"03F0="03BA \global\uccode"03F0="039A +\global\lccode"03F1="03C1 \global\uccode"03F1="03A1 +\global\lccode"03F2="03F2 \global\uccode"03F2="03F9 +\global\lccode"03F9="03F2 \global\uccode"03F9="03F9 +\global\lccode"1F00="1F00 \global\uccode"1F00="0391 +\global\lccode"1F01="1F01 \global\uccode"1F01="0391 +\global\lccode"1F02="1F02 \global\uccode"1F02="0391 +\global\lccode"1F03="1F03 \global\uccode"1F03="0391 +\global\lccode"1F04="1F04 \global\uccode"1F04="0391 +\global\lccode"1F05="1F05 \global\uccode"1F05="0391 +\global\lccode"1F06="1F06 \global\uccode"1F06="0391 +\global\lccode"1F07="1F07 \global\uccode"1F07="0391 +\global\lccode"1F08="1F00 \global\uccode"1F08="0391 +\global\lccode"1F09="1F01 \global\uccode"1F09="0391 +\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391 +\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391 +\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391 +\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391 +\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391 +\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391 +\global\lccode"1F10="1F10 \global\uccode"1F10="0395 +\global\lccode"1F11="1F11 \global\uccode"1F11="0395 +\global\lccode"1F12="1F12 \global\uccode"1F12="0395 +\global\lccode"1F13="1F13 \global\uccode"1F13="0395 +\global\lccode"1F14="1F14 \global\uccode"1F14="0395 +\global\lccode"1F15="1F15 \global\uccode"1F15="0395 +\global\lccode"1F18="1F10 \global\uccode"1F18="0395 +\global\lccode"1F19="1F11 \global\uccode"1F19="0395 +\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395 +\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395 +\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395 +\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395 +\global\lccode"1F20="1F20 \global\uccode"1F20="0397 +\global\lccode"1F21="1F21 \global\uccode"1F21="0397 +\global\lccode"1F22="1F22 \global\uccode"1F22="0397 +\global\lccode"1F23="1F23 \global\uccode"1F23="0397 +\global\lccode"1F24="1F24 \global\uccode"1F24="0397 +\global\lccode"1F25="1F25 \global\uccode"1F25="0397 +\global\lccode"1F26="1F26 \global\uccode"1F26="0397 +\global\lccode"1F27="1F27 \global\uccode"1F27="0397 +\global\lccode"1F28="1F20 \global\uccode"1F28="0397 +\global\lccode"1F29="1F21 \global\uccode"1F29="0397 +\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397 +\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397 +\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397 +\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397 +\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397 +\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397 +\global\lccode"1F30="1F30 \global\uccode"1F30="0399 +\global\lccode"1F31="1F31 \global\uccode"1F31="0399 +\global\lccode"1F32="1F32 \global\uccode"1F32="0399 +\global\lccode"1F33="1F33 \global\uccode"1F33="0399 +\global\lccode"1F34="1F34 \global\uccode"1F34="0399 +\global\lccode"1F35="1F35 \global\uccode"1F35="0399 +\global\lccode"1F36="1F36 \global\uccode"1F36="0399 +\global\lccode"1F37="1F37 \global\uccode"1F37="0399 +\global\lccode"1F38="1F30 \global\uccode"1F38="0399 +\global\lccode"1F39="1F31 \global\uccode"1F39="0399 +\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399 +\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399 +\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399 +\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399 +\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399 +\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399 +\global\lccode"1F40="1F40 \global\uccode"1F40="039F +\global\lccode"1F41="1F41 \global\uccode"1F41="039F +\global\lccode"1F42="1F42 \global\uccode"1F42="039F +\global\lccode"1F43="1F43 \global\uccode"1F43="039F +\global\lccode"1F44="1F44 \global\uccode"1F44="039F +\global\lccode"1F45="1F45 \global\uccode"1F45="039F +\global\lccode"1F48="1F40 \global\uccode"1F48="039F +\global\lccode"1F49="1F41 \global\uccode"1F49="039F +\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F +\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F +\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F +\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F +\global\lccode"1F50="1F50 \global\uccode"1F50="03A5 +\global\lccode"1F51="1F51 \global\uccode"1F51="03A5 +\global\lccode"1F52="1F52 \global\uccode"1F52="03A5 +\global\lccode"1F53="1F53 \global\uccode"1F53="03A5 +\global\lccode"1F54="1F54 \global\uccode"1F54="03A5 +\global\lccode"1F55="1F55 \global\uccode"1F55="03A5 +\global\lccode"1F56="1F56 \global\uccode"1F56="03A5 +\global\lccode"1F57="1F57 \global\uccode"1F57="03A5 +\global\lccode"1F59="1F51 \global\uccode"1F59="03A5 +\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5 +\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5 +\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5 +\global\lccode"1F60="1F60 \global\uccode"1F60="03A9 +\global\lccode"1F61="1F61 \global\uccode"1F61="03A9 +\global\lccode"1F62="1F62 \global\uccode"1F62="03A9 +\global\lccode"1F63="1F63 \global\uccode"1F63="03A9 +\global\lccode"1F64="1F64 \global\uccode"1F64="03A9 +\global\lccode"1F65="1F65 \global\uccode"1F65="03A9 +\global\lccode"1F66="1F66 \global\uccode"1F66="03A9 +\global\lccode"1F67="1F67 \global\uccode"1F67="03A9 +\global\lccode"1F68="1F60 \global\uccode"1F68="03A9 +\global\lccode"1F69="1F61 \global\uccode"1F69="03A9 +\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9 +\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9 +\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9 +\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9 +\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9 +\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9 +\global\lccode"1F70="1F70 \global\uccode"1F70="0391 +\global\lccode"1F71="1F71 \global\uccode"1F71="0391 +\global\lccode"1F72="1F72 \global\uccode"1F72="0395 +\global\lccode"1F73="1F73 \global\uccode"1F73="0395 +\global\lccode"1F74="1F74 \global\uccode"1F74="0397 +\global\lccode"1F75="1F75 \global\uccode"1F75="0397 +\global\lccode"1F76="1F76 \global\uccode"1F76="0399 +\global\lccode"1F77="1F77 \global\uccode"1F77="0399 +\global\lccode"1F78="1F78 \global\uccode"1F78="039F +\global\lccode"1F79="1F79 \global\uccode"1F79="039F +\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5 +\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5 +\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9 +\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9 +\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC +\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC +\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC +\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC +\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC +\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC +\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC +\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC +\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC +\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC +\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC +\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC +\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC +\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC +\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC +\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC +\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC +\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC +\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC +\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC +\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC +\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC +\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC +\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC +\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC +\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC +\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC +\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC +\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC +\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC +\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC +\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC +\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC +\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC +\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC +\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC +\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC +\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC +\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC +\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC +\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC +\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC +\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC +\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC +\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC +\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC +\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC +\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC +\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8 +\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9 +\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC +\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC +\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC +\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391 +\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC +\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8 +\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9 +\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391 +\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391 +\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC +\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD +\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC +\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC +\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC +\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397 +\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC +\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395 +\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395 +\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397 +\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397 +\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC +\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8 +\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9 +\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA +\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA +\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399 +\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA +\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8 +\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9 +\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399 +\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399 +\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8 +\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9 +\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB +\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB +\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1 +\global\lccode"1FE5="1FE5 \global\uccode"1FE5="03A1 +\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5 +\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB +\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8 +\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9 +\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5 +\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5 +\global\lccode"1FEC="1FE5 \global\uccode"1FEC="03A1 +\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC +\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC +\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC +\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9 +\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC +\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F +\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F +\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9 +\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9 +\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC + + +% uclclist +% ~~~~~~~~ +% +% The common Greek font encoding definitions in greek-fontenc.def_ extend the +% `uclclist` with Greek LICR macros. Here, we add textkoppa/textKoppa and +% Unicode-specific "hiatus_" handling (copied from lgrenc.def_ and changed +% Latin transcription to Unicode literals). +% +% @uclclist extension (see also greek-fontenc.def_):: + +\providecommand*\greek@euenc@update@uclclist{% + \expandafter\def\expandafter\@uclclist\expandafter{% + \@uclclist + \textkoppa \textKoppa + }% + \let\greek@euenc@update@uclclist\relax +} + +% Expand the uclc list using the just defined macro:: + +\greek@euenc@update@uclclist + +% Now the hiatus definition modifications:: + +\DeclareTextCommand{\LGR@A@hiatus}{\LastDeclaredEncoding}{% + \LGR@ifnextchar{Ι}{\textAlpha\"}{% + \LGR@ifnextchar{Υ}{\textAlpha\"}{% + \LGR@ifnextchar{\textIota}{\textAlpha\"}{% + \LGR@ifnextchar{\textUpsilon}{\textAlpha\"}{\textAlpha}% + }% + }% + }% +} +\DeclareTextCommand{\LGR@E@hiatus}{\LastDeclaredEncoding}{% + \LGR@ifnextchar{Ι}{\textEpsilon\"}{% + \LGR@ifnextchar{Υ}{\textEpsilon\"}{% + \LGR@ifnextchar{\textIota}{\textEpsilon\"}{% + \LGR@ifnextchar{\textUpsilon}{\textEpsilon\"}{\textEpsilon}% + }% + }% + }% +} + +% .. References +% +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _babel-greek: http://www.ctan.org/pkg/babel-greek +% .. _euenc: http://www.ctan.org/pkg/euenc +% .. _fontspec: http://www.ctan.org/pkg/fontspec +% .. _greek-fontenc: http://www.ctan.org/pkg/greek-fontenc +% .. _grnumalt: http://www.ctan.org/pkg/grnumalt +% .. _inputenc: http://www.ctan.org/pkg/inputenc +% .. _textalpha: textalpha.sty.html +% .. _xgreek: http://www.ctan.org/pkg/xgreek +% .. _xunicode: http://www.ctan.org/pkg/xunicode +% +% .. _LaTeX2e font selection: +% http://mirror.ctan.org/macros/latex/doc/fntguide.pdf +% .. _common Greek font encoding definitions: +% .. _greek-fontenc.def: greek-fontenc.def.html +% .. _lgrenc.def: lgrenc.def.html +% .. _hiatus: greek-fontenc.def.html#mark-hiatus diff --git a/language/greek/greek-fontenc/greek-euenc.def.html b/language/greek/greek-fontenc/greek-euenc.def.html new file mode 100644 index 0000000000..70f720ebae --- /dev/null +++ b/language/greek/greek-fontenc/greek-euenc.def.html @@ -0,0 +1,1454 @@ + + + + + +greek-euenc.def + + + + + + +
+

greek-euenc.def

+ +

Greek LICR definitions for XeTeX and LuaTeX

+
+ + +
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
+
\ProvidesFile{greek-euenc.def}
+[2018/01/06 0.13.3 Greek LICRs for XeTeX and LuaTeX]
+
+
+
+

Abstract

+

Experimental support for Greek LICR macros with XeTeX and LuaTeX. +Extends euenc. Used by babel-greek and textalpha.

+
+
+
History:
+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

0.1

2013-07-16

initial version

0.1.1

2013-07-18

bugfix: wrong breathings psilioxia -> dasiaoxia

0.1.2

2013-07-19 +..

bugfix: Disable composite defs starting with char macro, +fix “hiatus” handling.

0.1.3

2013-07-24

fix “input” path.

0.1.4

2013-10-01 +..

remove clashing defs for legacy characters with oxia, +fix upcasing of \finalsigma.

0.11.1

2013-12-01

fix identification.

0.11.2

2014-09-08

\textKoppa macro

+

(Capital Koppa is not defined in LGR but Unicode).

0.12

2014-12-12

Remove symbol macros for breathing accents.

0.13

2015-08-07

\lccode/\uccode corrections from xgreek.

+

LICR macros for symbol variants.

0.13.3

2018-01-06

Documentation update.

+
+
+ +
+

Motivation

+

LICR macro definitions for the Greek script are missing in both, xunicode +and euenc.

+

This file expands the font encoding definition files eu1enc.def rsp. +eu2enc.def from euenc defining LaTeX Internal Character +Representaction (LICR) macros for Greek letters and symbols. It works +independed of xunicode using the standard commands for LaTeX2e font +selection.

+
+
+

Requirements

+

Requires XeTeX or LuaTeX, fontspec, and a font with Greek characters.

+

See greek-euenc-doc.tex and greek-euenc-doc.pdf for setup and +usage examples.

+
+
+

Greek Diacritics

+

Define “named macros” for simple and combined diacritics.

+
    +
  • Named accent macros can be used instead of the \@tabacckludge by +to-LaTeX converters to ensure working also inside the tabbing environment.

  • +
  • Named macros are required for upcasing according to Greek typesetting +conventions and in the definition of composite commands.

  • +
+

Greek alias names for standard accents:

+
\DeclareTextCommand{\acctonos}{\LastDeclaredEncoding}{\@tabacckludge'}
+\DeclareTextCommand{\accvaria}{\LastDeclaredEncoding}{\@tabacckludge`}
+\DeclareTextCommand{\accdialytika}{\LastDeclaredEncoding}{\@tabacckludge"}
+

The combining perispomeni character is normalized with Greek base letters, +while the (standard) combining tilde is not:

+
\DeclareTextCommand{\accperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 }
+

Breathings:

+

(The COMBINING GREEK KORONIS is a legacy character, discarded in favour of +COMBINING COMMA ABOVE)

+
\DeclareTextCommand{\accpsili}{\LastDeclaredEncoding}[1]{#1\char"0313 } % ψιλή spiritus lenis (smooth breathing)
+\DeclareTextCommand{\accdasia}{\LastDeclaredEncoding}[1]{#1\char"0314 } % δασεῖα spiritus asper (rough breathing)
+

Sub-iota:

+

\ypogegrammeni is a postfix accent (ligature in LGR)

+
\DeclareTextSymbol{\ypogegrammeni}{\LastDeclaredEncoding}{0837} % COMBINING GREEK YPOGEGRAMMENI
+

Combined diacritics:

+
% The COMBINING DIALYTIKA TONOS is discarded and not well supported by fonts:
+\DeclareTextCommand{\accdialytikatonos}{\LastDeclaredEncoding}[1]{#1\char"0308 \char"0301 }
+\DeclareTextCommand{\accdialytikavaria}{\LastDeclaredEncoding}[1]{#1\char"0308 \char"0300 }
+\DeclareTextCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 \char"0308 }
+
+\DeclareTextCommand{\accdasiaoxia}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0301 }
+\DeclareTextCommand{\accdasiavaria}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0300 }
+\DeclareTextCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0342 }
+
+\DeclareTextCommand{\accpsilioxia}{\LastDeclaredEncoding}[1]{#1\char"0301 \char"0313 }
+\DeclareTextCommand{\accpsilivaria}{\LastDeclaredEncoding}[1]{#1\char"0300 \char"0313 }
+\DeclareTextCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 \char"0313 }
+
+
+

Common Definitions

+

Use the common Greek font encoding definitions:

+
\input{greek-fontenc.def}
+
+
+

Character Definitions

+
+

General Punctuation

+

Ligature break up with ZERO WIDTH NON-JOINER:

+
\DeclareTextCommand{\textcompwordmark}{\LastDeclaredEncoding}{\char"200C}
+
+
+

Greek and Coptic

+
% NR    Unicode Name                                       %   babel name, % PU name
+% 0370  GREEK CAPITAL LETTER HETA                          % Ͱ
+% 0371  GREEK SMALL LETTER HETA                            % ͱ
+% 0372  GREEK CAPITAL LETTER ARCHAIC SAMPI                 % Ͳ
+% 0373  GREEK SMALL LETTER ARCHAIC SAMPI                   % ͳ
+\DeclareTextCommand{\textdexiakeraia}{\LastDeclaredEncoding}{ʹ} % \anwtonos, \textnumeralsigngreek
+\DeclareTextCommand{\textaristerikeraia}{\LastDeclaredEncoding}{͵} % \katwtonos, \textnumeralsignlowergreek
+% 0376  GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA            % Ͷ
+% 0377  GREEK SMALL LETTER PAMPHYLIAN DIGAMMA              % ͷ
+
+% 037A  GREEK YPOGEGRAMMENI (use \textcompwordmark\ypogegrammeni) % ͺ
+% 037B  GREEK SMALL REVERSED LUNATE SIGMA SYMBOL
+% 037C  GREEK SMALL DOTTED LUNATE SIGMA SYMBOL
+% 037D  GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL
+\DeclareTextCommand{\texterotimatiko}{\LastDeclaredEncoding}{;} % 037E GREEK QUESTION MARK
+
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textcompwordmark}{΄}
+\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textcompwordmark}{΅}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textAlpha}{Ά}
+\DeclareTextCommand{\textanoteleia}{\LastDeclaredEncoding}{·} % \anoteleia
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textEpsilon}{Έ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textEta}{Ή}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textIota}{Ί}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textOmicron}{Ό}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textUpsilon}{Ύ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textOmega}{Ώ}
+\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textiota}{ΐ}
+
+\DeclareTextCommand{\textAlpha}{\LastDeclaredEncoding}{Α}
+\DeclareTextCommand{\textBeta}{\LastDeclaredEncoding}{Β}
+\DeclareTextCommand{\textGamma}{\LastDeclaredEncoding}{Γ}
+\DeclareTextCommand{\textDelta}{\LastDeclaredEncoding}{Δ}
+\DeclareTextCommand{\textEpsilon}{\LastDeclaredEncoding}{Ε}
+\DeclareTextCommand{\textZeta}{\LastDeclaredEncoding}{Ζ}
+\DeclareTextCommand{\textEta}{\LastDeclaredEncoding}{Η}
+\DeclareTextCommand{\textTheta}{\LastDeclaredEncoding}{Θ}
+\DeclareTextCommand{\textIota}{\LastDeclaredEncoding}{Ι}
+\DeclareTextCommand{\textKappa}{\LastDeclaredEncoding}{Κ}
+\DeclareTextCommand{\textLambda}{\LastDeclaredEncoding}{Λ}
+\DeclareTextCommand{\textMu}{\LastDeclaredEncoding}{Μ}
+\DeclareTextCommand{\textNu}{\LastDeclaredEncoding}{Ν}
+\DeclareTextCommand{\textXi}{\LastDeclaredEncoding}{Ξ}
+\DeclareTextCommand{\textOmicron}{\LastDeclaredEncoding}{Ο}
+\DeclareTextCommand{\textPi}{\LastDeclaredEncoding}{Π}
+\DeclareTextCommand{\textRho}{\LastDeclaredEncoding}{Ρ}
+\DeclareTextCommand{\textSigma}{\LastDeclaredEncoding}{Σ}
+\DeclareTextCommand{\textTau}{\LastDeclaredEncoding}{Τ}
+\DeclareTextCommand{\textUpsilon}{\LastDeclaredEncoding}{Υ}
+\DeclareTextCommand{\textPhi}{\LastDeclaredEncoding}{Φ}
+\DeclareTextCommand{\textChi}{\LastDeclaredEncoding}{Χ}
+\DeclareTextCommand{\textPsi}{\LastDeclaredEncoding}{Ψ}
+\DeclareTextCommand{\textOmega}{\LastDeclaredEncoding}{Ω}
+
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textIota}{Ϊ}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textUpsilon}{Ϋ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textalpha}{ά}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textepsilon}{έ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\texteta}{ή}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textiota}{ί}
+\DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textupsilon}{ΰ}
+
+\DeclareTextCommand{\textalpha}{\LastDeclaredEncoding}{α}
+\DeclareTextCommand{\textbeta}{\LastDeclaredEncoding}{β}
+\DeclareTextCommand{\textgamma}{\LastDeclaredEncoding}{γ}
+\DeclareTextCommand{\textdelta}{\LastDeclaredEncoding}{δ}
+\DeclareTextCommand{\textepsilon}{\LastDeclaredEncoding}{ε}
+\DeclareTextCommand{\textvarepsilon}{\LastDeclaredEncoding}{ε} % cf. $\varepsiolon$
+\DeclareTextCommand{\textzeta}{\LastDeclaredEncoding}{ζ}
+\DeclareTextCommand{\texteta}{\LastDeclaredEncoding}{η}
+\DeclareTextCommand{\texttheta}{\LastDeclaredEncoding}{θ}
+\DeclareTextCommand{\textiota}{\LastDeclaredEncoding}{ι}
+\DeclareTextCommand{\textkappa}{\LastDeclaredEncoding}{κ}
+\DeclareTextCommand{\textlambda}{\LastDeclaredEncoding}{λ}
+\DeclareTextCommand{\textmu}{\LastDeclaredEncoding}{μ} % \textmugreek
+\DeclareTextCommand{\textnu}{\LastDeclaredEncoding}{ν}
+\DeclareTextCommand{\textxi}{\LastDeclaredEncoding}{ξ}
+\DeclareTextCommand{\textomicron}{\LastDeclaredEncoding}{ο}
+\DeclareTextCommand{\textpi}{\LastDeclaredEncoding}{π}
+\DeclareTextCommand{\textrho}{\LastDeclaredEncoding}{ρ}
+\DeclareTextCommand{\textvarsigma}{\LastDeclaredEncoding}{ς} % final sigma
+\DeclareTextCommand{\textfinalsigma}{\LastDeclaredEncoding}{\textvarsigma}
+\DeclareTextCommand{\textsigma}{\LastDeclaredEncoding}{σ}
+% Dummy definition (\textautosigma is lowercase of \textSigma):
+\ProvideTextCommand{\textautosigma}{\LastDeclaredEncoding}{\textsigma}
+\DeclareTextCommand{\texttau}{\LastDeclaredEncoding}{τ}
+\DeclareTextCommand{\textupsilon}{\LastDeclaredEncoding}{υ}
+\DeclareTextCommand{\textphi}{\LastDeclaredEncoding}{φ}
+\DeclareTextCommand{\textvarphi}{\LastDeclaredEncoding}{φ} % cf. $\varphi$
+\DeclareTextCommand{\textchi}{\LastDeclaredEncoding}{χ}
+\DeclareTextCommand{\textpsi}{\LastDeclaredEncoding}{ψ}
+\DeclareTextCommand{\textomega}{\LastDeclaredEncoding}{ω}
+
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textiota}{ϊ}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textupsilon}{ϋ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textomicron}{ό}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textupsilon}{ύ}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textomega}{ώ}
+
+\DeclareTextCommand{\textQoppa}{\LastDeclaredEncoding}{Ϙ}
+\DeclareTextCommand{\textqoppa}{\LastDeclaredEncoding}{ϙ}
+\DeclareTextCommand{\textStigma}{\LastDeclaredEncoding}{Ϛ}
+\DeclareTextCommand{\textstigma}{\LastDeclaredEncoding}{ϛ}
+\DeclareTextCommand{\textDigamma}{\LastDeclaredEncoding}{Ϝ}
+\DeclareTextCommand{\textdigamma}{\LastDeclaredEncoding}{ϝ}
+\DeclareTextCommand{\textKoppa}{\LastDeclaredEncoding}{Ϟ} % not defined in LGR
+\DeclareTextCommand{\textkoppa}{\LastDeclaredEncoding}{ϟ} % \koppa, \textqoppa [sic!]
+\DeclareTextCommand{\textSampi}{\LastDeclaredEncoding}{Ϡ}
+\DeclareTextCommand{\textsampi}{\LastDeclaredEncoding}{ϡ}
+
+% Symbol variants
+\DeclareTextCommand{\textbetasymbol}{\LastDeclaredEncoding}{ϐ}
+\DeclareTextCommand{\textkappasymbol}{\LastDeclaredEncoding}{ϰ}
+\DeclareTextCommand{\textThetasymbol}{\LastDeclaredEncoding}{ϴ}
+\DeclareTextCommand{\textthetasymbol}{\LastDeclaredEncoding}{ϑ}
+\DeclareTextCommand{\textphisymbol}{\LastDeclaredEncoding}{ϕ}
+\DeclareTextCommand{\textpisymbol}{\LastDeclaredEncoding}{ϖ}
+\DeclareTextCommand{\textrhosymbol}{\LastDeclaredEncoding}{ϱ}
+\DeclareTextCommand{\textepsilonsymbol}{\LastDeclaredEncoding}{ϵ}
+% math compatibility aliases
+% $\varphi$ and $\varepsilon$ refer to the letter characters (see above)!
+\DeclareTextCommand{\textvarbeta}{\LastDeclaredEncoding}{\textbetasymbol}
+\DeclareTextCommand{\textvarkappa}{\LastDeclaredEncoding}{ϰ}
+\DeclareTextCommand{\textvarTheta}{\LastDeclaredEncoding}{ϴ}
+\DeclareTextCommand{\textvartheta}{\LastDeclaredEncoding}{ϑ}
+\DeclareTextCommand{\textvarpi}{\LastDeclaredEncoding}{ϖ}
+\DeclareTextCommand{\textvarrho}{\LastDeclaredEncoding}{ϱ}
+
+
+

Greek Extended

+

We skip definitions for characters “… WITH OXIA”, because they would +overwrite the defintions for “… WITH TONOS” in the Greek and Coptic +block.

+
\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textalpha}{ἀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textalpha}{ἁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textalpha}{ἂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textalpha}{ἃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textalpha}{ἄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textalpha}{ἅ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textalpha}{ἆ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textalpha}{ἇ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textAlpha}{Ἀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textAlpha}{Ἁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textAlpha}{Ἂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textAlpha}{Ἃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textAlpha}{Ἄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textAlpha}{Ἅ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textAlpha}{Ἆ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textAlpha}{Ἇ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textepsilon}{ἐ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textepsilon}{ἑ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textepsilon}{ἒ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textepsilon}{ἓ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textepsilon}{ἔ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textepsilon}{ἕ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textEpsilon}{Ἐ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textEpsilon}{Ἑ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textEpsilon}{Ἒ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textEpsilon}{Ἓ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textEpsilon}{Ἔ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textEpsilon}{Ἕ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\texteta}{ἠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\texteta}{ἡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\texteta}{ἢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\texteta}{ἣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\texteta}{ἤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\texteta}{ἥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\texteta}{ἦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\texteta}{ἧ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textEta}{Ἠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textEta}{Ἡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textEta}{Ἢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textEta}{Ἣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textEta}{Ἤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textEta}{Ἥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textEta}{Ἦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textEta}{Ἧ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textiota}{ἰ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textiota}{ἱ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textiota}{ἲ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textiota}{ἳ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textiota}{ἴ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textiota}{ἵ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textiota}{ἶ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textiota}{ἷ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textIota}{Ἰ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textIota}{Ἱ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textIota}{Ἲ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textIota}{Ἳ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textIota}{Ἴ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textIota}{Ἵ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textIota}{Ἶ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textIota}{Ἷ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textomicron}{ὀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textomicron}{ὁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textomicron}{ὂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textomicron}{ὃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textomicron}{ὄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textomicron}{ὅ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textOmicron}{Ὀ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textOmicron}{Ὁ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textOmicron}{Ὂ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textOmicron}{Ὃ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textOmicron}{Ὄ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textOmicron}{Ὅ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textupsilon}{ὐ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textupsilon}{ὑ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textupsilon}{ὒ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textupsilon}{ὓ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textupsilon}{ὔ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textupsilon}{ὕ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ὖ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ὗ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textUpsilon}{Ὑ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textUpsilon}{Ὓ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textUpsilon}{Ὕ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textUpsilon}{Ὗ}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textomega}{ὠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textomega}{ὡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textomega}{ὢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textomega}{ὣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textomega}{ὤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textomega}{ὥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textomega}{ὦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textomega}{ὧ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textOmega}{Ὠ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textOmega}{Ὡ}
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textOmega}{Ὢ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textOmega}{Ὣ}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textOmega}{Ὤ}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textOmega}{Ὥ}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textOmega}{Ὦ}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textOmega}{Ὧ}
+
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textalpha}{ὰ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textepsilon}{ὲ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\texteta}{ὴ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textiota}{ὶ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textomicron}{ὸ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textupsilon}{ὺ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textomega}{ὼ}
+
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textalpha}{ᾰ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textalpha}{ᾱ}
+% ᾲ
+% ᾳ
+% ᾴ
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textalpha}{ᾶ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{α}{ᾶ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textalpha}{ᾶ}
+% ᾷ
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textAlpha}{Ᾰ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textAlpha}{Ᾱ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textAlpha}{Ὰ}
+% ᾼ
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textcompwordmark}{᾽}
+\DeclareTextCommand{\prosgegrammeni}{\LastDeclaredEncoding}{ι}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textcompwordmark}{᾿}
+
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῀}
+\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῁}
+% ῂ
+% ῃ
+% ῄ
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\texteta}{ῆ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{η}{ῆ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\texteta}{ῆ}
+% ῇ
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textEpsilon}{Ὲ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textEta}{Ὴ}
+% ῌ
+\DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textcompwordmark}{῍}
+\DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textcompwordmark}{῎}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῏}
+
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textiota}{ῐ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textiota}{ῑ}
+\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textiota}{ῒ}
+\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textiota}{ΐ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textiota}{ῖ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{ι}{ῖ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textiota}{ῖ}
+\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textiota}{ῗ}
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textIota}{Ῐ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textIota}{Ῑ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textIota}{Ὶ}
+\DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textcompwordmark}{῝}
+\DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textcompwordmark}{῞}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῟}
+
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textupsilon}{ῠ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textupsilon}{ῡ}
+\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textupsilon}{ῢ}
+\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textupsilon}{ΰ}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textrho}{ῤ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textrho}{ῥ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textupsilon}{ῦ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{υ}{ῦ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ῦ}
+\DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ῧ}
+\DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textUpsilon}{Ῠ}
+\DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textUpsilon}{Ῡ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textUpsilon}{Ὺ}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textRho}{Ῥ}
+\DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textcompwordmark}{῭}
+\DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textcompwordmark}{΅}
+
+% ῲ
+% ῳ
+% ῴ
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textomega}{ῶ}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{ω}{ῶ}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textomega}{ῶ}
+% ῷ
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textOmicron}{Ὸ}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textOmega}{Ὼ}
+% ῼ
+\DeclareTextCompositeCommand{\accoxia}{\LastDeclaredEncoding}{\textcompwordmark}{´}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textcompwordmark}{῾}
+
+
+

Letterlike Symbols

+
\DeclareTextCommand{\textohm}{\LastDeclaredEncoding}{Ω} % OHM SIGN
+
+
+

Ancient Greek Numbers

+

TODO: map other chars to corresponding Greek letters. +See also the grnumalt package.

+

Definition with literal Unicode characters, because the code-point has 5 +hexadecimal digits:

+
\DeclareTextCommand{\textpentedeka}{\LastDeclaredEncoding}{𐅄}    % GREEK ACROPHONIC ATTIC FIFTY
+\DeclareTextCommand{\textpentehekaton}{\LastDeclaredEncoding}{𐅅} % GREEK ACROPHONIC ATTIC FIVE HUNDRED
+\DeclareTextCommand{\textpenteqilioi}{\LastDeclaredEncoding}{𐅆}  % GREEK ACROPHONIC ATTIC FIVE THOUSAND
+\DeclareTextCommand{\textpentemuria}{\LastDeclaredEncoding}{𐅇}   % GREEK ACROPHONIC ATTIC FIFTY THOUSAND
+
+
+
+

UPPERCASE

+

Greek letters drop diacritics (eccept dialytika and sub-iota) in UPPERCASE.

+
+

uc/lc values

+

\lccode and \uccode corrections from the xgreek package by Apostolos Syropoulos:

+
\global\lccode"0370="0371 \global\uccode"0370="0370
+\global\lccode"0371="0371 \global\uccode"0371="0370
+\global\lccode"0372="0373 \global\uccode"0372="0372
+\global\lccode"0373="0373 \global\uccode"0373="0372
+\global\lccode"0376="0377 \global\uccode"0376="0376
+\global\lccode"0377="0377 \global\uccode"0377="0376
+\global\lccode"03FD="037B \global\uccode"03FD="03FD
+\global\lccode"037B="037B \global\uccode"037B="03FD
+\global\lccode"03FE="037C \global\uccode"03FE="03FE
+\global\lccode"037C="037C \global\uccode"037C="03FE
+\global\lccode"03FF="037D \global\uccode"03FF="03FF
+\global\lccode"037D="037D \global\uccode"037D="03FF
+\global\lccode"0386="03AC \global\uccode"0386="0391
+\global\lccode"0388="03AD \global\uccode"0388="0395
+\global\lccode"0389="03AC \global\uccode"0389="0397
+\global\lccode"038A="03AF \global\uccode"038A="0399
+\global\lccode"038C="03CC \global\uccode"038C="039F
+\global\lccode"038E="03CD \global\uccode"038E="03A5
+\global\lccode"038F="03CE \global\uccode"038F="03A9
+\global\lccode"0390="0390 \global\uccode"0390="03AA
+\global\lccode"0391="03B1 \global\uccode"0391="0391
+\global\lccode"0392="03B2 \global\uccode"0392="0392
+\global\lccode"0393="03B3 \global\uccode"0393="0393
+\global\lccode"0394="03B4 \global\uccode"0394="0394
+\global\lccode"0395="03B5 \global\uccode"0395="0395
+\global\lccode"0396="03B6 \global\uccode"0396="0396
+\global\lccode"0397="03B7 \global\uccode"0397="0397
+\global\lccode"0398="03B8 \global\uccode"0398="0398
+\global\lccode"0399="03B9 \global\uccode"0399="0399
+\global\lccode"039A="03BA \global\uccode"039A="039A
+\global\lccode"039B="03BB \global\uccode"039B="039B
+\global\lccode"039C="03BC \global\uccode"039C="039C
+\global\lccode"039D="03BD \global\uccode"039D="039D
+\global\lccode"039E="03BE \global\uccode"039E="039E
+\global\lccode"039F="03BF \global\uccode"039F="039F
+\global\lccode"03A0="03C0 \global\uccode"03A0="03A0
+\global\lccode"03A1="03C1 \global\uccode"03A1="03A1
+\global\lccode"03A3="03C3 \global\uccode"03A3="03A3
+\global\lccode"03A4="03C4 \global\uccode"03A4="03A4
+\global\lccode"03A5="03C5 \global\uccode"03A5="03A5
+\global\lccode"03A6="03C6 \global\uccode"03A6="03A6
+\global\lccode"03A7="03C7 \global\uccode"03A7="03A7
+\global\lccode"03A8="03C8 \global\uccode"03A8="03A8
+\global\lccode"03A9="03C9 \global\uccode"03A9="03A9
+\global\lccode"03AA="03CA \global\uccode"03AA="03AA
+\global\lccode"03AB="03CB \global\uccode"03AB="03AB
+\global\lccode"03AC="03AC \global\uccode"03AC="0391
+\global\lccode"03AD="03AD \global\uccode"03AD="0395
+\global\lccode"03AE="03AE \global\uccode"03AE="0397
+\global\lccode"03AF="03AF \global\uccode"03AF="0399
+\global\lccode"03B0="03B0 \global\uccode"03B0="03AB
+\global\lccode"03B1="03B1 \global\uccode"03B1="0391
+\global\lccode"03B2="03B2 \global\uccode"03B2="0392
+\global\lccode"03B3="03B3 \global\uccode"03B3="0393
+\global\lccode"03B4="03B4 \global\uccode"03B4="0394
+\global\lccode"03B5="03B5 \global\uccode"03B5="0395
+\global\lccode"03B6="03B6 \global\uccode"03B6="0396
+\global\lccode"03B7="03B7 \global\uccode"03B7="0397
+\global\lccode"03B8="03B8 \global\uccode"03B8="0398
+\global\lccode"03B9="03B9 \global\uccode"03B9="0399
+\global\lccode"03BA="03BA \global\uccode"03BA="039A
+\global\lccode"03BB="03BB \global\uccode"03BB="039B
+\global\lccode"03BC="03BC \global\uccode"03BC="039C
+\global\lccode"03BD="03BD \global\uccode"03BD="039D
+\global\lccode"03BE="03BE \global\uccode"03BE="039E
+\global\lccode"03BF="03BF \global\uccode"03BF="039F
+\global\lccode"03C0="03C0 \global\uccode"03C0="03A0
+\global\lccode"03C1="03C1 \global\uccode"03C1="03A1
+\global\lccode"03C2="03C2 \global\uccode"03C2="03A3
+\global\lccode"03C3="03C3 \global\uccode"03C3="03A3
+\global\lccode"03C4="03C4 \global\uccode"03C4="03A4
+\global\lccode"03C5="03C5 \global\uccode"03C5="03A5
+\global\lccode"03C6="03C6 \global\uccode"03C6="03A6
+\global\lccode"03C7="03C7 \global\uccode"03C7="03A7
+\global\lccode"03C8="03C8 \global\uccode"03C8="03A8
+\global\lccode"03C9="03C9 \global\uccode"03C9="03A9
+\global\lccode"03CA="03CA \global\uccode"03CA="03AA
+\global\lccode"03CB="03CB \global\uccode"03CB="03AB
+\global\lccode"03CC="03CC \global\uccode"03CC="039F
+\global\lccode"03CD="03CD \global\uccode"03CD="03A5
+\global\lccode"03CE="03CE \global\uccode"03CE="03A9
+\global\lccode"03D0="03D0 \global\uccode"03D0="0392
+\global\lccode"03D1="03D1 \global\uccode"03D1="0398
+\global\lccode"03D2="03C5 \global\uccode"03D2="03A5
+\global\lccode"03D3="03CD \global\uccode"03D3="03A5
+\global\lccode"03D4="03CB \global\uccode"03D4="03AB
+\global\lccode"03D5="03C6 \global\uccode"03D5="03A6
+\global\lccode"03D6="03C0 \global\uccode"03D6="03A0
+\global\lccode"03DA="03DB \global\uccode"03DA="03DA
+\global\lccode"03DB="03DB \global\uccode"03DB="03DA
+\global\lccode"03DC="03DD \global\uccode"03DC="03DC
+\global\lccode"03DD="03DD \global\uccode"03DD="03DC
+\global\lccode"03DE="03DF \global\uccode"03DE="03DE
+\global\lccode"03DF="03DF \global\uccode"03DF="03DE
+\global\lccode"03E0="03E1 \global\uccode"03E0="03E0
+\global\lccode"03E1="03E1 \global\uccode"03E1="03E0
+\global\lccode"03F0="03BA \global\uccode"03F0="039A
+\global\lccode"03F1="03C1 \global\uccode"03F1="03A1
+\global\lccode"03F2="03F2 \global\uccode"03F2="03F9
+\global\lccode"03F9="03F2 \global\uccode"03F9="03F9
+\global\lccode"1F00="1F00 \global\uccode"1F00="0391
+\global\lccode"1F01="1F01 \global\uccode"1F01="0391
+\global\lccode"1F02="1F02 \global\uccode"1F02="0391
+\global\lccode"1F03="1F03 \global\uccode"1F03="0391
+\global\lccode"1F04="1F04 \global\uccode"1F04="0391
+\global\lccode"1F05="1F05 \global\uccode"1F05="0391
+\global\lccode"1F06="1F06 \global\uccode"1F06="0391
+\global\lccode"1F07="1F07 \global\uccode"1F07="0391
+\global\lccode"1F08="1F00 \global\uccode"1F08="0391
+\global\lccode"1F09="1F01 \global\uccode"1F09="0391
+\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391
+\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391
+\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391
+\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391
+\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391
+\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391
+\global\lccode"1F10="1F10 \global\uccode"1F10="0395
+\global\lccode"1F11="1F11 \global\uccode"1F11="0395
+\global\lccode"1F12="1F12 \global\uccode"1F12="0395
+\global\lccode"1F13="1F13 \global\uccode"1F13="0395
+\global\lccode"1F14="1F14 \global\uccode"1F14="0395
+\global\lccode"1F15="1F15 \global\uccode"1F15="0395
+\global\lccode"1F18="1F10 \global\uccode"1F18="0395
+\global\lccode"1F19="1F11 \global\uccode"1F19="0395
+\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395
+\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395
+\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395
+\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395
+\global\lccode"1F20="1F20 \global\uccode"1F20="0397
+\global\lccode"1F21="1F21 \global\uccode"1F21="0397
+\global\lccode"1F22="1F22 \global\uccode"1F22="0397
+\global\lccode"1F23="1F23 \global\uccode"1F23="0397
+\global\lccode"1F24="1F24 \global\uccode"1F24="0397
+\global\lccode"1F25="1F25 \global\uccode"1F25="0397
+\global\lccode"1F26="1F26 \global\uccode"1F26="0397
+\global\lccode"1F27="1F27 \global\uccode"1F27="0397
+\global\lccode"1F28="1F20 \global\uccode"1F28="0397
+\global\lccode"1F29="1F21 \global\uccode"1F29="0397
+\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397
+\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397
+\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397
+\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397
+\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397
+\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397
+\global\lccode"1F30="1F30 \global\uccode"1F30="0399
+\global\lccode"1F31="1F31 \global\uccode"1F31="0399
+\global\lccode"1F32="1F32 \global\uccode"1F32="0399
+\global\lccode"1F33="1F33 \global\uccode"1F33="0399
+\global\lccode"1F34="1F34 \global\uccode"1F34="0399
+\global\lccode"1F35="1F35 \global\uccode"1F35="0399
+\global\lccode"1F36="1F36 \global\uccode"1F36="0399
+\global\lccode"1F37="1F37 \global\uccode"1F37="0399
+\global\lccode"1F38="1F30 \global\uccode"1F38="0399
+\global\lccode"1F39="1F31 \global\uccode"1F39="0399
+\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399
+\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399
+\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399
+\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399
+\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399
+\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399
+\global\lccode"1F40="1F40 \global\uccode"1F40="039F
+\global\lccode"1F41="1F41 \global\uccode"1F41="039F
+\global\lccode"1F42="1F42 \global\uccode"1F42="039F
+\global\lccode"1F43="1F43 \global\uccode"1F43="039F
+\global\lccode"1F44="1F44 \global\uccode"1F44="039F
+\global\lccode"1F45="1F45 \global\uccode"1F45="039F
+\global\lccode"1F48="1F40 \global\uccode"1F48="039F
+\global\lccode"1F49="1F41 \global\uccode"1F49="039F
+\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F
+\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F
+\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F
+\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F
+\global\lccode"1F50="1F50 \global\uccode"1F50="03A5
+\global\lccode"1F51="1F51 \global\uccode"1F51="03A5
+\global\lccode"1F52="1F52 \global\uccode"1F52="03A5
+\global\lccode"1F53="1F53 \global\uccode"1F53="03A5
+\global\lccode"1F54="1F54 \global\uccode"1F54="03A5
+\global\lccode"1F55="1F55 \global\uccode"1F55="03A5
+\global\lccode"1F56="1F56 \global\uccode"1F56="03A5
+\global\lccode"1F57="1F57 \global\uccode"1F57="03A5
+\global\lccode"1F59="1F51 \global\uccode"1F59="03A5
+\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5
+\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5
+\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5
+\global\lccode"1F60="1F60 \global\uccode"1F60="03A9
+\global\lccode"1F61="1F61 \global\uccode"1F61="03A9
+\global\lccode"1F62="1F62 \global\uccode"1F62="03A9
+\global\lccode"1F63="1F63 \global\uccode"1F63="03A9
+\global\lccode"1F64="1F64 \global\uccode"1F64="03A9
+\global\lccode"1F65="1F65 \global\uccode"1F65="03A9
+\global\lccode"1F66="1F66 \global\uccode"1F66="03A9
+\global\lccode"1F67="1F67 \global\uccode"1F67="03A9
+\global\lccode"1F68="1F60 \global\uccode"1F68="03A9
+\global\lccode"1F69="1F61 \global\uccode"1F69="03A9
+\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9
+\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9
+\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9
+\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9
+\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9
+\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9
+\global\lccode"1F70="1F70 \global\uccode"1F70="0391
+\global\lccode"1F71="1F71 \global\uccode"1F71="0391
+\global\lccode"1F72="1F72 \global\uccode"1F72="0395
+\global\lccode"1F73="1F73 \global\uccode"1F73="0395
+\global\lccode"1F74="1F74 \global\uccode"1F74="0397
+\global\lccode"1F75="1F75 \global\uccode"1F75="0397
+\global\lccode"1F76="1F76 \global\uccode"1F76="0399
+\global\lccode"1F77="1F77 \global\uccode"1F77="0399
+\global\lccode"1F78="1F78 \global\uccode"1F78="039F
+\global\lccode"1F79="1F79 \global\uccode"1F79="039F
+\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5
+\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5
+\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9
+\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9
+\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC
+\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC
+\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC
+\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC
+\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC
+\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC
+\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC
+\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC
+\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC
+\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC
+\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC
+\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC
+\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC
+\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC
+\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC
+\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC
+\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC
+\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC
+\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC
+\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC
+\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC
+\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC
+\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC
+\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC
+\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC
+\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC
+\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC
+\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC
+\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC
+\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC
+\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC
+\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC
+\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC
+\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC
+\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC
+\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC
+\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC
+\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC
+\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC
+\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC
+\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC
+\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC
+\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC
+\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC
+\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC
+\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC
+\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC
+\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC
+\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8
+\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9
+\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC
+\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC
+\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC
+\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391
+\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC
+\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8
+\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9
+\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391
+\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391
+\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC
+\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD
+\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC
+\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC
+\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC
+\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397
+\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC
+\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395
+\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395
+\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397
+\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397
+\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC
+\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8
+\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9
+\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA
+\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA
+\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399
+\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA
+\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8
+\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9
+\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399
+\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399
+\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8
+\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9
+\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB
+\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB
+\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1
+\global\lccode"1FE5="1FE5 \global\uccode"1FE5="03A1
+\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5
+\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB
+\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8
+\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9
+\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5
+\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5
+\global\lccode"1FEC="1FE5 \global\uccode"1FEC="03A1
+\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC
+\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC
+\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC
+\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9
+\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC
+\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F
+\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F
+\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9
+\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9
+\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC
+
+
+

uclclist

+

The common Greek font encoding definitions in greek-fontenc.def extend the +uclclist with Greek LICR macros. Here, we add textkoppa/textKoppa and +Unicode-specific “hiatus” handling (copied from lgrenc.def and changed +Latin transcription to Unicode literals).

+

@uclclist extension (see also greek-fontenc.def):

+
\providecommand*\greek@euenc@update@uclclist{%
+  \expandafter\def\expandafter\@uclclist\expandafter{%
+    \@uclclist
+    \textkoppa \textKoppa
+  }%
+  \let\greek@euenc@update@uclclist\relax
+}
+

Expand the uclc list using the just defined macro:

+
\greek@euenc@update@uclclist
+

Now the hiatus definition modifications:

+
\DeclareTextCommand{\LGR@A@hiatus}{\LastDeclaredEncoding}{%
+  \LGR@ifnextchar{Ι}{\textAlpha\"}{%
+    \LGR@ifnextchar{Υ}{\textAlpha\"}{%
+      \LGR@ifnextchar{\textIota}{\textAlpha\"}{%
+        \LGR@ifnextchar{\textUpsilon}{\textAlpha\"}{\textAlpha}%
+      }%
+    }%
+  }%
+}
+\DeclareTextCommand{\LGR@E@hiatus}{\LastDeclaredEncoding}{%
+  \LGR@ifnextchar{Ι}{\textEpsilon\"}{%
+    \LGR@ifnextchar{Υ}{\textEpsilon\"}{%
+      \LGR@ifnextchar{\textIota}{\textEpsilon\"}{%
+        \LGR@ifnextchar{\textUpsilon}{\textEpsilon\"}{\textEpsilon}%
+      }%
+    }%
+  }%
+}
+ +
+
+
+ + diff --git a/language/greek/greek-fontenc/greek-euenc.def.txt b/language/greek/greek-fontenc/greek-euenc.def.txt new file mode 100644 index 0000000000..c022f7f160 --- /dev/null +++ b/language/greek/greek-fontenc/greek-euenc.def.txt @@ -0,0 +1,881 @@ +greek-euenc.def ++++++++++++++++ +Greek LICR definitions for XeTeX and LuaTeX +******************************************* + +:Copyright: © 2013 Günter Milde +: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: + :: + + \ProvidesFile{greek-euenc.def} + [2018/01/06 0.13.3 Greek LICRs for XeTeX and LuaTeX] + +:abstract: + Experimental support for Greek LICR macros with XeTeX and LuaTeX. + Extends euenc_. Used by babel-greek_ and textalpha_. + +**History**: + .. class:: borderless + + ====== ========== ======================================================== + 0.1 2013-07-16 initial version + 0.1.1 2013-07-18 bugfix: wrong breathings psilioxia -> dasiaoxia + 0.1.2 2013-07-19 bugfix: Disable composite defs starting with char macro, + .. fix "hiatus" handling. + 0.1.3 2013-07-24 fix "input" path. + 0.1.4 2013-10-01 remove clashing defs for legacy characters with oxia, + .. fix upcasing of ``\finalsigma``. + 0.11.1 2013-12-01 fix identification. + 0.11.2 2014-09-08 ``\textKoppa`` macro + .. (Capital Koppa is not defined in LGR but Unicode). + 0.12 2014-12-12 Remove symbol macros for breathing accents. + 0.13 2015-08-07 ``\lccode``/``\uccode`` corrections from xgreek_. + .. LICR macros for symbol variants. + 0.13.3 2018-01-06 Documentation update. + ====== ========== ======================================================== + +.. contents:: + +Motivation +========== + +LICR macro definitions for the Greek script are missing in both, xunicode_ +and euenc_. + +This file expands the font encoding definition files ``eu1enc.def`` rsp. +``eu2enc.def`` from euenc_ defining `LaTeX Internal Character +Representaction` (LICR) macros for Greek letters and symbols. It works +independed of xunicode_ using the standard commands for `LaTeX2e font +selection`_. + +Requirements +============ + +Requires XeTeX or LuaTeX, fontspec_, and a font with Greek characters. + +See ``_ and ``_ for setup and +usage examples. + + +Greek Diacritics +================ + +Define "named macros" for simple and combined diacritics. + +* Named accent macros can be used instead of the ``\@tabacckludge`` by + to-LaTeX converters to ensure working also inside the tabbing environment. + +* Named macros are required for upcasing according to Greek typesetting + conventions and in the definition of composite commands. + +Greek alias names for standard accents:: + + \DeclareTextCommand{\acctonos}{\LastDeclaredEncoding}{\@tabacckludge'} + \DeclareTextCommand{\accvaria}{\LastDeclaredEncoding}{\@tabacckludge`} + \DeclareTextCommand{\accdialytika}{\LastDeclaredEncoding}{\@tabacckludge"} + +The combining perispomeni character is normalized with Greek base letters, +while the (standard) combining tilde is not:: + + \DeclareTextCommand{\accperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 } + +Breathings: + +(The COMBINING GREEK KORONIS is a legacy character, discarded in favour of +COMBINING COMMA ABOVE) :: + + \DeclareTextCommand{\accpsili}{\LastDeclaredEncoding}[1]{#1\char"0313 } % ψιλή spiritus lenis (smooth breathing) + \DeclareTextCommand{\accdasia}{\LastDeclaredEncoding}[1]{#1\char"0314 } % δασεῖα spiritus asper (rough breathing) + + +Sub-iota: + +``\ypogegrammeni`` is a postfix accent (ligature in LGR) :: + + \DeclareTextSymbol{\ypogegrammeni}{\LastDeclaredEncoding}{0837} % COMBINING GREEK YPOGEGRAMMENI + +Combined diacritics:: + + % The COMBINING DIALYTIKA TONOS is discarded and not well supported by fonts: + \DeclareTextCommand{\accdialytikatonos}{\LastDeclaredEncoding}[1]{#1\char"0308 \char"0301 } + \DeclareTextCommand{\accdialytikavaria}{\LastDeclaredEncoding}[1]{#1\char"0308 \char"0300 } + \DeclareTextCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 \char"0308 } + + \DeclareTextCommand{\accdasiaoxia}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0301 } + \DeclareTextCommand{\accdasiavaria}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0300 } + \DeclareTextCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0314 \char"0342 } + + \DeclareTextCommand{\accpsilioxia}{\LastDeclaredEncoding}[1]{#1\char"0301 \char"0313 } + \DeclareTextCommand{\accpsilivaria}{\LastDeclaredEncoding}[1]{#1\char"0300 \char"0313 } + \DeclareTextCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}[1]{#1\char"0342 \char"0313 } + + +Common Definitions +================== + +Use the `common Greek font encoding definitions`_:: + + \input{greek-fontenc.def} + + +Character Definitions +===================== + +General Punctuation +~~~~~~~~~~~~~~~~~~~ + +Ligature break up with ZERO WIDTH NON-JOINER:: + + \DeclareTextCommand{\textcompwordmark}{\LastDeclaredEncoding}{\char"200C} + +Greek and Coptic +~~~~~~~~~~~~~~~~ + +:: + + % NR Unicode Name % babel name, % PU name + % 0370 GREEK CAPITAL LETTER HETA % Ͱ + % 0371 GREEK SMALL LETTER HETA % ͱ + % 0372 GREEK CAPITAL LETTER ARCHAIC SAMPI % Ͳ + % 0373 GREEK SMALL LETTER ARCHAIC SAMPI % ͳ + \DeclareTextCommand{\textdexiakeraia}{\LastDeclaredEncoding}{ʹ} % \anwtonos, \textnumeralsigngreek + \DeclareTextCommand{\textaristerikeraia}{\LastDeclaredEncoding}{͵} % \katwtonos, \textnumeralsignlowergreek + % 0376 GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA % Ͷ + % 0377 GREEK SMALL LETTER PAMPHYLIAN DIGAMMA % ͷ + + % 037A GREEK YPOGEGRAMMENI (use \textcompwordmark\ypogegrammeni) % ͺ + % 037B GREEK SMALL REVERSED LUNATE SIGMA SYMBOL + % 037C GREEK SMALL DOTTED LUNATE SIGMA SYMBOL + % 037D GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL + \DeclareTextCommand{\texterotimatiko}{\LastDeclaredEncoding}{;} % 037E GREEK QUESTION MARK + + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textcompwordmark}{΄} + \DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textcompwordmark}{΅} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textAlpha}{Ά} + \DeclareTextCommand{\textanoteleia}{\LastDeclaredEncoding}{·} % \anoteleia + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textEpsilon}{Έ} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textEta}{Ή} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textIota}{Ί} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textOmicron}{Ό} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textUpsilon}{Ύ} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textOmega}{Ώ} + \DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textiota}{ΐ} + + \DeclareTextCommand{\textAlpha}{\LastDeclaredEncoding}{Α} + \DeclareTextCommand{\textBeta}{\LastDeclaredEncoding}{Β} + \DeclareTextCommand{\textGamma}{\LastDeclaredEncoding}{Γ} + \DeclareTextCommand{\textDelta}{\LastDeclaredEncoding}{Δ} + \DeclareTextCommand{\textEpsilon}{\LastDeclaredEncoding}{Ε} + \DeclareTextCommand{\textZeta}{\LastDeclaredEncoding}{Ζ} + \DeclareTextCommand{\textEta}{\LastDeclaredEncoding}{Η} + \DeclareTextCommand{\textTheta}{\LastDeclaredEncoding}{Θ} + \DeclareTextCommand{\textIota}{\LastDeclaredEncoding}{Ι} + \DeclareTextCommand{\textKappa}{\LastDeclaredEncoding}{Κ} + \DeclareTextCommand{\textLambda}{\LastDeclaredEncoding}{Λ} + \DeclareTextCommand{\textMu}{\LastDeclaredEncoding}{Μ} + \DeclareTextCommand{\textNu}{\LastDeclaredEncoding}{Ν} + \DeclareTextCommand{\textXi}{\LastDeclaredEncoding}{Ξ} + \DeclareTextCommand{\textOmicron}{\LastDeclaredEncoding}{Ο} + \DeclareTextCommand{\textPi}{\LastDeclaredEncoding}{Π} + \DeclareTextCommand{\textRho}{\LastDeclaredEncoding}{Ρ} + \DeclareTextCommand{\textSigma}{\LastDeclaredEncoding}{Σ} + \DeclareTextCommand{\textTau}{\LastDeclaredEncoding}{Τ} + \DeclareTextCommand{\textUpsilon}{\LastDeclaredEncoding}{Υ} + \DeclareTextCommand{\textPhi}{\LastDeclaredEncoding}{Φ} + \DeclareTextCommand{\textChi}{\LastDeclaredEncoding}{Χ} + \DeclareTextCommand{\textPsi}{\LastDeclaredEncoding}{Ψ} + \DeclareTextCommand{\textOmega}{\LastDeclaredEncoding}{Ω} + + \DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textIota}{Ϊ} + \DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textUpsilon}{Ϋ} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textalpha}{ά} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textepsilon}{έ} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\texteta}{ή} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textiota}{ί} + \DeclareTextCompositeCommand{\accdialytikatonos}{\LastDeclaredEncoding}{\textupsilon}{ΰ} + + \DeclareTextCommand{\textalpha}{\LastDeclaredEncoding}{α} + \DeclareTextCommand{\textbeta}{\LastDeclaredEncoding}{β} + \DeclareTextCommand{\textgamma}{\LastDeclaredEncoding}{γ} + \DeclareTextCommand{\textdelta}{\LastDeclaredEncoding}{δ} + \DeclareTextCommand{\textepsilon}{\LastDeclaredEncoding}{ε} + \DeclareTextCommand{\textvarepsilon}{\LastDeclaredEncoding}{ε} % cf. $\varepsiolon$ + \DeclareTextCommand{\textzeta}{\LastDeclaredEncoding}{ζ} + \DeclareTextCommand{\texteta}{\LastDeclaredEncoding}{η} + \DeclareTextCommand{\texttheta}{\LastDeclaredEncoding}{θ} + \DeclareTextCommand{\textiota}{\LastDeclaredEncoding}{ι} + \DeclareTextCommand{\textkappa}{\LastDeclaredEncoding}{κ} + \DeclareTextCommand{\textlambda}{\LastDeclaredEncoding}{λ} + \DeclareTextCommand{\textmu}{\LastDeclaredEncoding}{μ} % \textmugreek + \DeclareTextCommand{\textnu}{\LastDeclaredEncoding}{ν} + \DeclareTextCommand{\textxi}{\LastDeclaredEncoding}{ξ} + \DeclareTextCommand{\textomicron}{\LastDeclaredEncoding}{ο} + \DeclareTextCommand{\textpi}{\LastDeclaredEncoding}{π} + \DeclareTextCommand{\textrho}{\LastDeclaredEncoding}{ρ} + \DeclareTextCommand{\textvarsigma}{\LastDeclaredEncoding}{ς} % final sigma + \DeclareTextCommand{\textfinalsigma}{\LastDeclaredEncoding}{\textvarsigma} + \DeclareTextCommand{\textsigma}{\LastDeclaredEncoding}{σ} + % Dummy definition (\textautosigma is lowercase of \textSigma): + \ProvideTextCommand{\textautosigma}{\LastDeclaredEncoding}{\textsigma} + \DeclareTextCommand{\texttau}{\LastDeclaredEncoding}{τ} + \DeclareTextCommand{\textupsilon}{\LastDeclaredEncoding}{υ} + \DeclareTextCommand{\textphi}{\LastDeclaredEncoding}{φ} + \DeclareTextCommand{\textvarphi}{\LastDeclaredEncoding}{φ} % cf. $\varphi$ + \DeclareTextCommand{\textchi}{\LastDeclaredEncoding}{χ} + \DeclareTextCommand{\textpsi}{\LastDeclaredEncoding}{ψ} + \DeclareTextCommand{\textomega}{\LastDeclaredEncoding}{ω} + + \DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textiota}{ϊ} + \DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\textupsilon}{ϋ} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textomicron}{ό} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textupsilon}{ύ} + \DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\textomega}{ώ} + + \DeclareTextCommand{\textQoppa}{\LastDeclaredEncoding}{Ϙ} + \DeclareTextCommand{\textqoppa}{\LastDeclaredEncoding}{ϙ} + \DeclareTextCommand{\textStigma}{\LastDeclaredEncoding}{Ϛ} + \DeclareTextCommand{\textstigma}{\LastDeclaredEncoding}{ϛ} + \DeclareTextCommand{\textDigamma}{\LastDeclaredEncoding}{Ϝ} + \DeclareTextCommand{\textdigamma}{\LastDeclaredEncoding}{ϝ} + \DeclareTextCommand{\textKoppa}{\LastDeclaredEncoding}{Ϟ} % not defined in LGR + \DeclareTextCommand{\textkoppa}{\LastDeclaredEncoding}{ϟ} % \koppa, \textqoppa [sic!] + \DeclareTextCommand{\textSampi}{\LastDeclaredEncoding}{Ϡ} + \DeclareTextCommand{\textsampi}{\LastDeclaredEncoding}{ϡ} + + % Symbol variants + \DeclareTextCommand{\textbetasymbol}{\LastDeclaredEncoding}{ϐ} + \DeclareTextCommand{\textkappasymbol}{\LastDeclaredEncoding}{ϰ} + \DeclareTextCommand{\textThetasymbol}{\LastDeclaredEncoding}{ϴ} + \DeclareTextCommand{\textthetasymbol}{\LastDeclaredEncoding}{ϑ} + \DeclareTextCommand{\textphisymbol}{\LastDeclaredEncoding}{ϕ} + \DeclareTextCommand{\textpisymbol}{\LastDeclaredEncoding}{ϖ} + \DeclareTextCommand{\textrhosymbol}{\LastDeclaredEncoding}{ϱ} + \DeclareTextCommand{\textepsilonsymbol}{\LastDeclaredEncoding}{ϵ} + % math compatibility aliases + % $\varphi$ and $\varepsilon$ refer to the letter characters (see above)! + \DeclareTextCommand{\textvarbeta}{\LastDeclaredEncoding}{\textbetasymbol} + \DeclareTextCommand{\textvarkappa}{\LastDeclaredEncoding}{ϰ} + \DeclareTextCommand{\textvarTheta}{\LastDeclaredEncoding}{ϴ} + \DeclareTextCommand{\textvartheta}{\LastDeclaredEncoding}{ϑ} + \DeclareTextCommand{\textvarpi}{\LastDeclaredEncoding}{ϖ} + \DeclareTextCommand{\textvarrho}{\LastDeclaredEncoding}{ϱ} + +Greek Extended +~~~~~~~~~~~~~~ + +We skip definitions for characters "... WITH OXIA", because they would +overwrite the defintions for "... WITH TONOS" in the `Greek and Coptic` +block. + +:: + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textalpha}{ἀ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textalpha}{ἁ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textalpha}{ἂ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textalpha}{ἃ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textalpha}{ἄ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textalpha}{ἅ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textalpha}{ἆ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textalpha}{ἇ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textAlpha}{Ἀ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textAlpha}{Ἁ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textAlpha}{Ἂ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textAlpha}{Ἃ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textAlpha}{Ἄ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textAlpha}{Ἅ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textAlpha}{Ἆ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textAlpha}{Ἇ} + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textepsilon}{ἐ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textepsilon}{ἑ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textepsilon}{ἒ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textepsilon}{ἓ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textepsilon}{ἔ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textepsilon}{ἕ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textEpsilon}{Ἐ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textEpsilon}{Ἑ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textEpsilon}{Ἒ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textEpsilon}{Ἓ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textEpsilon}{Ἔ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textEpsilon}{Ἕ} + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\texteta}{ἠ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\texteta}{ἡ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\texteta}{ἢ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\texteta}{ἣ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\texteta}{ἤ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\texteta}{ἥ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\texteta}{ἦ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\texteta}{ἧ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textEta}{Ἠ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textEta}{Ἡ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textEta}{Ἢ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textEta}{Ἣ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textEta}{Ἤ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textEta}{Ἥ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textEta}{Ἦ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textEta}{Ἧ} + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textiota}{ἰ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textiota}{ἱ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textiota}{ἲ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textiota}{ἳ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textiota}{ἴ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textiota}{ἵ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textiota}{ἶ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textiota}{ἷ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textIota}{Ἰ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textIota}{Ἱ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textIota}{Ἲ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textIota}{Ἳ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textIota}{Ἴ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textIota}{Ἵ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textIota}{Ἶ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textIota}{Ἷ} + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textomicron}{ὀ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textomicron}{ὁ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textomicron}{ὂ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textomicron}{ὃ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textomicron}{ὄ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textomicron}{ὅ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textOmicron}{Ὀ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textOmicron}{Ὁ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textOmicron}{Ὂ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textOmicron}{Ὃ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textOmicron}{Ὄ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textOmicron}{Ὅ} + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textupsilon}{ὐ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textupsilon}{ὑ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textupsilon}{ὒ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textupsilon}{ὓ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textupsilon}{ὔ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textupsilon}{ὕ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ὖ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ὗ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textUpsilon}{Ὑ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textUpsilon}{Ὓ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textUpsilon}{Ὕ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textUpsilon}{Ὗ} + + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textomega}{ὠ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textomega}{ὡ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textomega}{ὢ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textomega}{ὣ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textomega}{ὤ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textomega}{ὥ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textomega}{ὦ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textomega}{ὧ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textOmega}{Ὠ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textOmega}{Ὡ} + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textOmega}{Ὢ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textOmega}{Ὣ} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textOmega}{Ὤ} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textOmega}{Ὥ} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textOmega}{Ὦ} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textOmega}{Ὧ} + + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textalpha}{ὰ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textepsilon}{ὲ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\texteta}{ὴ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textiota}{ὶ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textomicron}{ὸ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textupsilon}{ὺ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textomega}{ὼ} + + \DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textalpha}{ᾰ} + \DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textalpha}{ᾱ} + % ᾲ + % ᾳ + % ᾴ + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textalpha}{ᾶ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{α}{ᾶ} + \DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textalpha}{ᾶ} + % ᾷ + \DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textAlpha}{Ᾰ} + \DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textAlpha}{Ᾱ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textAlpha}{Ὰ} + % ᾼ + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textcompwordmark}{᾽} + \DeclareTextCommand{\prosgegrammeni}{\LastDeclaredEncoding}{ι} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textcompwordmark}{᾿} + + \DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῀} + \DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῁} + % ῂ + % ῃ + % ῄ + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\texteta}{ῆ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{η}{ῆ} + \DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\texteta}{ῆ} + % ῇ + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textEpsilon}{Ὲ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textEta}{Ὴ} + % ῌ + \DeclareTextCompositeCommand{\accpsilivaria}{\LastDeclaredEncoding}{\textcompwordmark}{῍} + \DeclareTextCompositeCommand{\accpsilioxia}{\LastDeclaredEncoding}{\textcompwordmark}{῎} + \DeclareTextCompositeCommand{\accpsiliperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῏} + + \DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textiota}{ῐ} + \DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textiota}{ῑ} + \DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textiota}{ῒ} + \DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textiota}{ΐ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textiota}{ῖ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{ι}{ῖ} + \DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textiota}{ῖ} + \DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textiota}{ῗ} + \DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textIota}{Ῐ} + \DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textIota}{Ῑ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textIota}{Ὶ} + \DeclareTextCompositeCommand{\accdasiavaria}{\LastDeclaredEncoding}{\textcompwordmark}{῝} + \DeclareTextCompositeCommand{\accdasiaoxia}{\LastDeclaredEncoding}{\textcompwordmark}{῞} + \DeclareTextCompositeCommand{\accdasiaperispomeni}{\LastDeclaredEncoding}{\textcompwordmark}{῟} + + \DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textupsilon}{ῠ} + \DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textupsilon}{ῡ} + \DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textupsilon}{ῢ} + \DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textupsilon}{ΰ} + \DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\textrho}{ῤ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textrho}{ῥ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textupsilon}{ῦ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{υ}{ῦ} + \DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ῦ} + \DeclareTextCompositeCommand{\accdialytikaperispomeni}{\LastDeclaredEncoding}{\textupsilon}{ῧ} + \DeclareTextCompositeCommand{\u}{\LastDeclaredEncoding}{\textUpsilon}{Ῠ} + \DeclareTextCompositeCommand{\=}{\LastDeclaredEncoding}{\textUpsilon}{Ῡ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textUpsilon}{Ὺ} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textRho}{Ῥ} + \DeclareTextCompositeCommand{\accdialytikavaria}{\LastDeclaredEncoding}{\textcompwordmark}{῭} + \DeclareTextCompositeCommand{\accdialytikaoxia}{\LastDeclaredEncoding}{\textcompwordmark}{΅} + + % ῲ + % ῳ + % ῴ + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\textomega}{ῶ} + \DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{ω}{ῶ} + \DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\textomega}{ῶ} + % ῷ + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textOmicron}{Ὸ} + \DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\textOmega}{Ὼ} + % ῼ + \DeclareTextCompositeCommand{\accoxia}{\LastDeclaredEncoding}{\textcompwordmark}{´} + \DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\textcompwordmark}{῾} + +Letterlike Symbols +~~~~~~~~~~~~~~~~~~ +:: + + \DeclareTextCommand{\textohm}{\LastDeclaredEncoding}{Ω} % OHM SIGN + +Ancient Greek Numbers +~~~~~~~~~~~~~~~~~~~~~ +TODO: map other chars to corresponding Greek letters. +See also the grnumalt_ package. + +Definition with literal Unicode characters, because the code-point has 5 +hexadecimal digits: + +:: + + \DeclareTextCommand{\textpentedeka}{\LastDeclaredEncoding}{𐅄} % GREEK ACROPHONIC ATTIC FIFTY + \DeclareTextCommand{\textpentehekaton}{\LastDeclaredEncoding}{𐅅} % GREEK ACROPHONIC ATTIC FIVE HUNDRED + \DeclareTextCommand{\textpenteqilioi}{\LastDeclaredEncoding}{𐅆} % GREEK ACROPHONIC ATTIC FIVE THOUSAND + \DeclareTextCommand{\textpentemuria}{\LastDeclaredEncoding}{𐅇} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND + + +UPPERCASE +========= + +Greek letters drop diacritics (eccept dialytika and sub-iota) in UPPERCASE. + +uc/lc values +~~~~~~~~~~~~ + +``\lccode`` and ``\uccode`` corrections from the xgreek_ package by Apostolos Syropoulos:: + + \global\lccode"0370="0371 \global\uccode"0370="0370 + \global\lccode"0371="0371 \global\uccode"0371="0370 + \global\lccode"0372="0373 \global\uccode"0372="0372 + \global\lccode"0373="0373 \global\uccode"0373="0372 + \global\lccode"0376="0377 \global\uccode"0376="0376 + \global\lccode"0377="0377 \global\uccode"0377="0376 + \global\lccode"03FD="037B \global\uccode"03FD="03FD + \global\lccode"037B="037B \global\uccode"037B="03FD + \global\lccode"03FE="037C \global\uccode"03FE="03FE + \global\lccode"037C="037C \global\uccode"037C="03FE + \global\lccode"03FF="037D \global\uccode"03FF="03FF + \global\lccode"037D="037D \global\uccode"037D="03FF + \global\lccode"0386="03AC \global\uccode"0386="0391 + \global\lccode"0388="03AD \global\uccode"0388="0395 + \global\lccode"0389="03AC \global\uccode"0389="0397 + \global\lccode"038A="03AF \global\uccode"038A="0399 + \global\lccode"038C="03CC \global\uccode"038C="039F + \global\lccode"038E="03CD \global\uccode"038E="03A5 + \global\lccode"038F="03CE \global\uccode"038F="03A9 + \global\lccode"0390="0390 \global\uccode"0390="03AA + \global\lccode"0391="03B1 \global\uccode"0391="0391 + \global\lccode"0392="03B2 \global\uccode"0392="0392 + \global\lccode"0393="03B3 \global\uccode"0393="0393 + \global\lccode"0394="03B4 \global\uccode"0394="0394 + \global\lccode"0395="03B5 \global\uccode"0395="0395 + \global\lccode"0396="03B6 \global\uccode"0396="0396 + \global\lccode"0397="03B7 \global\uccode"0397="0397 + \global\lccode"0398="03B8 \global\uccode"0398="0398 + \global\lccode"0399="03B9 \global\uccode"0399="0399 + \global\lccode"039A="03BA \global\uccode"039A="039A + \global\lccode"039B="03BB \global\uccode"039B="039B + \global\lccode"039C="03BC \global\uccode"039C="039C + \global\lccode"039D="03BD \global\uccode"039D="039D + \global\lccode"039E="03BE \global\uccode"039E="039E + \global\lccode"039F="03BF \global\uccode"039F="039F + \global\lccode"03A0="03C0 \global\uccode"03A0="03A0 + \global\lccode"03A1="03C1 \global\uccode"03A1="03A1 + \global\lccode"03A3="03C3 \global\uccode"03A3="03A3 + \global\lccode"03A4="03C4 \global\uccode"03A4="03A4 + \global\lccode"03A5="03C5 \global\uccode"03A5="03A5 + \global\lccode"03A6="03C6 \global\uccode"03A6="03A6 + \global\lccode"03A7="03C7 \global\uccode"03A7="03A7 + \global\lccode"03A8="03C8 \global\uccode"03A8="03A8 + \global\lccode"03A9="03C9 \global\uccode"03A9="03A9 + \global\lccode"03AA="03CA \global\uccode"03AA="03AA + \global\lccode"03AB="03CB \global\uccode"03AB="03AB + \global\lccode"03AC="03AC \global\uccode"03AC="0391 + \global\lccode"03AD="03AD \global\uccode"03AD="0395 + \global\lccode"03AE="03AE \global\uccode"03AE="0397 + \global\lccode"03AF="03AF \global\uccode"03AF="0399 + \global\lccode"03B0="03B0 \global\uccode"03B0="03AB + \global\lccode"03B1="03B1 \global\uccode"03B1="0391 + \global\lccode"03B2="03B2 \global\uccode"03B2="0392 + \global\lccode"03B3="03B3 \global\uccode"03B3="0393 + \global\lccode"03B4="03B4 \global\uccode"03B4="0394 + \global\lccode"03B5="03B5 \global\uccode"03B5="0395 + \global\lccode"03B6="03B6 \global\uccode"03B6="0396 + \global\lccode"03B7="03B7 \global\uccode"03B7="0397 + \global\lccode"03B8="03B8 \global\uccode"03B8="0398 + \global\lccode"03B9="03B9 \global\uccode"03B9="0399 + \global\lccode"03BA="03BA \global\uccode"03BA="039A + \global\lccode"03BB="03BB \global\uccode"03BB="039B + \global\lccode"03BC="03BC \global\uccode"03BC="039C + \global\lccode"03BD="03BD \global\uccode"03BD="039D + \global\lccode"03BE="03BE \global\uccode"03BE="039E + \global\lccode"03BF="03BF \global\uccode"03BF="039F + \global\lccode"03C0="03C0 \global\uccode"03C0="03A0 + \global\lccode"03C1="03C1 \global\uccode"03C1="03A1 + \global\lccode"03C2="03C2 \global\uccode"03C2="03A3 + \global\lccode"03C3="03C3 \global\uccode"03C3="03A3 + \global\lccode"03C4="03C4 \global\uccode"03C4="03A4 + \global\lccode"03C5="03C5 \global\uccode"03C5="03A5 + \global\lccode"03C6="03C6 \global\uccode"03C6="03A6 + \global\lccode"03C7="03C7 \global\uccode"03C7="03A7 + \global\lccode"03C8="03C8 \global\uccode"03C8="03A8 + \global\lccode"03C9="03C9 \global\uccode"03C9="03A9 + \global\lccode"03CA="03CA \global\uccode"03CA="03AA + \global\lccode"03CB="03CB \global\uccode"03CB="03AB + \global\lccode"03CC="03CC \global\uccode"03CC="039F + \global\lccode"03CD="03CD \global\uccode"03CD="03A5 + \global\lccode"03CE="03CE \global\uccode"03CE="03A9 + \global\lccode"03D0="03D0 \global\uccode"03D0="0392 + \global\lccode"03D1="03D1 \global\uccode"03D1="0398 + \global\lccode"03D2="03C5 \global\uccode"03D2="03A5 + \global\lccode"03D3="03CD \global\uccode"03D3="03A5 + \global\lccode"03D4="03CB \global\uccode"03D4="03AB + \global\lccode"03D5="03C6 \global\uccode"03D5="03A6 + \global\lccode"03D6="03C0 \global\uccode"03D6="03A0 + \global\lccode"03DA="03DB \global\uccode"03DA="03DA + \global\lccode"03DB="03DB \global\uccode"03DB="03DA + \global\lccode"03DC="03DD \global\uccode"03DC="03DC + \global\lccode"03DD="03DD \global\uccode"03DD="03DC + \global\lccode"03DE="03DF \global\uccode"03DE="03DE + \global\lccode"03DF="03DF \global\uccode"03DF="03DE + \global\lccode"03E0="03E1 \global\uccode"03E0="03E0 + \global\lccode"03E1="03E1 \global\uccode"03E1="03E0 + \global\lccode"03F0="03BA \global\uccode"03F0="039A + \global\lccode"03F1="03C1 \global\uccode"03F1="03A1 + \global\lccode"03F2="03F2 \global\uccode"03F2="03F9 + \global\lccode"03F9="03F2 \global\uccode"03F9="03F9 + \global\lccode"1F00="1F00 \global\uccode"1F00="0391 + \global\lccode"1F01="1F01 \global\uccode"1F01="0391 + \global\lccode"1F02="1F02 \global\uccode"1F02="0391 + \global\lccode"1F03="1F03 \global\uccode"1F03="0391 + \global\lccode"1F04="1F04 \global\uccode"1F04="0391 + \global\lccode"1F05="1F05 \global\uccode"1F05="0391 + \global\lccode"1F06="1F06 \global\uccode"1F06="0391 + \global\lccode"1F07="1F07 \global\uccode"1F07="0391 + \global\lccode"1F08="1F00 \global\uccode"1F08="0391 + \global\lccode"1F09="1F01 \global\uccode"1F09="0391 + \global\lccode"1F0A="1F02 \global\uccode"1F0A="0391 + \global\lccode"1F0B="1F03 \global\uccode"1F0B="0391 + \global\lccode"1F0C="1F04 \global\uccode"1F0C="0391 + \global\lccode"1F0D="1F05 \global\uccode"1F0D="0391 + \global\lccode"1F0E="1F06 \global\uccode"1F0E="0391 + \global\lccode"1F0F="1F07 \global\uccode"1F0F="0391 + \global\lccode"1F10="1F10 \global\uccode"1F10="0395 + \global\lccode"1F11="1F11 \global\uccode"1F11="0395 + \global\lccode"1F12="1F12 \global\uccode"1F12="0395 + \global\lccode"1F13="1F13 \global\uccode"1F13="0395 + \global\lccode"1F14="1F14 \global\uccode"1F14="0395 + \global\lccode"1F15="1F15 \global\uccode"1F15="0395 + \global\lccode"1F18="1F10 \global\uccode"1F18="0395 + \global\lccode"1F19="1F11 \global\uccode"1F19="0395 + \global\lccode"1F1A="1F12 \global\uccode"1F1A="0395 + \global\lccode"1F1B="1F13 \global\uccode"1F1B="0395 + \global\lccode"1F1C="1F14 \global\uccode"1F1C="0395 + \global\lccode"1F1D="1F15 \global\uccode"1F1D="0395 + \global\lccode"1F20="1F20 \global\uccode"1F20="0397 + \global\lccode"1F21="1F21 \global\uccode"1F21="0397 + \global\lccode"1F22="1F22 \global\uccode"1F22="0397 + \global\lccode"1F23="1F23 \global\uccode"1F23="0397 + \global\lccode"1F24="1F24 \global\uccode"1F24="0397 + \global\lccode"1F25="1F25 \global\uccode"1F25="0397 + \global\lccode"1F26="1F26 \global\uccode"1F26="0397 + \global\lccode"1F27="1F27 \global\uccode"1F27="0397 + \global\lccode"1F28="1F20 \global\uccode"1F28="0397 + \global\lccode"1F29="1F21 \global\uccode"1F29="0397 + \global\lccode"1F2A="1F22 \global\uccode"1F2A="0397 + \global\lccode"1F2B="1F23 \global\uccode"1F2B="0397 + \global\lccode"1F2C="1F24 \global\uccode"1F2C="0397 + \global\lccode"1F2D="1F25 \global\uccode"1F2D="0397 + \global\lccode"1F2E="1F26 \global\uccode"1F2E="0397 + \global\lccode"1F2F="1F27 \global\uccode"1F2F="0397 + \global\lccode"1F30="1F30 \global\uccode"1F30="0399 + \global\lccode"1F31="1F31 \global\uccode"1F31="0399 + \global\lccode"1F32="1F32 \global\uccode"1F32="0399 + \global\lccode"1F33="1F33 \global\uccode"1F33="0399 + \global\lccode"1F34="1F34 \global\uccode"1F34="0399 + \global\lccode"1F35="1F35 \global\uccode"1F35="0399 + \global\lccode"1F36="1F36 \global\uccode"1F36="0399 + \global\lccode"1F37="1F37 \global\uccode"1F37="0399 + \global\lccode"1F38="1F30 \global\uccode"1F38="0399 + \global\lccode"1F39="1F31 \global\uccode"1F39="0399 + \global\lccode"1F3A="1F32 \global\uccode"1F3A="0399 + \global\lccode"1F3B="1F33 \global\uccode"1F3B="0399 + \global\lccode"1F3C="1F34 \global\uccode"1F3C="0399 + \global\lccode"1F3D="1F35 \global\uccode"1F3D="0399 + \global\lccode"1F3E="1F36 \global\uccode"1F3E="0399 + \global\lccode"1F3F="1F37 \global\uccode"1F3F="0399 + \global\lccode"1F40="1F40 \global\uccode"1F40="039F + \global\lccode"1F41="1F41 \global\uccode"1F41="039F + \global\lccode"1F42="1F42 \global\uccode"1F42="039F + \global\lccode"1F43="1F43 \global\uccode"1F43="039F + \global\lccode"1F44="1F44 \global\uccode"1F44="039F + \global\lccode"1F45="1F45 \global\uccode"1F45="039F + \global\lccode"1F48="1F40 \global\uccode"1F48="039F + \global\lccode"1F49="1F41 \global\uccode"1F49="039F + \global\lccode"1F4A="1F42 \global\uccode"1F4A="039F + \global\lccode"1F4B="1F43 \global\uccode"1F4B="039F + \global\lccode"1F4C="1F44 \global\uccode"1F4C="039F + \global\lccode"1F4D="1F45 \global\uccode"1F4D="039F + \global\lccode"1F50="1F50 \global\uccode"1F50="03A5 + \global\lccode"1F51="1F51 \global\uccode"1F51="03A5 + \global\lccode"1F52="1F52 \global\uccode"1F52="03A5 + \global\lccode"1F53="1F53 \global\uccode"1F53="03A5 + \global\lccode"1F54="1F54 \global\uccode"1F54="03A5 + \global\lccode"1F55="1F55 \global\uccode"1F55="03A5 + \global\lccode"1F56="1F56 \global\uccode"1F56="03A5 + \global\lccode"1F57="1F57 \global\uccode"1F57="03A5 + \global\lccode"1F59="1F51 \global\uccode"1F59="03A5 + \global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5 + \global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5 + \global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5 + \global\lccode"1F60="1F60 \global\uccode"1F60="03A9 + \global\lccode"1F61="1F61 \global\uccode"1F61="03A9 + \global\lccode"1F62="1F62 \global\uccode"1F62="03A9 + \global\lccode"1F63="1F63 \global\uccode"1F63="03A9 + \global\lccode"1F64="1F64 \global\uccode"1F64="03A9 + \global\lccode"1F65="1F65 \global\uccode"1F65="03A9 + \global\lccode"1F66="1F66 \global\uccode"1F66="03A9 + \global\lccode"1F67="1F67 \global\uccode"1F67="03A9 + \global\lccode"1F68="1F60 \global\uccode"1F68="03A9 + \global\lccode"1F69="1F61 \global\uccode"1F69="03A9 + \global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9 + \global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9 + \global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9 + \global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9 + \global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9 + \global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9 + \global\lccode"1F70="1F70 \global\uccode"1F70="0391 + \global\lccode"1F71="1F71 \global\uccode"1F71="0391 + \global\lccode"1F72="1F72 \global\uccode"1F72="0395 + \global\lccode"1F73="1F73 \global\uccode"1F73="0395 + \global\lccode"1F74="1F74 \global\uccode"1F74="0397 + \global\lccode"1F75="1F75 \global\uccode"1F75="0397 + \global\lccode"1F76="1F76 \global\uccode"1F76="0399 + \global\lccode"1F77="1F77 \global\uccode"1F77="0399 + \global\lccode"1F78="1F78 \global\uccode"1F78="039F + \global\lccode"1F79="1F79 \global\uccode"1F79="039F + \global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5 + \global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5 + \global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9 + \global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9 + \global\lccode"1F80="1F80 \global\uccode"1F80="1FBC + \global\lccode"1F81="1F81 \global\uccode"1F81="1FBC + \global\lccode"1F82="1F82 \global\uccode"1F82="1FBC + \global\lccode"1F83="1F83 \global\uccode"1F83="1FBC + \global\lccode"1F84="1F84 \global\uccode"1F84="1FBC + \global\lccode"1F85="1F85 \global\uccode"1F85="1FBC + \global\lccode"1F86="1F86 \global\uccode"1F86="1FBC + \global\lccode"1F87="1F87 \global\uccode"1F87="1FBC + \global\lccode"1F88="1F80 \global\uccode"1F88="1FBC + \global\lccode"1F89="1F81 \global\uccode"1F89="1FBC + \global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC + \global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC + \global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC + \global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC + \global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC + \global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC + \global\lccode"1F90="1F90 \global\uccode"1F90="1FCC + \global\lccode"1F91="1F91 \global\uccode"1F91="1FCC + \global\lccode"1F92="1F92 \global\uccode"1F92="1FCC + \global\lccode"1F93="1F93 \global\uccode"1F93="1FCC + \global\lccode"1F94="1F94 \global\uccode"1F94="1FCC + \global\lccode"1F95="1F95 \global\uccode"1F95="1FCC + \global\lccode"1F96="1F96 \global\uccode"1F96="1FCC + \global\lccode"1F97="1F97 \global\uccode"1F97="1FCC + \global\lccode"1F98="1F90 \global\uccode"1F98="1FCC + \global\lccode"1F99="1F91 \global\uccode"1F99="1FCC + \global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC + \global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC + \global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC + \global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC + \global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC + \global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC + \global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC + \global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC + \global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC + \global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC + \global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC + \global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC + \global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC + \global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC + \global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC + \global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC + \global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC + \global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC + \global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC + \global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC + \global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC + \global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC + \global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8 + \global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9 + \global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC + \global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC + \global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC + \global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391 + \global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC + \global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8 + \global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9 + \global\lccode"1FBA="1F70 \global\uccode"1FBA="0391 + \global\lccode"1FBB="1F71 \global\uccode"1FBB="0391 + \global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC + \global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD + \global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC + \global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC + \global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC + \global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397 + \global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC + \global\lccode"1FC8="1F72 \global\uccode"1FC8="0395 + \global\lccode"1FC9="1F73 \global\uccode"1FC9="0395 + \global\lccode"1FCA="1F74 \global\uccode"1FCA="0397 + \global\lccode"1FCB="1F75 \global\uccode"1FCB="0397 + \global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC + \global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8 + \global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9 + \global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA + \global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA + \global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399 + \global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA + \global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8 + \global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9 + \global\lccode"1FDA="1F76 \global\uccode"1FDA="0399 + \global\lccode"1FDB="1F77 \global\uccode"1FDB="0399 + \global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8 + \global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9 + \global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB + \global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB + \global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1 + \global\lccode"1FE5="1FE5 \global\uccode"1FE5="03A1 + \global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5 + \global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB + \global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8 + \global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9 + \global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5 + \global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5 + \global\lccode"1FEC="1FE5 \global\uccode"1FEC="03A1 + \global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC + \global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC + \global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC + \global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9 + \global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC + \global\lccode"1FF8="1F78 \global\uccode"1FF8="039F + \global\lccode"1FF9="1F79 \global\uccode"1FF9="039F + \global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9 + \global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9 + \global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC + + +uclclist +~~~~~~~~ + +The common Greek font encoding definitions in greek-fontenc.def_ extend the +`uclclist` with Greek LICR macros. Here, we add textkoppa/textKoppa and +Unicode-specific "hiatus_" handling (copied from lgrenc.def_ and changed +Latin transcription to Unicode literals). + +@uclclist extension (see also greek-fontenc.def_):: + + \providecommand*\greek@euenc@update@uclclist{% + \expandafter\def\expandafter\@uclclist\expandafter{% + \@uclclist + \textkoppa \textKoppa + }% + \let\greek@euenc@update@uclclist\relax + } + +Expand the uclc list using the just defined macro:: + + \greek@euenc@update@uclclist + +Now the hiatus definition modifications:: + + \DeclareTextCommand{\LGR@A@hiatus}{\LastDeclaredEncoding}{% + \LGR@ifnextchar{Ι}{\textAlpha\"}{% + \LGR@ifnextchar{Υ}{\textAlpha\"}{% + \LGR@ifnextchar{\textIota}{\textAlpha\"}{% + \LGR@ifnextchar{\textUpsilon}{\textAlpha\"}{\textAlpha}% + }% + }% + }% + } + \DeclareTextCommand{\LGR@E@hiatus}{\LastDeclaredEncoding}{% + \LGR@ifnextchar{Ι}{\textEpsilon\"}{% + \LGR@ifnextchar{Υ}{\textEpsilon\"}{% + \LGR@ifnextchar{\textIota}{\textEpsilon\"}{% + \LGR@ifnextchar{\textUpsilon}{\textEpsilon\"}{\textEpsilon}% + }% + }% + }% + } + +.. References + +.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +.. _babel-greek: http://www.ctan.org/pkg/babel-greek +.. _euenc: http://www.ctan.org/pkg/euenc +.. _fontspec: http://www.ctan.org/pkg/fontspec +.. _greek-fontenc: http://www.ctan.org/pkg/greek-fontenc +.. _grnumalt: http://www.ctan.org/pkg/grnumalt +.. _inputenc: http://www.ctan.org/pkg/inputenc +.. _textalpha: textalpha.sty.html +.. _xgreek: http://www.ctan.org/pkg/xgreek +.. _xunicode: http://www.ctan.org/pkg/xunicode + +.. _LaTeX2e font selection: + http://mirror.ctan.org/macros/latex/doc/fntguide.pdf +.. _common Greek font encoding definitions: +.. _greek-fontenc.def: greek-fontenc.def.html +.. _lgrenc.def: lgrenc.def.html +.. _hiatus: greek-fontenc.def.html#mark-hiatus diff --git a/language/greek/greek-fontenc/greek-fontenc.def b/language/greek/greek-fontenc/greek-fontenc.def new file mode 100644 index 0000000000..5b8d801309 --- /dev/null +++ b/language/greek/greek-fontenc/greek-fontenc.def @@ -0,0 +1,392 @@ +% greek-fontenc.def +% ***************** +% +% Common Greek font encoding definitions +% ====================================== +% +% :Copyright: © 2013 Günter Milde +% :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: +% :: + +\ProvidesFile{greek-fontenc.def} +[2015/08/04 v0.13.4 Common Greek font encoding definitions] + +% :Abstract: This file provides definitions that are shared between +% font encodings providing Greek characters. +% +% Changelog: +% .. class:: borderless +% +% ====== ============ ========================================================= +% 0.9 2013-07-03 code "outsourced" from lgrxenc.def +% 0.9.1 2013-07-17 composite definitions starting with standard accent cmds +% 0.11 2013-11-28 ``\greekscript`` TextCommand +% 0.12 2014-12-12 Remove symbol macros for breathing accents. +% 0.13 2015-08-04 No @uclclist entry for ypogegrammeni/prosgegrammeni. +% 0.13.4 2019-07-10 ``@uclclist`` entry for ``\prosgegrammeni``. +% ====== ============ ========================================================= +% +% Usage +% ----- +% +% This file is input by the font encoding definition files lgrenc.def_. and +% greek-euenc.def_. +% +% Implementation +% -------------- +% +% ensuregreek, greekscript +% ~~~~~~~~~~~~~~~~~~~~~~~~ +% +% Provide "empty" encoding-specific definitions for ``\ensuregreek`` and +% ``\greekscript``. The definitions in this file make the font encoding fit +% for use with the Greek script. (See ``textalpha.sty`` for default +% definitions.) +% +% The ``\ensuregreek`` macro can be used to ensure that its argument is set +% in a font encoding with support for Greek. If the active font encoding +% supports it, kerning between adjacent command calls (e.g. +% ``\ensuregreek{A}\ensuregreek{\Upsilon}``) is preserved. This allows, e.g., +% wrapping of compound Unicode character definitions. :: + +\ProvideTextCommand{\ensuregreek}{\LastDeclaredEncoding}[1]{#1} + +% The ``\greekscript`` declaration switches to a font encoding supporting +% the Greek script, if required. The following definition announces the +% ``\LastDeclaredEncoding`` as Greek-supporting:: + +\ProvideTextCommand{\greekscript}{\LastDeclaredEncoding}{} + + +% Aliases +% ~~~~~~~ +% +% Aliases are defined via `DeclareTextCommand` so that up/downcasing works +% without the need for additional uclclist_ entries. +% +% Compatibility aliases for hyperref_'s puenc.def:: + +\DeclareTextCommand{\textstigmagreek}{\LastDeclaredEncoding}{\textstigma} +\DeclareTextCommand{\textkoppagreek}{\LastDeclaredEncoding}{\textkoppa} +\DeclareTextCommand{\textStigmagreek}{\LastDeclaredEncoding}{\textStigma} +\DeclareTextCommand{\textSampigreek}{\LastDeclaredEncoding}{\textSampi} +\DeclareTextCommand{\textsampigreek}{\LastDeclaredEncoding}{\textsampi} +\DeclareTextCommand{\textdigammagreek}{\LastDeclaredEncoding}{\textdigamma} +\DeclareTextCommand{\textDigammagreek}{\LastDeclaredEncoding}{\textDigamma} + +\DeclareTextCommand{\textnumeralsigngreek}{\LastDeclaredEncoding}{\textdexiakeraia} +\DeclareTextCommand{\textnumeralsignlowergreek}{\LastDeclaredEncoding}{\textaristerikeraia} + +% Names from babel_ and teubner_ (do we want to define them here as alias?) +% +% .. code:: latex +% +% \DeclareTextCommand{\anwtonos}{\LastDeclaredEncoding}{\textdexiakeraia} % ʹ +% \DeclareTextCommand{\katwtonos}{\LastDeclaredEncoding}{\textaristerikeraia} % ͵ +% +% Two Unicode code points and names for one character:: + +\DeclareTextCommand{\accoxia}{\LastDeclaredEncoding}{\acctonos} +\DeclareTextCommand{\acckoronis}{\LastDeclaredEncoding}{\accpsili} + +% Symbol macros for the breathings: +% +% Moved to ``textalpha.sty`` to avoid clashes with local definitions +% of ``\<`` and ``\>`` in documents using LGR or babel-greek. +% (Bugreport David Kastrup). If you want to use the short macros without +% loading `textalpha`, you can define them in the document preamble like +% +% .. code:: latex +% +% \DeclareTextCommand{\<}{LGR}{\accdasia} +% \DeclareTextCommand{\>}{LGR}{\accpsili} +% \DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia} +% \DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria} +% \DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni} +% \DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia} +% \DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria} +% \DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni} +% +% Or use alternative symbols for the breathings (cf. X compose +% table, LCI encoding)? +% +% .. code:: latex +% +% \DeclareTextCommand{\(}{\LastDeclaredEncoding}{\accdasia} +% \DeclareTextCommand{\)}{\LastDeclaredEncoding}{\accpsili} +% +% Composite diacritics +% ~~~~~~~~~~~~~~~~~~~~ +% +% Composite accents can be input as sequence of simple diacritics (in +% arbitrary order) via named macro, symbol macro and "transcription +% characters", e.g. one of +% +% .. code:: latex +% +% \accdialytica\accvaria\textalpha, +% \"\'\textalpha, +% \"'\textalpha, or +% \'"\textalpha. +% +% Separate definitions for the supported variants of the second input token +% are required as composition is based on the non-expanded input +% +% The composition with simple "transcription characters" must also be defined +% for the symbol macros, otherwise it fails with ``\Makeuppercase``. +% +% For Unicode encodings (where they do not resolve to Greek named macros, +% composite definitions starting with standard macros are requried:: + +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\acctonos}{\accdialytikatonos} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\'}{\accdialytikatonos} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{'}{\accdialytikatonos} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\'}{\accdialytikatonos} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{'}{\accdialytikatonos} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accvaria}{\accdialytikavaria} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\`}{\accdialytikavaria} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{`}{\accdialytikavaria} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\`}{\accdialytikavaria} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{`}{\accdialytikavaria} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accperispomeni}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\~}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{~}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\~}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{~}{\accdialytikaperispomeni} + +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikatonos} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\"}{\accdialytikatonos} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{"}{\accdialytikatonos} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\"}{\accdialytikatonos} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{"}{\accdialytikatonos} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accdasia}{\accdasiaoxia} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\<}{\accdasiaoxia} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{<}{\accdasiaoxia} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\<}{\accdasiaoxia} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{<}{\accdasiaoxia} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accpsili}{\accpsilioxia} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\>}{\accpsilioxia} +\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{>}{\accpsilioxia} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\>}{\accpsilioxia} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{>}{\accpsilioxia} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\'}{\textquoteright} +\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{'}{\textquoteright} + +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikavaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\"}{\accdialytikavaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{"}{\accdialytikavaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\"}{\accdialytikavaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{"}{\accdialytikavaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accdasia}{\accdasiavaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\<}{\accdasiavaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{<}{\accdasiavaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\<}{\accdasiavaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{<}{\accdasiavaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accpsili}{\accpsilivaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\>}{\accpsilivaria} +\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{>}{\accpsilivaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\>}{\accpsilivaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{>}{\accpsilivaria} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\`}{\textquoteleft} +\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{`}{\textquoteleft} + +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\"}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{"}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\"}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{"}{\accdialytikaperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accdasia}{\accdasiaperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\<}{\accdasiaperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{<}{\accdasiaperispomeni} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\<}{\accdasiaperispomeni} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{<}{\accdasiaperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accpsili}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\>}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{>}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\>}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{>}{\accpsiliperispomeni} + +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\acctonos}{\accpsilioxia} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\'}{\accpsilioxia} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{'}{\accpsilioxia} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accvaria}{\accpsilivaria} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\`}{\accpsilivaria} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{`}{\accpsilivaria} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accperispomeni}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\~}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{~}{\accpsiliperispomeni} + +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\acctonos}{\accdasiaoxia} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\'}{\accdasiaoxia} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{'}{\accdasiaoxia} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accvaria}{\accdasiavaria} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\`}{\accdasiavaria} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{`}{\accdasiavaria} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accperispomeni}{\accdasiaperispomeni} +\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\~}{\accdasiaperispomeni} + +% .. _uclclist: +% +% UPPERCASE +% ~~~~~~~~~ +% +% If UPPERCASE (all-caps) is generated with ``\MakeUppercase``, macro +% substitutions in the ``\@uclclist`` apply. This can be used to drop the +% diacritics (except dialytika and `iota subscript`__). Different conventions +% exist for the `treatment of the iota subscript with uppercase letters`__. In +% the CB Fonts, a small capital adscript iota is used. +% +% __ https://en.wikipedia.org/wiki/Iota_subscript +% __ https://opoudjis.net/unicode/unicode_adscript.html +% +% @uclclist extension +% """"""""""""""""""" +% +% Based on the `babel patch`_ and ``fontenc.sty``. +% +% The definition of an auxiliary, self-restting macro makes this idempotent +% (only the first use of this function will expand the ``@uclclist``). +% The second and third lines are TeX' way of writing ``uclclist += …``:: + +\providecommand*\update@uclc@with@greek{% + \expandafter\def\expandafter\@uclclist\expandafter{% + \@uclclist + \accdasia\LGR@accdropped + \accdasiaoxia\LGR@hiatus + \accdasiavaria\LGR@accdropped + \accdasiaperispomeni\LGR@accdropped + \accpsili\LGR@hiatus + \accpsilioxia\LGR@hiatus + \accpsilivaria\LGR@hiatus + \accpsiliperispomeni\LGR@accdropped + \acctonos\LGR@hiatus + \accvaria\LGR@accdropped + \accdialytikatonos\LGR@accDialytika + \accdialytikavaria\LGR@accDialytika + \accdialytikaperispomeni\LGR@accDialytika + \accperispomeni\LGR@accdropped + \LGR@ypogegrammeni\prosgegrammeni + \textalpha \textAlpha + \textbeta \textBeta + \textgamma \textGamma + \textdelta \textDelta + \textepsilon\textEpsilon + \textzeta \textZeta + \texteta \textEta + \texttheta \textTheta + \textiota \textIota + \textkappa \textKappa + \textlambda \textLambda + \textmu \textMu + \textnu \textNu + \textxi \textXi + \textomicron\textOmicron + \textpi \textPi + \textrho \textRho + \textvarsigma \textSigma + \textsigma \textSigma + \textautosigma \textSigma + \texttau \textTau + \textupsilon\textUpsilon + \textphi \textPhi + \textchi \textChi + \textpsi \textPsi + \textomega \textOmega + \textqoppa \textQoppa + \textvarstigma \textStigma + \textstigma \textStigma + \textsampi \textSampi + \textdigamma \textDigamma + }% + \let\update@uclc@with@greek\relax +} + +% Expand the uclc list using the just defined macro:: + +\update@uclc@with@greek + + +% Substitution macros +% """"""""""""""""""" +% +% Drop diacritics (The argument passing ensures that kerning is preserved) :: + +\DeclareTextCommand{\LGR@accdropped}{\LastDeclaredEncoding}[1]{#1} + + +% Keep dialytika: Define a dummy alias so that downcasing with +% ``\MakeLowercase`` does not convert a simple dialytika to a composite +% accent:: + +\DeclareTextCommand{\LGR@accDialytika}{\LastDeclaredEncoding}{\accdialytika} +\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\LGR@hiatus}{\accdialytika} + +% Convert ``\prosgegrammeni`` (adscript iota) to ``\ypogegrammeni`` +% (subscript iota) but not vice versa:: + +\DeclareTextCommand{\LGR@ypogegrammeni}{\LastDeclaredEncoding}{\ypogegrammeni} + + +% 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 (άυλος → ΑΫΛΟΣ, μάινα → ΜΑΪΝΑ, κέικ → ΚΕΪΚ, +% ἀυπνία → ΑΫΠΝΙΑ):: + +\DeclareTextCommand{\LGR@hiatus}{\LastDeclaredEncoding}[1]{#1} +\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{>}{\LGR@hiatus} +\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{<}{\LGR@accdropped} +\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{\textAlpha}{\LGR@A@hiatus} +\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{\textEpsilon}{\LGR@E@hiatus} + +% The font encoding file must define the ``\LGR@hiatus`` TextCommand. See +% ``lgrenc.def`` for an example. +% +% The following macro can be used to test if the next character is an Alpha or +% Epsilon. As ``\@ifnextchar`` gobbles spaces the lookahead macro definition +% from ``amsgen.sty`` is used: +% +% This macro is a new version of LaTeX’s ``\@ifnextchar``, macro +% that does not skip over spaces. +% +% :: + +\providecommand*{\LGR@ifnextchar}[3]{% + \let\reserved@d= #1% + \def\reserved@a{#2}\def\reserved@b{#3}% + \futurelet\@let@token\LGR@ifnch +} +\providecommand*{\LGR@ifnch}{% + \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi + \reserved@b +} + + + +% .. References +% ---------- +% +% .. _alphabeta: alphabeta.sty.html +% .. _athnum: http://www.ctan.org/pkg/athnum +% .. _Babel: http://www.ctan.org/pkg/babel +% .. _babel patch: http://www.eutypon.gr/eutypon/pdf/e2008-20/e20-a03.pdf +% .. _fntguide: http://mirror.ctan.org/macros/latex/doc/fntguide.pdf +% .. _fontenc: http://www.ctan.org/pkg/fontenc +% .. _hyperref: http://www.ctan.org/pkg/hyperref +% .. _ibycus: http://www.ctan.org/pkg/ibycus-babel +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _lgrx: http://www.ctan.org/pkg/lgrx +% .. _ltxcmds: http://www.ctan.org/pkg/ltxcmds +% .. _teubner: http://www.ctan.org/pkg/teubner +% .. _teubner-doc: +% http://mirror.ctan.org/macros/latex/contrib/teubner/teubner-doc.pdf +% .. _textalpha: textalpha.sty.html +% .. _ucs: http://www.ctan.org/pkg/unicode +% +% .. _lgrenc.def: lgrenc.def.html +% .. _greek-euenc.def: greek-euenc.def.html diff --git a/language/greek/greek-fontenc/greek-fontenc.def.html b/language/greek/greek-fontenc/greek-fontenc.def.html new file mode 100644 index 0000000000..a376e4fb86 --- /dev/null +++ b/language/greek/greek-fontenc/greek-fontenc.def.html @@ -0,0 +1,902 @@ + + + + + +greek-fontenc.def + + + + + + +
+

greek-fontenc.def

+

Common Greek font encoding definitions

+
+ + +
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
+
\ProvidesFile{greek-fontenc.def}
+[2015/08/04 v0.13.4 Common Greek font encoding definitions]
+
+
+
+

Abstract

+

This file provides definitions that are shared between +font encodings providing Greek characters.

+
+
+
Changelog:
+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +

0.9

2013-07-03

code “outsourced” from lgrxenc.def

0.9.1

2013-07-17

composite definitions starting with standard accent cmds

0.11

2013-11-28

\greekscript TextCommand

0.12

2014-12-12

Remove symbol macros for breathing accents.

0.13

2015-08-04

No @uclclist entry for ypogegrammeni/prosgegrammeni.

0.13.4

2019-07-10

@uclclist entry for \prosgegrammeni.

+
+
+
+

Usage

+

This file is input by the font encoding definition files lgrenc.def. and +greek-euenc.def.

+
+
+

Implementation

+
+

ensuregreek, greekscript

+

Provide “empty” encoding-specific definitions for \ensuregreek and +\greekscript. The definitions in this file make the font encoding fit +for use with the Greek script. (See textalpha.sty for default +definitions.)

+

The \ensuregreek macro can be used to ensure that its argument is set +in a font encoding with support for Greek. If the active font encoding +supports it, kerning between adjacent command calls (e.g. +\ensuregreek{A}\ensuregreek{\Upsilon}) is preserved. This allows, e.g., +wrapping of compound Unicode character definitions.

+
\ProvideTextCommand{\ensuregreek}{\LastDeclaredEncoding}[1]{#1}
+

The \greekscript declaration switches to a font encoding supporting +the Greek script, if required. The following definition announces the +\LastDeclaredEncoding as Greek-supporting:

+
\ProvideTextCommand{\greekscript}{\LastDeclaredEncoding}{}
+
+
+

Aliases

+

Aliases are defined via DeclareTextCommand so that up/downcasing works +without the need for additional uclclist entries.

+

Compatibility aliases for hyperref’s puenc.def:

+
\DeclareTextCommand{\textstigmagreek}{\LastDeclaredEncoding}{\textstigma}
+\DeclareTextCommand{\textkoppagreek}{\LastDeclaredEncoding}{\textkoppa}
+\DeclareTextCommand{\textStigmagreek}{\LastDeclaredEncoding}{\textStigma}
+\DeclareTextCommand{\textSampigreek}{\LastDeclaredEncoding}{\textSampi}
+\DeclareTextCommand{\textsampigreek}{\LastDeclaredEncoding}{\textsampi}
+\DeclareTextCommand{\textdigammagreek}{\LastDeclaredEncoding}{\textdigamma}
+\DeclareTextCommand{\textDigammagreek}{\LastDeclaredEncoding}{\textDigamma}
+
+\DeclareTextCommand{\textnumeralsigngreek}{\LastDeclaredEncoding}{\textdexiakeraia}
+\DeclareTextCommand{\textnumeralsignlowergreek}{\LastDeclaredEncoding}{\textaristerikeraia}
+

Names from babel and teubner (do we want to define them here as alias?)

+
\DeclareTextCommand{\anwtonos}{\LastDeclaredEncoding}{\textdexiakeraia}     % ʹ
+\DeclareTextCommand{\katwtonos}{\LastDeclaredEncoding}{\textaristerikeraia} % ͵
+

Two Unicode code points and names for one character:

+
\DeclareTextCommand{\accoxia}{\LastDeclaredEncoding}{\acctonos}
+\DeclareTextCommand{\acckoronis}{\LastDeclaredEncoding}{\accpsili}
+

Symbol macros for the breathings:

+

Moved to textalpha.sty to avoid clashes with local definitions +of \< and \> in documents using LGR or babel-greek. +(Bugreport David Kastrup). If you want to use the short macros without +loading textalpha, you can define them in the document preamble like

+
\DeclareTextCommand{\<}{LGR}{\accdasia}
+\DeclareTextCommand{\>}{LGR}{\accpsili}
+\DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia}
+\DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria}
+\DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria}
+\DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni}
+

Or use alternative symbols for the breathings (cf. X compose +table, LCI encoding)?

+
\DeclareTextCommand{\(}{\LastDeclaredEncoding}{\accdasia}
+\DeclareTextCommand{\)}{\LastDeclaredEncoding}{\accpsili}
+
+
+

Composite diacritics

+

Composite accents can be input as sequence of simple diacritics (in +arbitrary order) via named macro, symbol macro and “transcription +characters”, e.g. one of

+
\accdialytica\accvaria\textalpha,
+\"\'\textalpha,
+\"'\textalpha, or
+\'"\textalpha.
+

Separate definitions for the supported variants of the second input token +are required as composition is based on the non-expanded input

+

The composition with simple “transcription characters” must also be defined +for the symbol macros, otherwise it fails with \Makeuppercase.

+

For Unicode encodings (where they do not resolve to Greek named macros, +composite definitions starting with standard macros are requried:

+
\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\acctonos}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\'}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{'}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\'}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{'}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accvaria}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\`}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{`}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\`}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{`}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\accperispomeni}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\~}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{~}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{\~}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\"}{\LastDeclaredEncoding}{~}{\accdialytikaperispomeni}
+
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\"}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{"}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\"}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{"}{\accdialytikatonos}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accdasia}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\<}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{<}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\<}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{<}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\accpsili}{\accpsilioxia}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{\>}{\accpsilioxia}
+\DeclareTextCompositeCommand{\acctonos}{\LastDeclaredEncoding}{>}{\accpsilioxia}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\>}{\accpsilioxia}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{>}{\accpsilioxia}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{\'}{\textquoteright}
+\DeclareTextCompositeCommand{\'}{\LastDeclaredEncoding}{'}{\textquoteright}
+
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\"}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{"}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\"}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{"}{\accdialytikavaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accdasia}{\accdasiavaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\<}{\accdasiavaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{<}{\accdasiavaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\<}{\accdasiavaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{<}{\accdasiavaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\accpsili}{\accpsilivaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{\>}{\accpsilivaria}
+\DeclareTextCompositeCommand{\accvaria}{\LastDeclaredEncoding}{>}{\accpsilivaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\>}{\accpsilivaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{>}{\accpsilivaria}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{\`}{\textquoteleft}
+\DeclareTextCompositeCommand{\`}{\LastDeclaredEncoding}{`}{\textquoteleft}
+
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accdialytika}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\"}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{"}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\"}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{"}{\accdialytikaperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accdasia}{\accdasiaperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\<}{\accdasiaperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{<}{\accdasiaperispomeni}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\<}{\accdasiaperispomeni}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{<}{\accdasiaperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\accpsili}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{\>}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\accperispomeni}{\LastDeclaredEncoding}{>}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{\>}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\~}{\LastDeclaredEncoding}{>}{\accpsiliperispomeni}
+
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\acctonos}{\accpsilioxia}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\'}{\accpsilioxia}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{'}{\accpsilioxia}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accvaria}{\accpsilivaria}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\`}{\accpsilivaria}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{`}{\accpsilivaria}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\accperispomeni}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{\~}{\accpsiliperispomeni}
+\DeclareTextCompositeCommand{\accpsili}{\LastDeclaredEncoding}{~}{\accpsiliperispomeni}
+
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\acctonos}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\'}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{'}{\accdasiaoxia}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accvaria}{\accdasiavaria}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\`}{\accdasiavaria}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{`}{\accdasiavaria}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\accperispomeni}{\accdasiaperispomeni}
+\DeclareTextCompositeCommand{\accdasia}{\LastDeclaredEncoding}{\~}{\accdasiaperispomeni}
+
+
+

UPPERCASE

+

If UPPERCASE (all-caps) is generated with \MakeUppercase, macro +substitutions in the \@uclclist apply. This can be used to drop the +diacritics (except dialytika and iota subscript). Different conventions +exist for the treatment of the iota subscript with uppercase letters. In +the CB Fonts, a small capital adscript iota is used.

+
+

@uclclist extension

+

Based on the babel patch and fontenc.sty.

+

The definition of an auxiliary, self-restting macro makes this idempotent +(only the first use of this function will expand the @uclclist). +The second and third lines are TeX’ way of writing uclclist += …:

+
\providecommand*\update@uclc@with@greek{%
+  \expandafter\def\expandafter\@uclclist\expandafter{%
+    \@uclclist
+    \accdasia\LGR@accdropped
+    \accdasiaoxia\LGR@hiatus
+    \accdasiavaria\LGR@accdropped
+    \accdasiaperispomeni\LGR@accdropped
+    \accpsili\LGR@hiatus
+    \accpsilioxia\LGR@hiatus
+    \accpsilivaria\LGR@hiatus
+    \accpsiliperispomeni\LGR@accdropped
+    \acctonos\LGR@hiatus
+    \accvaria\LGR@accdropped
+    \accdialytikatonos\LGR@accDialytika
+    \accdialytikavaria\LGR@accDialytika
+    \accdialytikaperispomeni\LGR@accDialytika
+    \accperispomeni\LGR@accdropped
+    \LGR@ypogegrammeni\prosgegrammeni
+    \textalpha  \textAlpha
+    \textbeta   \textBeta
+    \textgamma  \textGamma
+    \textdelta  \textDelta
+    \textepsilon\textEpsilon
+    \textzeta   \textZeta
+    \texteta    \textEta
+    \texttheta  \textTheta
+    \textiota   \textIota
+    \textkappa  \textKappa
+    \textlambda \textLambda
+    \textmu     \textMu
+    \textnu     \textNu
+    \textxi     \textXi
+    \textomicron\textOmicron
+    \textpi     \textPi
+    \textrho    \textRho
+    \textvarsigma  \textSigma
+    \textsigma     \textSigma
+    \textautosigma \textSigma
+    \texttau    \textTau
+    \textupsilon\textUpsilon
+    \textphi    \textPhi
+    \textchi    \textChi
+    \textpsi    \textPsi
+    \textomega  \textOmega
+    \textqoppa     \textQoppa
+    \textvarstigma \textStigma
+    \textstigma    \textStigma
+    \textsampi     \textSampi
+    \textdigamma   \textDigamma
+  }%
+  \let\update@uclc@with@greek\relax
+}
+

Expand the uclc list using the just defined macro:

+
\update@uclc@with@greek
+
+
+

Substitution macros

+

Drop diacritics (The argument passing ensures that kerning is preserved)

+
\DeclareTextCommand{\LGR@accdropped}{\LastDeclaredEncoding}[1]{#1}
+

Keep dialytika: Define a dummy alias so that downcasing with +\MakeLowercase does not convert a simple dialytika to a composite +accent:

+
\DeclareTextCommand{\LGR@accDialytika}{\LastDeclaredEncoding}{\accdialytika}
+\DeclareTextCompositeCommand{\accdialytika}{\LastDeclaredEncoding}{\LGR@hiatus}{\accdialytika}
+

Convert \prosgegrammeni (adscript iota) to \ypogegrammeni +(subscript iota) but not vice versa:

+
\DeclareTextCommand{\LGR@ypogegrammeni}{\LastDeclaredEncoding}{\ypogegrammeni}
+
+
+

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 (άυλος → ΑΫΛΟΣ, μάινα → ΜΑΪΝΑ, κέικ → ΚΕΪΚ, +ἀυπνία → ΑΫΠΝΙΑ):

+
\DeclareTextCommand{\LGR@hiatus}{\LastDeclaredEncoding}[1]{#1}
+\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{>}{\LGR@hiatus}
+\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{<}{\LGR@accdropped}
+\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{\textAlpha}{\LGR@A@hiatus}
+\DeclareTextCompositeCommand{\LGR@hiatus}{\LastDeclaredEncoding}{\textEpsilon}{\LGR@E@hiatus}
+

The font encoding file must define the \LGR@hiatus TextCommand. See +lgrenc.def for an example.

+

The following macro can be used to test if the next character is an Alpha or +Epsilon. As \@ifnextchar gobbles spaces the lookahead macro definition +from amsgen.sty is used:

+
+

This macro is a new version of LaTeX’s \@ifnextchar, macro +that does not skip over spaces.

+
+
\providecommand*{\LGR@ifnextchar}[3]{%
+  \let\reserved@d= #1%
+  \def\reserved@a{#2}\def\reserved@b{#3}%
+  \futurelet\@let@token\LGR@ifnch
+}
+\providecommand*{\LGR@ifnch}{%
+  \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi
+  \reserved@b
+}
+ +
+
+
+
+ + diff --git a/language/greek/greek-fontenc/greekhyperref.pdf b/language/greek/greek-fontenc/greekhyperref.pdf new file mode 100644 index 0000000000..7b7ff16418 Binary files /dev/null and b/language/greek/greek-fontenc/greekhyperref.pdf differ diff --git a/language/greek/greek-fontenc/greekhyperref.tex b/language/greek/greek-fontenc/greekhyperref.tex new file mode 100644 index 0000000000..ed3c8b5cb3 --- /dev/null +++ b/language/greek/greek-fontenc/greekhyperref.tex @@ -0,0 +1,127 @@ +\documentclass{article} +\usepackage{fixltx2e} % LaTeX patches, \textsubscript +\usepackage{cmap} % fix search and cut-and-paste in Acrobat +\usepackage[LGR,T1]{fontenc} +\usepackage{lmodern} + +\usepackage[unicode,colorlinks=true,linkcolor=blue]{hyperref} +\usepackage{bookmark} + +\usepackage[greek,english]{babel} +\usepackage{alphabeta} +\usepackage[utf8]{inputenc} + + +% \pagestyle{headings} + +\begin{document} + +\title{Greek and hyperref} +\maketitle + +\noindent +On 2010-11-05, Heiko Oberdiek wrote in comp.text.tex: +% +\begin{quote} + \textbackslash pdfstringdef (converting TeX code to PDF strings for + bookmarks) supports NFSS2 and needs active characters. Encoding + stuff based on the internal font machinery of TeX (letters with + catcode 11 or 12, ligatures) does not work, because the strings + don't reach TeX's stomach. +\end{quote} +% +The \emph{greek-fontenc} package allows input of Greek characters in a way +that ``reaches TeX's stomach'' and hence works in both, the main document as +well as in PDF strings (e.g. bookmarks). Hyperref's ``puenc.def`` font +encoding file defines LICR macros for monotonic Greek (Greek characters of +the ``Greek and Coptic'' unicode block). + +All utf8-encoded literal Unicode characters work in PDF strings. With +\emph{greek-fontenc} and \emph{greek-inputenc}, this enables use of all +Greek character in text and PDF strings. + +\section{Transcription: \ensuregreek{logos}, \foreignlanguage{greek}{logos}} + +\textbackslash{}textgreek + LGR transcription or +Greek language (babel) + LGR transcription: +In the PDF-bookmark are Latin letters instead of Greek ones. + + +\section{Macros: + \textlambda\textomicron\textgamma\textomicron\textvarsigma{}, + \lambda\omicron\gamma\omicron\varsigma{}, + λογος} + +textalpha package with \textbackslash{}textgreek* macros, +alphabeta package with \textbackslash{}alpha ... \textbackslash{}Omega macros, +and literal Greek Unicode characters. + +Works, if the ``unicode'' or ``pdfencoding=auto'' option is given to hyperref. +(With the ``xpdf'' viewer, Greek letters are not shown in PDF bookmarks.) + +The generic short macros from the \emph{alphabeta} package result in +hyperref warnings. See ``alphabeta-doc.tex`` and ``alphabeta-doc.pdf`` +from the `lgrx` package for details an workarounds. + + +\section{LGR + Macros: \foreignlanguage{greek}{ + \textlambda\textomicron\textgamma\textomicron\textvarsigma{}}} + +LICR-macro input works also if the font encoding is LGR. + +\section{% + Kerning: \textAlpha\textUpsilon\textLambda{} + \ensuregreek{\textAlpha\textUpsilon\textLambda} + \foreignlanguage{greek}{\textAlpha\textUpsilon\textLambda}% +} + +Kerning is impossible if the font encoding is switched for every single +character. Wrap the Greek part in a command switching to LGR font encoding +to fix this, either \verb+\ensuregreek{...}+ (with package textalpha) or +\verb+\foreignlanguage{greek}{...}+ (with babel). + +% letters of the Greek and Coptic Unicode Block supported by LGR: +\newcommand{\GreekAndCoptic}{ʹ͵ͺ; ΄ ΅ Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϘϚϜϠ} +\newcommand{\greekandcoptic}{άέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϙϛϝϟϡ} + +\section{Literal Unicode input} +The following subsection headings contain all characters from the ``Greek +and Coptic'' and ``Greek Extended'' Unicode Blocks that are supported by the +LGR font encoding as literal Unicode characters. +\subsection{\GreekAndCoptic} +\subsection{\greekandcoptic} +\subsection{ἀἁἂἃἄἅἆἇἈἉἊἋἌἍἎἏ ἐἑἒἓἔἕἘἙἚἛἜἝ} +\subsection{ἠἡἢἣἤἥἦἧἨἩἪἫἬἭἮἯ ἰἱἲἳἴἵἶἷἸἹἺἻἼἽἾἿ} +\subsection{ὀὁὂὃὄὅὈὉὊὋὌὍ ὐὑὒὓὔὕὖὗὙὛὝὟ} +\subsection{ὠὡὢὣὤὥὦὧὨὩὪὫὬὭὮὯ ὰάὲέὴήὶίὸόὺύὼώ} +\subsection{ᾀᾁᾂᾃᾄᾅᾆᾇᾈᾉᾊᾋᾌᾍᾎᾏ ᾐᾑᾒᾓᾔᾕᾖᾗᾘᾙᾚᾛᾜᾝᾞᾟ} +\subsection{ᾠᾡᾢᾣᾤᾥᾦᾧᾨᾩᾪᾫᾬᾭᾮᾯ ᾰᾱᾲᾳᾴᾶᾷᾸᾹᾺΆᾼ᾽ι᾿} +\subsection{῀῁ῂῃῄῆῇῈΈῊΉῌ῍῎῏ ῐῑῒΐῖῗῘῙῚΊ῝῞῟} +\subsection{ῠῡῢΰῤῥῦῧῨῩῪΎῬ῭΅` ῲῳῴῶῷῸΌῺΏῼ´῾} + +\section{non-standard and combined diacritics: + \ensuregreek{\>\textalpha \'"\textalpha}} + +Currently, there is no hyperref support for LICR input with non-standard +accents or combined diacritics characters. Input as literal precomposed +Unicode character works fine. + +\section{Makeuppercase} + +According to Greek typesetting conventions, +diacritics (except the dialytika) are dropped in ALL CAPS. + +However, \verb|\Makeuppercase| is not supported in PDF-strings, so we +do not need to care for this. + +\section{Conclusion} + +For Greek text parts in section headers use either literal Unicode +characters or macros. For multi-accented letters or non-standard accents, +use literal pre-composed Unicode characters. (Combining Unicode characters +do not work with inputenc and 8-bit LaTeX. This is a general restriction.) + +For proper kerning in the main document, combine this with the +\verb+\textgreek+ or \verb+\foreignlanguage{greek}+ macros. + +\end{document} diff --git a/language/greek/greek-fontenc/lgr2licr.lua b/language/greek/greek-fontenc/lgr2licr.lua new file mode 100755 index 0000000000..da64c0ad73 --- /dev/null +++ b/language/greek/greek-fontenc/lgr2licr.lua @@ -0,0 +1,169 @@ +#!/usr/bin/env lua + +-- LGR Transcription to Greek LICR transformation +-- ********************************************** +-- +-- :Copyright: © 2010 Günter Milde +-- :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. +-- +-- .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +-- +-- The LGR font encoding is the de-facto standard for Greek typesetting with +-- LaTeX. This file provides a translation from the Latin transcription defined +-- by LGR into the LaTeX Internal Character Representation (LICR) macros. +-- +-- :: + +usage = [[ +Usage: lua lgr2licr.lua [OPTIONS] [STRING] + Convert STRING from Latin transcription to LICR macros for Greek symbols. + (This dumb conversion fails if the string contains TeX macros.) + Without argument, the script reads from standard input like a + redirected file. End interactive input with Ctrl-D. +Options: -h, --help show this help + -f, --file read input from file STRING +]] + +if arg[1] == "-h" or arg[1] == "--help" then + print(usage) + return +end + +-- Get input string:: + +local s + +if arg[1] == "-f" then + local f = assert(io.open(arg[2], "r")) + s = f:read("*all") + f:close() +elseif arg[1] then + s = table.concat(arg, " ") .. "\n" +else + -- test: + -- s = "\\emph{x\\'us}" + s = io.read("*all") +end + +-- The mapping from the LGR Latin transcription to LICR macros:: + +LGR_map = { + A = "\\textAlpha{}", + B = "\\textBeta{}", + G = "\\textGamma{}", + D = "\\textDelta{}", + E = "\\textEpsilon{}", + Z = "\\textZeta{}", + H = "\\textEta{}", + J = "\\textTheta{}", + I = "\\textIota{}", + K = "\\textKappa{}", + L = "\\textLambda{}", + M = "\\textMu{}", + N = "\\textNu{}", + X = "\\textXi{}", + O = "\\textOmicron{}", + P = "\\textPi{}", + R = "\\textRho{}", + S = "\\textSigma{}", + T = "\\textTau{}", + U = "\\textUpsilon{}", + F = "\\textPhi{}", + Q = "\\textChi{}", + Y = "\\textPsi{}", + W = "\\textOmega{}", + + a = "\\textalpha{}", + b = "\\textbeta{}", + g = "\\textgamma{}", + d = "\\textdelta{}", + e = "\\textepsilon{}", + z = "\\textzeta{}", + h = "\\texteta{}", + j = "\\texttheta{}", + i = "\\textiota{}", + k = "\\textkappa{}", + l = "\\textlambda{}", + m = "\\textmu{}", + n = "\\textnu{}", + x = "\\textxi{}", + o = "\\textomicron{}", + p = "\\textpi{}", + r = "\\textrho{}", + s = "\\textautosigma{}", + c = "\\textfinalsigma{}", + t = "\\texttau{}", + u = "\\textupsilon{}", + f = "\\textphi{}", + q = "\\textchi{}", + y = "\\textpsi{}", + w = "\\textomega{}", + v = "\\noboundary{}", + + ["'"] = "\\'", + ["`"] = "\\`", + ["~"] = "\\~", + ["<"] = "\\<", + [">"] = "\\>", + ["|"] = "\\|", + ['"'] = '\\"', + [";"] = "\\textanoteleia{}", + ["?"] = "\\texterotimatiko{}", +} + +-- Return substitution string for 3 captures: +-- +-- `c1` backslash +-- `c2` a-zA-Z +-- `c3` any other char +-- :: + +function lgr_replace(c1, c2, c3) + -- print (c1, c2, c3) + if c1 == "\\" then + if c2 and (c2 ~= "") then + return c1 .. c2 .. (LGR_map[c3] or c3 or "") + end + return c1 .. c3 + end + c2 = string.gsub(c2, "s(.)", "sv%1") + return (string.gsub(c2, ".", LGR_map) or "") .. (LGR_map[c3] or c3 or "") +end + +-- Use the mapping to replace every ASCII-character with +-- non-standard meaning to the corresponding LICR macro +-- (skip macros):: + -- *([a-zA-Z'`~<>|\";?] +s = string.gsub(s, "(\\?)([a-zA-Z]*)([^\\]?)", lgr_replace) + +-- Ligatures:: + +s = string.gsub(s, "%(%(", "\\guillemotleft{}") +s = string.gsub(s, "%)%)", "\\guillemotright{}") +s = string.gsub(s, "\\'\\'", "\\textquoteright{}") -- '' +s = string.gsub(s, "\\`\\`", "\\textquoteleft{}") -- `` +s = string.gsub(s, '\"(%s)', "\\textquoteright{}%1") + +-- Separating empty group "{}" only required if followed by space or ASCII:: + +s = string.gsub(s, "{}([^ a-zA-Z])", "%1") + +-- Autosigma replacements:: + +s = string.gsub(s, "\\textautosigma\\noboundary", "\\textsigma") -- sv +s = string.gsub(s, "\\textautosigma(\\['`~<>|\"])", "\\textsigma%1") -- accents + +s = string.gsub(s, "\\textautosigma([-%s!#$%%&%(%)*+,./0-9:=%[%]{|}])", + "\\textfinalsigma%1") + +s = string.gsub(s, "\\textautosigma(\\textquote)", "\\textfinalsigma%1") +s = string.gsub(s, "\\textautosigma(\\texterotimatiko)", "\\textfinalsigma%1") +s = string.gsub(s, "\\textautosigma(\\textanoteleia)", "\\textfinalsigma%1") + +s = string.gsub(s, "\\textautosigma$", "\\textfinalsigma") + +-- Write the result to stdout:: + +io.write(s) diff --git a/language/greek/greek-fontenc/lgr2licr.lua.html b/language/greek/greek-fontenc/lgr2licr.lua.html new file mode 100644 index 0000000000..82d424e598 --- /dev/null +++ b/language/greek/greek-fontenc/lgr2licr.lua.html @@ -0,0 +1,693 @@ + + + + + +LGR Transcription to Greek LICR transformation + + + + +
+

LGR Transcription to Greek LICR transformation

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

+
+
+ +

The LGR font encoding is the de-facto standard for Greek typesetting with +LaTeX. This file provides a translation from the Latin transcription defined +by LGR into the LaTeX Internal Character Representation (LICR) macros.

+
usage = [[
+Usage: lua lgr2licr.lua [OPTIONS] [STRING]
+  Convert STRING from Latin transcription to LICR macros for Greek symbols.
+  (This dumb conversion fails if the string contains TeX macros.)
+  Without argument, the script reads from standard input like a
+  redirected file. End interactive input with Ctrl-D.
+Options: -h, --help      show this help
+         -f, --file      read input from file STRING
+]]
+
+if arg[1] == "-h" or arg[1] == "--help" then
+    print(usage)
+    return
+end
+

Get input string:

+
local s
+
+if arg[1] == "-f" then
+    local f = assert(io.open(arg[2], "r"))
+    s = f:read("*all")
+    f:close()
+elseif arg[1] then
+    s = table.concat(arg, " ") .. "\n"
+else
+    -- test:
+    -- s = "\\emph{x\\'us}"
+    s = io.read("*all")
+end
+

The mapping from the LGR Latin transcription to LICR macros:

+
LGR_map = {
+  A = "\\textAlpha{}",
+  B = "\\textBeta{}",
+  G = "\\textGamma{}",
+  D = "\\textDelta{}",
+  E = "\\textEpsilon{}",
+  Z = "\\textZeta{}",
+  H = "\\textEta{}",
+  J = "\\textTheta{}",
+  I = "\\textIota{}",
+  K = "\\textKappa{}",
+  L = "\\textLambda{}",
+  M = "\\textMu{}",
+  N = "\\textNu{}",
+  X = "\\textXi{}",
+  O = "\\textOmicron{}",
+  P = "\\textPi{}",
+  R = "\\textRho{}",
+  S = "\\textSigma{}",
+  T = "\\textTau{}",
+  U = "\\textUpsilon{}",
+  F = "\\textPhi{}",
+  Q = "\\textChi{}",
+  Y = "\\textPsi{}",
+  W = "\\textOmega{}",
+
+  a = "\\textalpha{}",
+  b = "\\textbeta{}",
+  g = "\\textgamma{}",
+  d = "\\textdelta{}",
+  e = "\\textepsilon{}",
+  z = "\\textzeta{}",
+  h = "\\texteta{}",
+  j = "\\texttheta{}",
+  i = "\\textiota{}",
+  k = "\\textkappa{}",
+  l = "\\textlambda{}",
+  m = "\\textmu{}",
+  n = "\\textnu{}",
+  x = "\\textxi{}",
+  o = "\\textomicron{}",
+  p = "\\textpi{}",
+  r = "\\textrho{}",
+  s = "\\textautosigma{}",
+  c = "\\textfinalsigma{}",
+  t = "\\texttau{}",
+  u = "\\textupsilon{}",
+  f = "\\textphi{}",
+  q = "\\textchi{}",
+  y = "\\textpsi{}",
+  w = "\\textomega{}",
+  v = "\\noboundary{}",
+
+  ["'"] = "\\'",
+  ["`"] = "\\`",
+  ["~"] = "\\~",
+  ["<"] = "\\<",
+  [">"] = "\\>",
+  ["|"] = "\\|",
+  ['"'] = '\\"',
+  [";"] = "\\textanoteleia{}",
+  ["?"] = "\\texterotimatiko{}",
+}
+

Return substitution string for 3 captures:

+

c1 backslash +c2 a-zA-Z +c3 any other char

+
function lgr_replace(c1, c2, c3)
+    -- print (c1, c2, c3)
+    if c1 == "\\" then
+        if c2 and (c2 ~= "") then
+            return c1 .. c2 .. (LGR_map[c3] or c3 or "")
+        end
+        return c1 .. c3
+    end
+    c2 = string.gsub(c2, "s(.)", "sv%1")
+    return (string.gsub(c2, ".", LGR_map) or "") .. (LGR_map[c3] or c3 or "")
+end
+
+-- Use the mapping to replace every ASCII-character with
+-- non-standard meaning to the corresponding LICR macro
+-- (skip macros)::
+  -- *([a-zA-Z'`~<>|\";?]
+s = string.gsub(s, "(\\?)([a-zA-Z]*)([^\\]?)", lgr_replace)
+

Ligatures:

+
s = string.gsub(s, "%(%(", "\\guillemotleft{}")
+s = string.gsub(s, "%)%)", "\\guillemotright{}")
+s = string.gsub(s, "\\'\\'", "\\textquoteright{}")               -- ''
+s = string.gsub(s, "\\`\\`", "\\textquoteleft{}")                -- ``
+s = string.gsub(s, '\"(%s)', "\\textquoteright{}%1")
+

Separating empty group “{}” only required if followed by space or ASCII:

+
s = string.gsub(s, "{}([^ a-zA-Z])", "%1")
+

Autosigma replacements:

+
s = string.gsub(s, "\\textautosigma\\noboundary", "\\textsigma")  -- sv
+s = string.gsub(s, "\\textautosigma(\\['`~<>|\"])", "\\textsigma%1") -- accents
+
+s = string.gsub(s, "\\textautosigma([-%s!#$%%&%(%)*+,./0-9:=%[%]{|}])",
+                   "\\textfinalsigma%1")
+
+s = string.gsub(s, "\\textautosigma(\\textquote)", "\\textfinalsigma%1")
+s = string.gsub(s, "\\textautosigma(\\texterotimatiko)", "\\textfinalsigma%1")
+s = string.gsub(s, "\\textautosigma(\\textanoteleia)", "\\textfinalsigma%1")
+
+s = string.gsub(s, "\\textautosigma$", "\\textfinalsigma")
+

Write the result to stdout:

+
io.write(s)
+
+ + diff --git a/language/greek/greek-fontenc/lgrenc-test.pdf b/language/greek/greek-fontenc/lgrenc-test.pdf new file mode 100644 index 0000000000..1fa03ceb4e Binary files /dev/null and b/language/greek/greek-fontenc/lgrenc-test.pdf differ diff --git a/language/greek/greek-fontenc/lgrenc-test.tex b/language/greek/greek-fontenc/lgrenc-test.tex new file mode 100644 index 0000000000..e20786b0fd --- /dev/null +++ b/language/greek/greek-fontenc/lgrenc-test.tex @@ -0,0 +1,490 @@ +\documentclass{article} + +% Test with various LGR-encoded fonts: +\usepackage% +{lmodern} % uses CB Fonts for Greek +% {gfsartemisia} +% {gfsbaskerville} +% [default]{gfsbodoni} +% [default]{gfscomplutum} +% {gfsdidot} +% [default]{gfsneohellenic} +% {lmodern} \usepackage{gfsporson} \renewcommand*\rmdefault{porson} +% [default]{gfssolomos} +% {kerkis} % lacks some chars (\Stigma, \Sampi, double quotes) +% {teubner} +% \renewcommand{\ttdefault}{txtt} + +\usepackage{parskip} +\usepackage{textcomp} + +\usepackage[LGR,T1]{fontenc} + +% Shortcut accent macros \< and \>: +% +% The Symbol macros for the breathings were +% moved to ``textalpha.sty`` to avoid clashes with possible local +% definitions of these macros. +% +% Local definition and setup: +\DeclareTextCommand{\<}{LGR}{\accdasia} +\DeclareTextCommand{\>}{LGR}{\accpsili} +\DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia} +\DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria} +\DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni} +\DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia} +\DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria} +\DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni} + + +% With XeTeX/LuaTeX, use Unicode for Latin script: +\ifdefined\luatexversion \usepackage{fontspec}\else + \ifdefined\XeTeXrevision \usepackage{fontspec}\else + \usepackage[utf8]{inputenc} + \fi +\fi +% This is experimental. The general advise is not to mix fontenc and fontspec. +% One problem is that xunicode makes \nobreakspace font encoding specific +% We provide a default: +\DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ } + +% PDF hyperlinks: +\usepackage[pdfencoding=auto]{hyperref} +\usepackage{bookmark} +\hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue,pdfencoding=auto} + +% font encoding switch declarations: +\newcommand{\LGR}{\fontencoding{LGR}\selectfont} +\newcommand{\Latin}{\fontencoding{\encodingdefault}\selectfont} + +\begin{document} + +\title{Test LGR font encoding definitions} +\author{Günter Milde} +% \date{} +\maketitle + +The file lgrenc.def provides a comprehensive set of macros to typeset Greek +with LGR encoded fonts. It works for both, monotonic and polytonic Greek, +independent of the \emph{Babel} package. + +The example from \texttt{usage.tex} in \emph{babel-greek} input +using the LICR macros: + +\begin{quote} + \LGR + \textTau\'\textiota{} + \textphi\'\texteta\textiota\textfinalsigma\texterotimatiko{} + \<\textIota\textdelta\`\textomega\textnu{} + \>\textepsilon\textnu\texttheta\'\textepsilon\textdelta\textepsilon{} + \textpi\textalpha\~\textiota\textdelta\'\' + \>\textepsilon\textlambda\textepsilon\textupsilon\texttheta\'\textepsilon\textrho\textalpha\textnu\\ + \texttau\`\textalpha\textfinalsigma{} + \textpi\textlambda\texteta\textautosigma\'\textiota\textomicron\textnu{} + \textNu\'\textupsilon\textmu\textphi\textalpha\textfinalsigma{} + \textautosigma\texttau\textepsilon\textphi\textalpha\textnu\textomicron\~\textupsilon\textautosigma\textalpha\textnu{}, + \textSigma\'\textomega\textautosigma\texttau\textrho\textalpha\texttau\textepsilon{},\\ + \>\textepsilon\textrho\~\textomega\textnu{} + \'\textalpha\textpi\~\texteta\textlambda\texttheta\textepsilon\textfinalsigma{} + \textepsilon\>\textupsilon\texttheta\'\textupsilon\textfinalsigma\texterotimatiko{} + +\end{quote} + +\section{Symbols} + +See the source file \href{lgrenc-test.tex}{lgrenc-test.tex} for the macros +used to access the symbols. + +\subsection{Generic text symbols} + +Latin: ++ - = < > -- --- \textbraceleft{} [ () ] \textbraceright{} +% +\textbackslash{} +\textbar{} +\textperthousand{} +\textpertenthousand{} +\textvisiblespace{} + +LGR: +\LGR ++ - = \textless{} \textgreater{} -- --- +\textbraceleft{} [ () ] \textbraceright{} +% +\textbackslash{} \textbar{} +\textperthousand{} +% \textpertenthousand{} +\textvisiblespace{} +\Latin (Per-mille symbol is missing in LGR.) + +Quotes:\footnote{% + Single quotes need special attention to prevent conversion to accents. + Test the input conventions: + \LGR \textquoteleft{}a\textquoteright{} ``a'' \``a\'' \`\`a\'\' + \Latin but not \LGR `a' 'e' "i"\Latin +} +% +\Latin \guillemotleft{}a\guillemotright{} +\LGR \guillemotleft{}a\guillemotright{}, +% +\Latin \textquoteleft{}a\textquoteright{} +\LGR \textquoteleft{}a\textquoteright{}, +% +\Latin \textquotedblleft{}a\textquotedblright{} +\LGR \textquotedblleft{}a\textquotedblright{} +\Latin (double quotes wrong with Kerkis fonts) + +Single guillemots and base-quotes + (\guilsinglleft{}a\guilsinglright{} + \quotedblbase{}a\textquotedblright{} + \quotesinglbase{}a\textquoteright{}) + are missing in LGR. + +Ligature break up: AY fi \LGR AU "i $\mapsto$ +\Latin A\textcompwordmark Y f\textcompwordmark i +\LGR A\textcompwordmark U "\textcompwordmark i + + +\Latin Spacing accent chars: +% +\Latin \textasciicircum a +\LGR \textasciicircum a \textasciicircum i % using textsym glyph +% +\Latin \textasciitilde a +\LGR \textasciitilde a \textasciitilde i +% +\Latin \textasciibreve a +\LGR \textasciibreve a \textasciibreve i +% +\Latin \textasciimacron a +\LGR \textasciimacron a \textasciimacron i +% +\Latin \textasciidieresis a +\LGR \textasciidieresis a \textasciidieresis i +% +\Latin \textasciiacute a +\LGR \textasciiacute a \textasciiacute i +% +\Latin \textasciigrave a +\LGR \textasciigrave a \textasciigrave i + +\Latin Symbols for SI-units: +\Latin 5\,\textmu{}m, 5\,k\textohm{}; +\LGR 5\,\textmu{}{\Latin m}, 5\,{\Latin k}\textohm +\Latin ; but never italic: 5\,$\mu$m + +\Latin Letter schwa and Euro symbol: % \textschwa (needs e.g. T3) +\LGR \textschwa{}, \texteuro{} +\Latin + +Some symbol definitions expect a Latin font.\emph{ babel-greek} redefines +them with \verb|\latintext|, however this macro is not guaranteed to be +defined, so it should not be used in a font encoding definition file. The +textcomp.sty package provides coyright, registered, and trademark symbols +for use with any font encodings. (Like any other Latin character, the +``sharp s'' (\ss) is not save to use when LGR is the active font encoding.) + +Latin: +\textcopyright{} +\textregistered{} +\texttrademark{} +\SS{} (uppercase of \ss). + +LGR (with textcomp): +\LGR +\textcopyright{} +\textregistered{} +\texttrademark{} +\SS{} (\Latin uppercase of \LGR \ss). +\Latin + +\subsection{Greek alphabet} + +Greek letters via Latin transcription and LICR macros: + +\begin{quote} + \LGR + \MakeUppercase{a b g d e z h j i k l m n x o p r s t u f q y w} + + a b g d e z h j i k l m n x o p r sv t u f q y w + + \textAlpha{} \textBeta{} \textGamma{} \textDelta{} \textEpsilon{} + \textZeta{} \textEta{} \textTheta{} \textIota{} \textKappa{} + \textLambda{} \textMu{} \textNu{} \textXi{} \textOmicron{} \textPi{} + \textRho{} \textSigma{} \textTau{} \textUpsilon{} \textPhi{} + \textChi{} \textPsi{} \textOmega{} + + \textalpha{} \textbeta{} \textgamma{} \textdelta{} \textepsilon{} + \textzeta{} \texteta{} \texttheta{} \textiota{} \textkappa{} + \textlambda{} \textmu{} \textnu{} \textxi{} \textomicron{} \textpi{} + \textrho{} \textsigma{} \texttau{} \textupsilon{} + \textphi{} \textchi{} \textpsi{} \textomega{} +\end{quote} + +The small sigma is set with a different glyph if it ends a word: + +\begin{quote} + \LGR \textsigma{} \Latin textsigma \\ + \LGR \textfinalsigma{} \Latin textfinalsigma or textvarsigma +\end{quote} + +In the Latin transcription, the letter `s' stands for \verb|\textautosigma| +which automatically chooses the glyph according to the position. + +\subsection{Additional Greek symbols} + +\begin{quote} + \LGR \textkoppa{} \Latin textkoppa \\ % ϟ + \LGR \textqoppa{} \Latin textqoppa (archaic koppa) \\ % ϙ + \LGR \textQoppa{} \Latin textQoppa (archaic Koppa) \\ % Ϙ + \LGR \textstigma{} \Latin textstigma \\ % ϛ + \LGR \textvarstigma{} \Latin textvarstigma \\ % no separate Unicode character + \LGR \textStigma{} \Latin textStigma (Sigma-Tau-Ligature in CB-fonts)% + \footnote{the name ``stigma'' originally applied to a medieval sigma-tau + ligature, whose shape was confusingly similar to the cursive + digamma} \\ % Ϛ + \LGR \textsampi{} \Latin textsampi \\ % ϡ + \LGR \textSampi{} \Latin textSampi \\ % Ϡ + \LGR \textdigamma{} \Latin textdigamma \\ % ϝ (\digamma used by amsmath!) + \LGR \textDigamma{} \Latin textDigamma \\ % Ϝ + % numeral signs: http://en.wikipedia.org/wiki/Greek_numerals + \LGR \textdexiakeraia{} \Latin textdexiakeraia | % ʹ + \LGR \textnumeralsigngreek{} \Latin textnumeralsigngreek (Dexia keraia)\\ % ʹ + \LGR \textaristerikeraia{} \Latin textaristerikeraia | % ͵ + \LGR \textnumeralsignlowergreek{} \Latin textnumeralsignlowergreek + (Aristeri keraia)\\ % ͵ +\end{quote} + +\subsection{symbol variants} + +Mathematical notation distinguishes variant shapes for pi ($\pi|\varpi$), +rho ($\rho|\varrho$), theta ($\theta|\vartheta$), beta, and kappa +(characters for the latter two symbols are not included in TeX's math +fonts). These variations have no syntactic meaning in Greek text and are not +given code-points in the LGR encoding. Greek text fonts use the shape +variants interchangeabely. + +\section{Diacritics} + +Capital Greek letters have Greek diacritics (except the dialytika and +sub-iota) to the left (instead of above) and drop them if text is set in +UPPERCASE. This is implemented for all combinations that are used in Greek +texts (i.e. for which pre-composed Unicode character exist), but not for, +e.g., \LGR\~W\Latin). + +% When a word is written entirely in capital letters, diacritics are +% never used; the word Ἢ (or), is an exception to this rule because of +% the need to distinguish it from the nominative feminine article Η. + +Different conventions exist for the treatment of the sub-iota with uppercase +letters. The CB-Fonts use a capital Iota ``index'' (\LGR A|, H|, W|\Latin). + +LaTeX standard accents% +\footnote{The ogonek (\emph{little hook}) accent \k{ } (\textbackslash k) +is not defined in LGR.} +(Latin, Greek, Greek Capitals $\mapsto$ UPPERCASE) + +\begin{quote} + \`{a} \'{a} \~{a} \"{a} \^{a} \={a} \H{a} \.{a} \r{a} \u{a} \v{a} + \b{a} \c{a} \d{a} \k{a} + $\mapsto$ \MakeUppercase{% + \`{a} \'{a} \~{a} \"{a} \^{a} \={a} \H{a} \.{a} \r{a} \u{a} \v{a} + \b{a} \c{a} \d{a} \k{a} + } + + \LGR + \`{a} \'{a} \~{a} \"{a} \^{a} \={a} \H{a} \.{a} \r{a} \u{a} \v{a} + \b{a} \c{a} \d{a} + $\mapsto$ \MakeUppercase{% + \`{a} \'{a} \~{a} \"{a} \^{a} \={a} \H{a} \.{a} \r{a} \u{a} \v{a} + \b{a} \c{a} \d{a} + } + + \`{A}\'{A}\~{A}\"{A} \^{A}\={A}\H{A}\.{A}\r{A}\u{A}\v{A} + \b{A} \c{A} \d{A} + $\mapsto$ \MakeUppercase{% + \`{A}\'{A}\~{A}\"{A} \^{A}\={A}\H{A}\.{A}\r{A}\u{A}\v{A} + \b{A} \c{A} \d{A} + } +\end{quote} + +Additional Greek diacritics +(Greek, Greek Capitals% +\footnote{The dialytika is not used on Initial letters.} % (\LGR \"'I \"`I \~"I) +$\mapsto$ UPPERCASE) + +\begin{quote} + \LGR + \<{a} \>{e} \<\`{i} \'"i \`"i \~"i \`\>{h} \'<{o} \'>{o} \~\<{u} \~\>{w} a| + $\mapsto$ \MakeUppercase{% + \<{a} \>{e} \<\`{i} \'"i \`"i \~"i \`\>{h} \'<{o} \'>{o} \~\<{u} \~\>{w} a| + } + + \<{A} \>{E} \<\`{I} \`\>{H} \'<{O} \'>{O} \~\<{U} \~\>{W} A| + $\mapsto$ \MakeUppercase{% + \<{A} \>{E} \<\`{I} \`\>{H} \'<{O} \'>{O} \~\<{U} \~\>{W} A| + } +\end{quote} + +\Latin Input variants and their conversion with MakeUppercase:% + +\begin{quote} +\LGR + +\~>a \>\~a \~\>{a}, \~\~{h} \~>h \>~h \>\~h \~>h \~>h|, \~\~i \~>i, \~\~u \~>u, \~w, \\~w \~>w, \~a \>\~a \~\>{a}, \~\~{h} \~>h \>~h \>\~h \~>h \~>h|, \~\~i \~>i, \~\~u \~>u, \~w, \\~w \~>w, \~{\textepsilon} \"'{\textiota} \`>\texteta{} +\'<{\textomicron} \~<{\textupsilon} \~>{\textomega} +\<{\textAlpha} \>{\textEpsilon} \"{\textIota} \`>\textEta{} +\'<{\textOmicron} \~<{\textUpsilon} \~>{\textOmega} +\\ +\MakeUppercase{% + \<{\textalpha} \>{\textepsilon} \"'{\textiota} \`\>\texteta{} + \'<{\textomicron} \~<{\textupsilon} \~>{\textomega} + \<{\textAlpha} \>{\textEpsilon} \"{\textIota} \`>\textEta{} + \'<{\textOmicron} \~<{\textUpsilon} \~>{\textOmega} +} + + \<'A \<\'A \'u $\mapsto$ + \LGR \MakeUppercase{\"~i \<~i \"~u \<~u \`>u} + + \Latin combined accent with tilde-accent macro: + \LGR \"\~i \~"u $\mapsto$ \MakeUppercase{\"\~i \~"u} +\end{quote} + +\Latin +Accents input via the Latin transliteration are not dropped with +MakeUppercase, unless Babel is loaded and the current language is Greek +(because the required local re-definitions of the \texttt{uccode} are done in +\texttt{greek.ldf} from the \emph{babel-greek} package). + +\begin{quote} \LGR + 'a "i `a >a a |: +\begin{quote} + \begin{tabbing} + COL1\quad \= COL2\quad \= COL3\quad \= COL4\quad \\ + COL1 \> \> COL3 \\ + Viele \> Gr\a"u\ss e \> \LGR \a<\textalpha{} \> \LGR \a>\textomega + \end{tabbing} +\end{quote} + + +\Latin Combinations with named accents: +\LGR \accdasia'a \accdasia`a \accdasia\~a. + +\Latin The dialytika must be kept in UPPERCASE, e.\,g. + +\begin{quote} + % from http://diacritics.typo.cz/index.php?id=70 μαΐστρος -> ΜΑΪΣΤΡΟΣ. + \LGR ma\"'istros $\mapsto$ \MakeUppercase{ma\"'istros} + \Latin or % from teubner εὐζωΐα -> ΕΥΖΩΪΑ. + \LGR e\>uzw\'"ia $\mapsto$ \MakeUppercase{e\>uzw\'"ia}. +\end{quote} + +This is implemented for all input variants of diacritics with +dialytika: + +\begin{quote} + \LGR \"i \"'i \"`i \"\~i \"u \"'u \"`u \"\~u $\mapsto$ + \MakeUppercase{\"i \"'i \"`i \"\~i \"u \"'u \"`u \"\~u}, +\end{quote} + +Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if +placed on the first vowel of a diphthong ({\LGR \'ai, \'au, \'ei}). A +dialytika must be placed on the second vowel if they are dropped: \LGR +(\MakeUppercase{\'ai, \'au, \'ei}). + +\begin{quote} + % from teubner: άυλος/ΑΫΛΟΣ + \'aulos $\mapsto$ \MakeUppercase{\'aulos}, + \>'aulos $\mapsto$ \MakeUppercase{\>'aulos}, + % from http://diacritics.typo.cz/index.php?id=69 μάινα -> ΜΑΪΝΑ + m\'aina $\mapsto$ \MakeUppercase{m\'aina}, + % from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema + % κέικ, ἀυπνία/αϋπνία + k\'eik, $\mapsto$ \MakeUppercase{k\'eik} + \>aupn\'ia $\mapsto$ \MakeUppercase{\>aupn\'ia} +\end{quote} + +\newpage + +\Latin Test the auto-hiatus feature for side-effects: + +\LGR \MakeUppercase{\'a b} (\Latin must keep space after A). + +Kerning (see the input): +\LGR +\newcommand\md{\textcompwordmark} +\newcommand\MU{\MakeUppercase} + + \md \MU{ AO AY AI AU RA OA UA DU} [ \\ +\<\md \MU{ \\md \MU{ \>AO \>AY \>AI \>AU \>RA \>OA U\>A D\>U} [ \\ +\>'\md\MU{ \>'AO \>'AY \>'AI \>'AU \>'RA \>'OA U\>'A D\>'U} [ \\ +\'\md \MU{ \'AO \'AY \'AI \'AU \'RA \'OA U\'A D\'U} [ \\ +\>`\md\MU{ \>`AO \>`AY \>`AI \>`AU \>`RA \>`OA U\>`A D\>`U} [ \\ +\<'\md\MU{ \<'AO \<'AY \<'AI \<'AU \<'RA \<'OA U\<'A D\<'U} [ \\ +\`\md \MU{ \`AO \`AY \`AI \`AU \`RA \`OA U\`A D\`U} [ \\ +\<`\md\MU{ \<`AO \<`AY \<`AI \<`AU \<`RA \<`OA U\<`A D\<`U} [ \\ +\~\md \MU{ \~AO \~AY \~AI \~AU \~RA \~OA U\~A D\~U} [ \\ +\~>\md\MU{ \~>AO \~>AY \~>AI \~>AU \~>RA \~>OA U\~>A D\~>U} [ \\ +\~<\md\MU{ \~ ``\textpentehekaton``, +% .. fix ``\textperiodcentered``, +% .. add composite command for Ῥ (Rho with Dasia). +% 0.9 2013-07-16 move common definitions to ``greek-fontenc.def``, +% .. add composite commands for single quotation marks. +% 0.11.2 2014-09-04 remove duplicate code. +% 0.13 2015-08-04 Support for symbol variants. +% 0.13.1 2015-12-07 Fix `rho with dasia bug` (Linus Romer). +% 0.13.3 2019-07-09 Drop error font declaration (cf. `ltxbugs 4399`_). +% ====== ============ ======================================================== +% +% Usage +% ----- +% +% Load this file by calling fontenc_ with the ``LGR`` option +% or indirectly via the babel_, textalpha_ or alphabeta_ packages. +% +% Example: +% Select font encodings `T1` (as default) and `LGR` (for Greek): +% +% ``\usepackage[LGR,T1]{fontenc}`` +% +% +% Implementation +% -------------- +% +% 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 tests via eTeX's ``\ifdefined``). However, in this case +% no harm is done as the macro is defined by the identification_ below +% anyway. +% +% :: + +% read this file only once +\@ifundefined{ver@lgrenc.def} + {} + {\message{LGR font encoding definitions already loaded} + \expandafter\endinput % "return" + } + + +% Identification +% ~~~~~~~~~~~~~~ +% :: + +\ProvidesFile{lgrenc.def} +[2019/07/09 v0.13.3 LGR Greek font encoding definitions] +% Copyright © 2010 Günter Milde +% This file is part of the "greek-fontenc" package. +% It 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. + +% You can test the version date using +% +% .. code:: latex +% +% \@ifl@ter {extension}{filename}{date}{YES}{NO} +% +% or using ltxcmds_' ``\@iffilelater``. +% +% +% Base setup +% ~~~~~~~~~~ +% +% Declare the LGR font encoding and base substitutions:: + +\DeclareFontEncoding{LGR}{}{} +\DeclareFontSubstitution{LGR}{cmr}{m}{n} + +% Text symbols +% ~~~~~~~~~~~~ +% +% Greek Alphabet +% """""""""""""" +% +% Greek letters are accessible by the Latin transcription, but the mapping is +% specific to the LGR font encoding. +% +% The LICR macros provide a way to access the symbols independent of the +% specific font encoding, in any font encoding supporting Greek. An +% alternative Greek font encodings is LGI (ibycus_). Greek script is also +% supported by the Unicode-based font encodings PU (`PDF Unicode` used by +% hyperref_ for PDF metadata), TU, EU1 (XeTeX) and EU2 (LuaTeX). The textalpha_ +% package makes these macros available independent of the current font +% encoding. +% :: + +\DeclareTextSymbol{\textAlpha}{LGR}{65} +\DeclareTextSymbol{\textBeta}{LGR}{66} +\DeclareTextSymbol{\textGamma}{LGR}{71} +\DeclareTextSymbol{\textDelta}{LGR}{68} +\DeclareTextSymbol{\textEpsilon}{LGR}{69} +\DeclareTextSymbol{\textZeta}{LGR}{90} +\DeclareTextSymbol{\textEta}{LGR}{72} +\DeclareTextSymbol{\textTheta}{LGR}{74} +\DeclareTextSymbol{\textIota}{LGR}{73} +\DeclareTextSymbol{\textKappa}{LGR}{75} +\DeclareTextSymbol{\textLambda}{LGR}{76} +\DeclareTextSymbol{\textMu}{LGR}{77} +\DeclareTextSymbol{\textNu}{LGR}{78} +\DeclareTextSymbol{\textXi}{LGR}{88} +\DeclareTextSymbol{\textOmicron}{LGR}{79} +\DeclareTextSymbol{\textPi}{LGR}{80} +\DeclareTextSymbol{\textRho}{LGR}{82} +\DeclareTextSymbol{\textSigma}{LGR}{83} +\DeclareTextSymbol{\textTau}{LGR}{84} +\DeclareTextSymbol{\textUpsilon}{LGR}{85} +\DeclareTextSymbol{\textPhi}{LGR}{70} +\DeclareTextSymbol{\textChi}{LGR}{81} +\DeclareTextSymbol{\textPsi}{LGR}{89} +\DeclareTextSymbol{\textOmega}{LGR}{87} +% +\DeclareTextSymbol{\textalpha}{LGR}{97} +\DeclareTextSymbol{\textbeta}{LGR}{98} +\DeclareTextSymbol{\textgamma}{LGR}{103} +\DeclareTextSymbol{\textdelta}{LGR}{100} +\DeclareTextSymbol{\textepsilon}{LGR}{101} +\DeclareTextSymbol{\textzeta}{LGR}{122} +\DeclareTextSymbol{\texteta}{LGR}{104} +\DeclareTextSymbol{\texttheta}{LGR}{106} +\DeclareTextSymbol{\textiota}{LGR}{105} +\DeclareTextSymbol{\textkappa}{LGR}{107} +\DeclareTextSymbol{\textlambda}{LGR}{108} +\DeclareTextSymbol{\textmu}{LGR}{109} +\DeclareTextSymbol{\textnu}{LGR}{110} +\DeclareTextSymbol{\textxi}{LGR}{120} +\DeclareTextSymbol{\textomicron}{LGR}{111} +\DeclareTextSymbol{\textpi}{LGR}{112} +\DeclareTextSymbol{\textrho}{LGR}{114} +\DeclareTextCommand{\textsigma}{LGR}{s\noboundary} % σ +\DeclareTextSymbol{\textvarsigma}{LGR}{99} % ς final sigma +\DeclareTextCommand{\textfinalsigma}{LGR}{\textvarsigma} % ς final sigma +\DeclareTextSymbol{\textautosigma}{LGR}{115} % σ (ς at end of word) +\DeclareTextSymbol{\texttau}{LGR}{116} +\DeclareTextSymbol{\textupsilon}{LGR}{117} +\DeclareTextSymbol{\textphi}{LGR}{102} +\DeclareTextSymbol{\textchi}{LGR}{113} +\DeclareTextSymbol{\textpsi}{LGR}{121} +\DeclareTextSymbol{\textomega}{LGR}{119} + + +% Additional Greek symbols +% """""""""""""""""""""""" +% +% Ancient Greek Numbers (Athenian Numerals) +% ''''''''''''''''''''''''''''''''''''''''' +% +% Names from ucs_ (``ucsencs.def``) +% (In ucs, five hundred is (wrongly?) named \textpentehkaton.) :: + +\DeclareTextSymbol{\textpentedeka}{LGR}{2} % GREEK ACROPHONIC ATTIC FIFTY +\DeclareTextSymbol{\textpentehekaton}{LGR}{3} % GREEK ACROPHONIC ATTIC FIVE HUNDRED +\DeclareTextSymbol{\textpenteqilioi}{LGR}{4} % GREEK ACROPHONIC ATTIC FIVE THOUSAND +\DeclareTextSymbol{\textpentemuria}{LGR}{5} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND + + +% Archaic letters +% ''''''''''''''' +% Names after teubner_ and ucs_:: + +\DeclareTextSymbol{\textstigma}{LGR}{6} % ϛ +\DeclareTextSymbol{\textvarstigma}{LGR}{7} % stigma variant (CB.enc, teubner) +\DeclareTextSymbol{\textkoppa}{LGR}{18} % ϟ (greek small letter koppa) +\DeclareTextSymbol{\textqoppa}{LGR}{19} % ϙ (archaic koppa) +\DeclareTextSymbol{\textQoppa}{LGR}{21} % Ϙ (archaic Koppa) +\DeclareTextSymbol{\textStigma}{LGR}{22} % Ϛ in some fonts ϹΤ ligature +\DeclareTextSymbol{\textSampi}{LGR}{23} % Ϡ +\DeclareTextSymbol{\textsampi}{LGR}{27} % ϡ +\DeclareTextSymbol{\textanoteleia}{LGR}{38} % · +\DeclareTextSymbol{\texterotimatiko}{LGR}{63} % ; +\DeclareTextSymbol{\textdigamma}{LGR}{147} % ϝ (ucs) \digamma used by amsmath for math-macro +\DeclareTextSymbol{\textDigamma}{LGR}{195} % Ϝ (ucs) + + +% Numeral signs +% ''''''''''''' +% See also http://en.wikipedia.org/wiki/Greek_numerals +% +% Names from ucs_:: + +\DeclareTextSymbol{\textdexiakeraia}{LGR}{254} % ʹ (Dexia keraia) +\DeclareTextSymbol{\textaristerikeraia}{LGR}{255} % ͵ (Aristeri keraia) + +% variant symbols +% ''''''''''''''' +% +% Mathematical notation distinguishes variant shapes for pi, phi, rho, theta +% (small and capital), beta, and kappa (characters for the latter three +% symbols are not included in TeX’s math fonts). These variations have no +% syntactic meaning in Greek text and are not given code-points in the LGR +% encoding. Greek text fonts use the shape variants interchangeabely. +% +% However, as Unicode defines separate code points for the symbol variants, we +% provide fallback LICR macros with detailed error reporting:: + +\providecommand*{\LGR@TextSymbolUnavailable}[1]{% + \PackageError{greek-fontenc}{character \string#1 not available \MessageBreak + in 8-bit TeX} + {Use XeTeX/LuaTeX if you need to distinguish the symbol from the letter.\MessageBreak + The package `textalpha' with `normalize-symbols' maps the GREEK SYMBOL\MessageBreak + character to the corresponding GREEK LETTER.\MessageBreak + Press to proceed (dropping the symbol from the document).} +} + +\providecommand*{\LGR@TextSymbolOnlyMath}[2]{% + \PackageError{greek-fontenc}{character \string#1 not available in text mode} + {Use #2 or XeTeX/LuaTeX if you need to distinguish\MessageBreak + the symbol from the letter.\MessageBreak + The package `textalpha' with `normalize-symbols' maps the GREEK SYMBOL\MessageBreak + character to the corresponding GREEK LETTER.\MessageBreak + Press to proceed (dropping the symbol from the document).} +} + +\ProvideTextCommand{\textbetasymbol} {LGR}{\LGR@TextSymbolUnavailable{ϐ beta symbol}} +\ProvideTextCommand{\textkappasymbol}{LGR}{\LGR@TextSymbolUnavailable{ϰ kappa symbol}} +\ProvideTextCommand{\textThetasymbol}{LGR}{\LGR@TextSymbolUnavailable{ϴ Theta symbol}} + +\ProvideTextCommand{\textthetasymbol} {LGR}{\LGR@TextSymbolOnlyMath{ϑ theta symbol}{$\vartheta$}} +\ProvideTextCommand{\textphisymbol} {LGR}{\LGR@TextSymbolOnlyMath{ϕ phi symbol}{$\phi$}} +\ProvideTextCommand{\textpisymbol} {LGR}{\LGR@TextSymbolOnlyMath{ϖ pi symbol}{$\varpi$}} +\ProvideTextCommand{\textrhosymbol} {LGR}{\LGR@TextSymbolOnlyMath{ϱ rho symbol}{$\varrho$}} +\ProvideTextCommand{\textepsilonsymbol}{LGR}{\LGR@TextSymbolOnlyMath{ϵ lunate epsilon symbol}{$\epsilon$}} + +% Other +% """"" +% +% Characters that also exist in other font encodings: +% +% * define them for LGR if there is a matching glyph, +% * use established macro names that match with other ``*enc.def`` files and +% ``textcomp.sty``. +% +% All encodings: See usrguide.pdf, chapter 3.14 ff:: + +\DeclareTextSymbol{\textendash}{LGR}{0} % EN DASH +\DeclareTextSymbol{\textquoteleft}{LGR}{28} % ‘ +\DeclareTextSymbol{\textquoteright}{LGR}{29} % ’ +\DeclareTextSymbol{\textperiodcentered}{LGR}{38} % · = \textanoteleia +\DeclareTextSymbol{\textcompwordmark}{LGR}{118} % ZERO WIDTH NO JOINER +\DeclareTextSymbol{\textemdash}{LGR}{127} % EM DASH + +% T1:: + +\DeclareTextSymbol{\guillemotleft}{LGR}{123} % « +\DeclareTextSymbol{\guillemotright}{LGR}{125} % » + +% TS1:: + +\ProvideTextCommand{\textasciibreve}{LGR}{\char30\textcompwordmark} % ˘ +\ProvideTextCommand{\textasciimacron}{LGR}{\char31\textcompwordmark} % ¯ +\ProvideTextCommand{\textasciidieresis}{LGR}{"\textcompwordmark} % " +\ProvideTextCommand{\textasciiacute}{LGR}{'\textcompwordmark} % ' +\ProvideTextCommand{\textasciigrave}{LGR}{`\textcompwordmark} % ` +\DeclareTextCommand{\textasciitilde}{LGR}{\char126\textcompwordmark} % ~ +\DeclareTextSymbol{\textohm}{LGR}{87} % Ω (Ohm sign -> Omega) +\DeclareTextSymbol{\texteuro}{LGR}{24} % € \euro in greek.ldf +\DeclareTextSymbol{\textpercent}{LGR}{37} % % +\DeclareTextSymbol{\textperthousand}{LGR}{25} % ‰ \permill in greek.ldf + +% T3 (tipa):: + +\DeclareTextSymbol{\textschwa}{LGR}{26} % ə + +% T3 also defines some greek letters as well as Latin characters with Greek +% names: +% +% According to the Unicode standard, the following IPA characters are identic +% to the Greek letters: +% +% - 03B2 greek small letter beta +% - 03B8 greek small letter theta +% - 03BB greek small letter lamda +% - 03C7 greek small letter chi +% +% The following characters in the IPA block refer to Greek letters: +% +% - 0251 LATIN SMALL LETTER ALPHA → greek small letter alpha - 03B1 +% - 025B LATIN SMALL LETTER OPEN E = epsilon → greek small letter epsilon - 03B5 +% - 0263 LATIN SMALL LETTER GAMMA → greek small letter gamma - 03B3 +% - 0269 LATIN SMALL LETTER IOTA → greek small letter iota - 03B9 +% - 0278 LATIN SMALL LETTER PHI → greek small letter phi - 03C6 +% - 028A LATIN SMALL LETTER UPSILON → greek small letter upsilon - 03C5 +% +% `tipa` uses the macro names ``\textepsilon``, ``\textgamma``, ``\textiota``, +% ``\textphi``, and ``\textupsilon`` for the Latin characters. This is no +% problem with 8-bit fonts (set the font encoding to T3 vs. LGR to +% disambiguate), but leads to ambiguity with Unicode fonts. xunicode_ uses the +% ``gr`` infix and alias names to disambiguate: +% +% - 03B3 ``\textgrgamma`` +% - 03B9 ``\textgriota`` +% - 03C6 ``\textgrphi`` (see x0278 ) +% +% but not for epsilon and upsilon (03C2 ``\textgrsigma`` is the final sigma). +% +% It also assigns alias names to the Latin counterparts, however not on a +% systematical basis: +% +% - 0194 ``\textGammaafrican`` +% - 0196 ``\textIotaafrican`` +% - 0251 ``\textscripta`` +% - 025B ``\texteopen`` +% - 0263 ``\textbabygamma``, ``\textgammalatinsmall`` +% - 0269 ``\textiotalatin`` +% - 028A ``\textscupsilon`` % TIPA-U +% +% +% +% Not implemented +% """"""""""""""" +% +% The characters at position 16 and 17 are used in the ``\nexus`` macro +% of the teubner_ package to form an extensible, hat-like bracket. In +% ``CB.enc``, they are mapped to +% +% 16--MODIFIER LETTER LOW ACUTE ACCENT +% 17--MODIFIER LETTER LOW GRAVE ACCENT +% +% but according to the documentation of Werner Lemberg's `babel patch`_, +% they rather represent the left and right part of U+23E0 TOP TORTOISE +% SHELL BRACKET. +% +% Babel's ``lgrenc.def`` has some definitions to prevent surprises with +% macros that expect a Latin script. These definitions are problematic in a +% font-encoding definition file as they require ``\textlatin`` which is +% defined in ``babel.def``. They were moved to ``greek.ldf``. +% +% Diacritics +% ~~~~~~~~~~ +% +% This section defines `named macros`_ for Greek diacritics and standard +% `symbol macros`_ as alias for simple diacritics. Convenient input +% conventions for `composite diacritics`_ are defined as `composite +% definitions`_. +% +% Advantages: +% +% * input convention similar to LGR input encodings (just prepend a ``\``). +% +% * Access pre-composed characters without resorting to the +% ligature mechanism (allows proper kerning, cf. teubner-doc_). +% +% * Named macros can be used to ensure a font encoding supporting Greek is +% used. However, substitution with pre-composed characters works only for +% the active font encoding (cf. textalpha_). Named accent macros can also be +% used instead of the ``\@tabacckludge`` by to-LaTeX converters to ensure +% working also inside the tabbing environment. +% +% * Named macros are required for upcasing according to Greek typesetting +% conventions (cf. `UPPERCASE`_ below) and for composite diacritics. +% +% +% Named macros +% """""""""""" +% +% Definitions are based on the teubner_ package by Claudio Beccari, the ucs_ +% package, and the `babel patch`_ by Werner Lemberg. Names are derived from +% the Unicode name with the prefix "acc" (cf. `How to name accent macros?` +% in the README_) reducing the probability of incompatibilities compared to the +% two-letter teubner_ diacritic macros or the "text" prefix used by ucs_. +% +% Simple Greek diacritics:: + +\DeclareTextAccent{\accdialytika}{LGR}{34} % διαλυτικά (diaeresis/trema) +\DeclareTextAccent{\acctonos}{LGR}{39} % τόνος/ὀξεῖα tonos/oxia (acute) +\DeclareTextAccent{\accdasia}{LGR}{60} % δασεῖα spiritus asper (rough breathing) +\DeclareTextAccent{\accpsili}{LGR}{62} % ψιλή spiritus lenis (smooth breathing) +\DeclareTextAccent{\accvaria}{LGR}{96} % βαρεῖα (grave) +\DeclareTextAccent{\accperispomeni}{LGR}{126} % περισπωμένη (circonflex/tilde) + +% The sub-iota__ is input after the base character. In LGR fonts, ligatures are +% defined for pre-composed characters, the postfix ligature does not interfere +% with kerning:: + +\DeclareTextSymbol{\prosgegrammeni}{LGR}{8} % ι "capital" sub-iota +\DeclareTextSymbol{\ypogegrammeni}{LGR}{124} % ͺ "small" sub-iota + +% __ http://en.wikipedia.org/wiki/Hypogegrammeni +% +% Composite diacritics:: + +% Teubner name +\DeclareTextAccent{\accdialytikaperispomeni}{LGR}{32} % Cd +\DeclareTextAccent{\accdialytikatonos}{LGR}{35} % Ad +\DeclareTextAccent{\accdialytikavaria}{LGR}{36} % Gd + +\DeclareTextAccent{\accdasiaperispomeni}{LGR}{64} % Cr +\DeclareTextAccent{\accdasiavaria}{LGR}{67} % Gr +\DeclareTextAccent{\accdasiaoxia}{LGR}{86} % Ar + +\DeclareTextAccent{\accpsiliperispomeni}{LGR}{92} % Cs +\DeclareTextAccent{\accpsilioxia}{LGR}{94} % As +\DeclareTextAccent{\accpsilivaria}{LGR}{95} % Gs + +% For classical Greek and linguistics, the LGR font encoding contains a number +% of additional diacritic symbols:: + +\DeclareTextAccent{\accinvertedbrevebelow}{LGR}{1} % INVERTED BREVE BELOW +\DeclareTextAccent{\textsubarch}{LGR}{1} % (tipa) +\DeclareTextAccent{\accbrevebelow}{LGR}{20} % BREVE BELOW +\DeclareTextAccent{\u}{LGR}{30} % BREVE (Greek vrachy) +\DeclareTextAccent{\=}{LGR}{31} % MACRON + +% Aliases +% """"""" +% +% The standard _`symbol macros` are exclusively used for Greek diacritics +% in LGR:: + +\DeclareTextCommand{\"}{LGR}{\accdialytika} +\DeclareTextCommand{\'}{LGR}{\acctonos} +\DeclareTextCommand{\`}{LGR}{\accvaria} +\DeclareTextCommand{\~}{LGR}{\accperispomeni} + +% Common Greek font encoding definitions +% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +% +% The file greek-fontenc.def contains font encoding definitions that are +% shared by font encodings providing Greek characters:: + +\input{greek-fontenc.def} + + +% Composite definitions +% ~~~~~~~~~~~~~~~~~~~~~ +% +% Composite diacritics +% """""""""""""""""""" +% +% Composite accents can be input as sequence of simple diacritics (in +% arbitrary order) via named macro, symbol macro and "transcription +% characters", e.g. ``\accdialytica\accvaria\textalpha``, ``\"\'\textalpha``, +% ``\"'\textalpha``, or ``\'"\textalpha``. +% +% The actual declarations are part of the `common Greek font encoding +% definitions`_. +% +% +% Pre-composed letters +% """""""""""""""""""" +% Small letters with diacritics +% ''''''''''''''''''''''''''''' +% +% (from teubner_ with changed names of the composite accents):: + +\DeclareTextComposite{\accvaria}{LGR}{a}{128} +\DeclareTextComposite{\accdasia}{LGR}{a}{129} +\DeclareTextComposite{\accpsili}{LGR}{a}{130} +\DeclareTextComposite{\accdasiavaria}{LGR}{a}{131} +\DeclareTextComposite{\acctonos}{LGR}{a}{136} +\DeclareTextComposite{\accdasiaoxia}{LGR}{a}{137} +\DeclareTextComposite{\accpsilioxia}{LGR}{a}{138} +\DeclareTextComposite{\accpsilivaria}{LGR}{a}{139} +\DeclareTextComposite{\accperispomeni}{LGR}{a}{144} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{a}{145} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{a}{146} +\DeclareTextComposite{\accvaria}{LGR}{h}{152} +\DeclareTextComposite{\accdasia}{LGR}{h}{153} +\DeclareTextComposite{\accpsili}{LGR}{h}{154} +\DeclareTextComposite{\acctonos}{LGR}{h}{160} +\DeclareTextComposite{\accdasiaoxia}{LGR}{h}{161} +\DeclareTextComposite{\accpsilioxia}{LGR}{h}{162} +\DeclareTextComposite{\accdasiavaria}{LGR}{h}{163} +\DeclareTextComposite{\accperispomeni}{LGR}{h}{168} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{h}{169} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{h}{170} +\DeclareTextComposite{\accpsilivaria}{LGR}{h}{171} +\DeclareTextComposite{\accvaria}{LGR}{w}{176} +\DeclareTextComposite{\accdasia}{LGR}{w}{177} +\DeclareTextComposite{\accpsili}{LGR}{w}{178} +\DeclareTextComposite{\accdasiavaria}{LGR}{w}{179} +\DeclareTextComposite{\acctonos}{LGR}{w}{184} +\DeclareTextComposite{\accdasiaoxia}{LGR}{w}{185} +\DeclareTextComposite{\accpsilioxia}{LGR}{w}{186} +\DeclareTextComposite{\accpsilivaria}{LGR}{w}{187} +\DeclareTextComposite{\accperispomeni}{LGR}{w}{192} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{w}{193} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{w}{194} +\DeclareTextComposite{\accvaria}{LGR}{i}{200} +\DeclareTextComposite{\accdasia}{LGR}{i}{201} +\DeclareTextComposite{\accpsili}{LGR}{i}{202} +\DeclareTextComposite{\accdasiavaria}{LGR}{i}{203} +\DeclareTextComposite{\acctonos}{LGR}{i}{208} +\DeclareTextComposite{\accdasiaoxia}{LGR}{i}{209} +\DeclareTextComposite{\accpsilioxia}{LGR}{i}{210} +\DeclareTextComposite{\accpsilivaria}{LGR}{i}{211} +\DeclareTextComposite{\accperispomeni}{LGR}{i}{216} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{i}{217} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{i}{218} +\DeclareTextComposite{\accdialytika}{LGR}{i}{240} +\DeclareTextComposite{\accdialytikavaria}{LGR}{i}{241} +\DeclareTextComposite{\accdialytikatonos}{LGR}{i}{242} +\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{i}{243} +\DeclareTextComposite{\accvaria}{LGR}{u}{204} +\DeclareTextComposite{\accdasia}{LGR}{u}{205} +\DeclareTextComposite{\accpsili}{LGR}{u}{206} +\DeclareTextComposite{\accdasiavaria}{LGR}{u}{207} +\DeclareTextComposite{\acctonos}{LGR}{u}{212} +\DeclareTextComposite{\accdasiaoxia}{LGR}{u}{213} +\DeclareTextComposite{\accpsilioxia}{LGR}{u}{214} +\DeclareTextComposite{\accpsilivaria}{LGR}{u}{215} +\DeclareTextComposite{\accperispomeni}{LGR}{u}{220} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{u}{221} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{u}{222} +\DeclareTextComposite{\accdialytika}{LGR}{u}{244} +\DeclareTextComposite{\accdialytikavaria}{LGR}{u}{245} +\DeclareTextComposite{\accdialytikatonos}{LGR}{u}{246} +\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{u}{247} +\DeclareTextComposite{\accvaria}{LGR}{e}{224} +\DeclareTextComposite{\accdasia}{LGR}{e}{225} +\DeclareTextComposite{\accpsili}{LGR}{e}{226} +\DeclareTextComposite{\accdasiavaria}{LGR}{e}{227} +\DeclareTextComposite{\acctonos}{LGR}{e}{232} +\DeclareTextComposite{\accdasiaoxia}{LGR}{e}{233} +\DeclareTextComposite{\accpsilioxia}{LGR}{e}{234} +\DeclareTextComposite{\accpsilivaria}{LGR}{e}{235} +\DeclareTextComposite{\accvaria}{LGR}{o}{228} +\DeclareTextComposite{\accdasia}{LGR}{o}{229} +\DeclareTextComposite{\accpsili}{LGR}{o}{230} +\DeclareTextComposite{\accdasiavaria}{LGR}{o}{231} +\DeclareTextComposite{\acctonos}{LGR}{o}{236} +\DeclareTextComposite{\accdasiaoxia}{LGR}{o}{237} +\DeclareTextComposite{\accpsilioxia}{LGR}{o}{238} +\DeclareTextComposite{\accpsilivaria}{LGR}{o}{239} +\DeclareTextComposite{\accdasia}{LGR}{r}{251} +\DeclareTextComposite{\accpsili}{LGR}{r}{252} + +% Pre-composed letters with diacritics + LICR macros:: + +\DeclareTextComposite{\accvaria}{LGR}{\textalpha}{128} +\DeclareTextComposite{\accdasia}{LGR}{\textalpha}{129} +\DeclareTextComposite{\accpsili}{LGR}{\textalpha}{130} +\DeclareTextComposite{\accdasiavaria}{LGR}{\textalpha}{131} +\DeclareTextComposite{\acctonos}{LGR}{\textalpha}{136} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\textalpha}{137} +\DeclareTextComposite{\accpsilioxia}{LGR}{\textalpha}{138} +\DeclareTextComposite{\accpsilivaria}{LGR}{\textalpha}{139} +\DeclareTextComposite{\accperispomeni}{LGR}{\textalpha}{144} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textalpha}{145} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textalpha}{146} +\DeclareTextComposite{\accvaria}{LGR}{\texteta}{152} +\DeclareTextComposite{\accdasia}{LGR}{\texteta}{153} +\DeclareTextComposite{\accpsili}{LGR}{\texteta}{154} +\DeclareTextComposite{\acctonos}{LGR}{\texteta}{160} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\texteta}{161} +\DeclareTextComposite{\accpsilioxia}{LGR}{\texteta}{162} +\DeclareTextComposite{\accdasiavaria}{LGR}{\texteta}{163} +\DeclareTextComposite{\accperispomeni}{LGR}{\texteta}{168} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\texteta}{169} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\texteta}{170} +\DeclareTextComposite{\accpsilivaria}{LGR}{\texteta}{171} +\DeclareTextComposite{\accvaria}{LGR}{\textomega}{176} +\DeclareTextComposite{\accdasia}{LGR}{\textomega}{177} +\DeclareTextComposite{\accpsili}{LGR}{\textomega}{178} +\DeclareTextComposite{\accdasiavaria}{LGR}{\textomega}{179} +\DeclareTextComposite{\acctonos}{LGR}{\textomega}{184} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\textomega}{185} +\DeclareTextComposite{\accpsilioxia}{LGR}{\textomega}{186} +\DeclareTextComposite{\accpsilivaria}{LGR}{\textomega}{187} +\DeclareTextComposite{\accperispomeni}{LGR}{\textomega}{192} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textomega}{193} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textomega}{194} +\DeclareTextComposite{\accvaria}{LGR}{\textiota}{200} +\DeclareTextComposite{\accdasia}{LGR}{\textiota}{201} +\DeclareTextComposite{\accpsili}{LGR}{\textiota}{202} +\DeclareTextComposite{\accdasiavaria}{LGR}{\textiota}{203} +\DeclareTextComposite{\acctonos}{LGR}{\textiota}{208} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\textiota}{209} +\DeclareTextComposite{\accpsilioxia}{LGR}{\textiota}{210} +\DeclareTextComposite{\accpsilivaria}{LGR}{\textiota}{211} +\DeclareTextComposite{\accperispomeni}{LGR}{\textiota}{216} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textiota}{217} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textiota}{218} +\DeclareTextComposite{\accdialytika}{LGR}{\textiota}{240} +\DeclareTextComposite{\accdialytikavaria}{LGR}{\textiota}{241} +\DeclareTextComposite{\accdialytikatonos}{LGR}{\textiota}{242} +\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\textiota}{243} +\DeclareTextComposite{\accvaria}{LGR}{\textupsilon}{204} +\DeclareTextComposite{\accdasia}{LGR}{\textupsilon}{205} +\DeclareTextComposite{\accpsili}{LGR}{\textupsilon}{206} +\DeclareTextComposite{\accdasiavaria}{LGR}{\textupsilon}{207} +\DeclareTextComposite{\acctonos}{LGR}{\textupsilon}{212} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\textupsilon}{213} +\DeclareTextComposite{\accpsilioxia}{LGR}{\textupsilon}{214} +\DeclareTextComposite{\accpsilivaria}{LGR}{\textupsilon}{215} +\DeclareTextComposite{\accperispomeni}{LGR}{\textupsilon}{220} +\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textupsilon}{221} +\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textupsilon}{222} +\DeclareTextComposite{\accdialytika}{LGR}{\textupsilon}{244} +\DeclareTextComposite{\accdialytikavaria}{LGR}{\textupsilon}{245} +\DeclareTextComposite{\accdialytikatonos}{LGR}{\textupsilon}{246} +\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\textupsilon}{247} +\DeclareTextComposite{\accvaria}{LGR}{\textepsilon}{224} +\DeclareTextComposite{\accdasia}{LGR}{\textepsilon}{225} +\DeclareTextComposite{\accpsili}{LGR}{\textepsilon}{226} +\DeclareTextComposite{\accdasiavaria}{LGR}{\textepsilon}{227} +\DeclareTextComposite{\acctonos}{LGR}{\textepsilon}{232} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\textepsilon}{233} +\DeclareTextComposite{\accpsilioxia}{LGR}{\textepsilon}{234} +\DeclareTextComposite{\accpsilivaria}{LGR}{\textepsilon}{235} +\DeclareTextComposite{\accvaria}{LGR}{\textomicron}{228} +\DeclareTextComposite{\accdasia}{LGR}{\textomicron}{229} +\DeclareTextComposite{\accpsili}{LGR}{\textomicron}{230} +\DeclareTextComposite{\accdasiavaria}{LGR}{\textomicron}{231} +\DeclareTextComposite{\acctonos}{LGR}{\textomicron}{236} +\DeclareTextComposite{\accdasiaoxia}{LGR}{\textomicron}{237} +\DeclareTextComposite{\accpsilioxia}{LGR}{\textomicron}{238} +\DeclareTextComposite{\accpsilivaria}{LGR}{\textomicron}{239} +\DeclareTextComposite{\accdasia}{LGR}{\textrho}{251} +\DeclareTextComposite{\accpsili}{LGR}{\textrho}{252} + + +% Capital letters with diacritics +% ''''''''''''''''''''''''''''''' +% +% In Greek, diacritics are omitted in all-uppercase words, but kept as part +% 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) +% +% -- http://en.wikipedia.org/wiki/Capitalization +% +% In Title Case, place diacritics before instead of above the base character:: + +\DeclareTextCompositeCommand{\accdasia}{LGR}{A}{A} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{A}{>`A} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{A}{>'A} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{A}{>\char126A} +\DeclareTextCompositeCommand{\acctonos}{LGR}{A}{'A} +\DeclareTextCompositeCommand{\accvaria}{LGR}{A}{`A} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{E}{E} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{E}{>'E} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{E}{>`E} +\DeclareTextCompositeCommand{\acctonos}{LGR}{E}{'E} +\DeclareTextCompositeCommand{\accvaria}{LGR}{E}{`E} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{H}{H} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{H}{>`H} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{H}{>'H} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{H}{>\char126H} +\DeclareTextCompositeCommand{\acctonos}{LGR}{H}{'H} +\DeclareTextCompositeCommand{\accvaria}{LGR}{H}{`H} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{I}{I} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{I}{>`I} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{I}{>'I} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{I}{>\char126I} +\DeclareTextCompositeCommand{\acctonos}{LGR}{I}{'I} +\DeclareTextCompositeCommand{\accvaria}{LGR}{I}{`I} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{O}{O} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{O}{>`O} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{O}{>'O} +\DeclareTextCompositeCommand{\acctonos}{LGR}{O}{'O} +\DeclareTextCompositeCommand{\accvaria}{LGR}{O}{`O} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{R}{W} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{W}{>`W} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{W}{>'W} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{W}{>\char126W} +\DeclareTextCompositeCommand{\acctonos}{LGR}{W}{'W} +\DeclareTextCompositeCommand{\accvaria}{LGR}{W}{`W} + +% Except for the dialytika:: + +\DeclareTextComposite{\accdialytika}{LGR}{I}{219} +\DeclareTextComposite{\accdialytika}{LGR}{U}{223} + +% Do the same for the LICR macros:: + +\DeclareTextCompositeCommand{\accdasia}{LGR}{\textAlpha}{A} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textAlpha}{>`A} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textAlpha}{>'A} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textAlpha}{>\char126A} +\DeclareTextCompositeCommand{\acctonos}{LGR}{\textAlpha}{'A} +\DeclareTextCompositeCommand{\accvaria}{LGR}{\textAlpha}{`A} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{\textEpsilon}{E} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textEpsilon}{>'E} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textEpsilon}{>`E} +\DeclareTextCompositeCommand{\acctonos}{LGR}{\textEpsilon}{'E} +\DeclareTextCompositeCommand{\accvaria}{LGR}{\textEpsilon}{`E} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{\textEta}{H} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textEta}{>`H} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textEta}{>'H} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textEta}{>\char126H} +\DeclareTextCompositeCommand{\acctonos}{LGR}{\textEta}{'H} +\DeclareTextCompositeCommand{\accvaria}{LGR}{\textEta}{`H} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{\textIota}{I} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textIota}{>`I} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textIota}{>'I} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textIota}{>\char126I} +\DeclareTextCompositeCommand{\acctonos}{LGR}{\textIota}{'I} +\DeclareTextCompositeCommand{\accvaria}{LGR}{\textIota}{`I} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{\textOmicron}{O} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textOmicron}{>`O} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textOmicron}{>'O} +\DeclareTextCompositeCommand{\acctonos}{LGR}{\textOmicron}{'O} +\DeclareTextCompositeCommand{\accvaria}{LGR}{\textOmicron}{`O} + +\DeclareTextCompositeCommand{\accdasia}{LGR}{\textRho}{W} +\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textOmega}{>`W} +\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textOmega}{>'W} +\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textOmega}{>\char126W} +\DeclareTextCompositeCommand{\acctonos}{LGR}{\textOmega}{'W} +\DeclareTextCompositeCommand{\accvaria}{LGR}{\textOmega}{`W} + +% Except for the dialytika:: + +\DeclareTextComposite{\accdialytika}{LGR}{\textIota}{219} +\DeclareTextComposite{\accdialytika}{LGR}{\textUpsilon}{223} + + +% UPPERCASE +% ~~~~~~~~~ +% +% The `common Greek font encoding definitions`_ in ``greek-fontenc.def`` extend +% the `uclclist` with Greek LICR macros. Here, we add LGR specific "hiatus" +% handling. +% +% Composite commands for Latin transliteration:: + +\DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{A}{\LGR@A@hiatus} +\DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{E}{\LGR@E@hiatus} + +% TODO: What does the \LGR@hiatus command "see" if a Unicode literal follows? +% +% .. code:: latex +% +% % \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{\symbol{"ce}}{bluff} +% % \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{"cf}{blaff} +% % \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{ι}{blaff} +% +% Look ahead and place a diaeresis on Ι or Υ:: + +\DeclareTextCommand{\LGR@A@hiatus}{LGR}{% + \LGR@ifnextchar{I}{A\"}{% + \LGR@ifnextchar{U}{A\"}{% + \LGR@ifnextchar{\textIota}{A\"}{% + \LGR@ifnextchar{\textUpsilon}{A\"}{A}% + }% + }% + }% +} +\DeclareTextCommand{\LGR@E@hiatus}{LGR}{% + \LGR@ifnextchar{I}{E\"}{% + \LGR@ifnextchar{U}{E\"}{% + \LGR@ifnextchar{\textIota}{E\"}{% + \LGR@ifnextchar{\textUpsilon}{E\"}{E}% + }% + }% + }% +} + +% Unfortunately, the lookahead breaks kerning. +% +% Alternatives tried: +% +% * CompositeCommands fail at the end of a macro, e.g. ``\emph{\'a}`` +% +% .. code:: latex +% +% \DeclareTextCommand{\LGR@A@hiatus}{LGR}{A} +% \DeclareTextCommand{\LGR@E@hiatus}{LGR}{E} +% +% \DeclareTextCompositeCommand{\LGR@A@hiatus}{LGR}{}{A} +% \DeclareTextCompositeCommand{\LGR@A@hiatus}{LGR}{I}{A\"I} +% \DeclareTextCompositeCommand{\LGR@A@hiatus}{LGR}{U}{A\"U} +% +% +% * The glyph No 12 is a special "Upcase Alpha" that in ligature with Y +% and I adds a diaresis to them. However, it seems that it has only +% kerning definitions for I and Y (as it is not intended for direct +% use) +% +% .. code:: latex +% +% \DeclareTextComposite{\LGR@hiatus}{LGR}{A}{12} +% +% No such glyph exists for E but this is no problem as E does +% not require kerning anyway. +% +% .. References +% ---------- +% +% .. _README: README.html +% .. _alphabeta: alphabeta.sty.html +% .. _athnum: http://www.ctan.org/pkg/athnum +% .. _Babel: http://www.ctan.org/pkg/babel +% .. _babel patch: http://www.eutypon.gr/eutypon/pdf/e2008-20/e20-a03.pdf +% .. _fntguide: http://mirror.ctan.org/macros/latex/doc/fntguide.pdf +% .. _fontenc: http://www.ctan.org/pkg/fontenc +% .. _hyperref: http://www.ctan.org/pkg/hyperref +% .. _ibycus: http://www.ctan.org/pkg/ibycus-babel +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _lgrx: http://www.ctan.org/pkg/lgrx +% .. _ltxcmds: http://www.ctan.org/pkg/ltxcmds +% .. _teubner: http://www.ctan.org/pkg/teubner +% .. _teubner-doc: +% http://mirror.ctan.org/macros/latex/contrib/teubner/teubner-doc.pdf +% .. _textalpha: textalpha.sty.html +% .. _ucs: http://www.ctan.org/pkg/unicode +% .. _xunicode: http://www.ctan.org/pkg/xunicode +% .. _ltxbugs 4399: +% https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex%2F4399&search= +% diff --git a/language/greek/greek-fontenc/lgrenc.def.html b/language/greek/greek-fontenc/lgrenc.def.html new file mode 100644 index 0000000000..a326fd105a --- /dev/null +++ b/language/greek/greek-fontenc/lgrenc.def.html @@ -0,0 +1,1515 @@ + + + + + +lgrenc.def + + + + + + +
+

lgrenc.def

+

LGR Greek font encoding definitions

+
+ + +
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 LGR font encoding is the de-facto standard for Greek +typesetting with LaTeX. This file provides a comprehensive set +of macros to typeset Greek with LGR encoded fonts. It works for +both, monotonic and polytonic Greek, independent of the babel +package.

+
+ +
+

Changelog

+

Development of this file started under the name “lgrxenc.def” as part of the +lgrx bundle. With version 0.8, it moved to greek-fontenc/lgrx.def.

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

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 +\@uclclist.

0.4

2010-06-15

more text symbols.

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,

+

aliases for puenc.def compatibility.

0.6.1

2013-02-12

\@uclclist entries for PU aliases.

0.7

2013-05-13

documentation update, new accent macros names,

+

\TextGreek renamed to \ensuregreek.

0.8

2013-05-13

rename to lgrenc.def (superseding the babel version),

+

move to greek-fontenc,

+

drop the old (<0.7) internal accent macros names.

0.8.1

2013-05-22

auxiliary macro update@uclc@with@greek,

+

conservative naming: “text” prefix for archaic letters,

+

“LGR@” prefix for internal commands,

+

remove not required alias macros.

0.8.2

2013-05-23

fix name: \textpentehkaton -> \textpentehekaton,

+

fix \textperiodcentered,

+

add composite command for Ῥ (Rho with Dasia).

0.9

2013-07-16

move common definitions to greek-fontenc.def,

+

add composite commands for single quotation marks.

0.11.2

2014-09-04

remove duplicate code.

0.13

2015-08-04

Support for symbol variants.

0.13.1

2015-12-07

Fix rho with dasia bug (Linus Romer).

0.13.3

2019-07-09

Drop error font declaration (cf. ltxbugs 4399).

+
+
+

Usage

+

Load this file by calling fontenc with the LGR option +or indirectly via the babel, textalpha or alphabeta packages.

+
+
Example:
+

Select font encodings T1 (as default) and LGR (for Greek):

+
+

\usepackage[LGR,T1]{fontenc}

+
+
+
+
+
+

Implementation

+
+

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 tests via eTeX’s \ifdefined). However, in this case +no harm is done as the macro is defined by the identification below +anyway.

+
+
% read this file only once
+\@ifundefined{ver@lgrenc.def}
+  {}
+  {\message{LGR font encoding definitions already loaded}
+   \expandafter\endinput % "return"
+  }
+
+
+

Identification

+
\ProvidesFile{lgrenc.def}
+[2019/07/09 v0.13.3 LGR Greek font encoding definitions]
+% Copyright © 2010 Günter Milde
+% This file is part of the "greek-fontenc" package.
+% It 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.
+

You can test the version date using

+
\@ifl@ter {extension}{filename}{date}{YES}{NO}
+

or using ltxcmds\@iffilelater.

+
+
+

Base setup

+

Declare the LGR font encoding and base substitutions:

+
\DeclareFontEncoding{LGR}{}{}
+\DeclareFontSubstitution{LGR}{cmr}{m}{n}
+
+
+

Text symbols

+
+

Greek Alphabet

+

Greek letters are accessible by the Latin transcription, but the mapping is +specific to the LGR font encoding.

+

The LICR macros provide a way to access the symbols independent of the +specific font encoding, in any font encoding supporting Greek. An +alternative Greek font encodings is LGI (ibycus). Greek script is also +supported by the Unicode-based font encodings PU (PDF Unicode used by +hyperref for PDF metadata), TU, EU1 (XeTeX) and EU2 (LuaTeX). The textalpha +package makes these macros available independent of the current font +encoding.

+
\DeclareTextSymbol{\textAlpha}{LGR}{65}
+\DeclareTextSymbol{\textBeta}{LGR}{66}
+\DeclareTextSymbol{\textGamma}{LGR}{71}
+\DeclareTextSymbol{\textDelta}{LGR}{68}
+\DeclareTextSymbol{\textEpsilon}{LGR}{69}
+\DeclareTextSymbol{\textZeta}{LGR}{90}
+\DeclareTextSymbol{\textEta}{LGR}{72}
+\DeclareTextSymbol{\textTheta}{LGR}{74}
+\DeclareTextSymbol{\textIota}{LGR}{73}
+\DeclareTextSymbol{\textKappa}{LGR}{75}
+\DeclareTextSymbol{\textLambda}{LGR}{76}
+\DeclareTextSymbol{\textMu}{LGR}{77}
+\DeclareTextSymbol{\textNu}{LGR}{78}
+\DeclareTextSymbol{\textXi}{LGR}{88}
+\DeclareTextSymbol{\textOmicron}{LGR}{79}
+\DeclareTextSymbol{\textPi}{LGR}{80}
+\DeclareTextSymbol{\textRho}{LGR}{82}
+\DeclareTextSymbol{\textSigma}{LGR}{83}
+\DeclareTextSymbol{\textTau}{LGR}{84}
+\DeclareTextSymbol{\textUpsilon}{LGR}{85}
+\DeclareTextSymbol{\textPhi}{LGR}{70}
+\DeclareTextSymbol{\textChi}{LGR}{81}
+\DeclareTextSymbol{\textPsi}{LGR}{89}
+\DeclareTextSymbol{\textOmega}{LGR}{87}
+%
+\DeclareTextSymbol{\textalpha}{LGR}{97}
+\DeclareTextSymbol{\textbeta}{LGR}{98}
+\DeclareTextSymbol{\textgamma}{LGR}{103}
+\DeclareTextSymbol{\textdelta}{LGR}{100}
+\DeclareTextSymbol{\textepsilon}{LGR}{101}
+\DeclareTextSymbol{\textzeta}{LGR}{122}
+\DeclareTextSymbol{\texteta}{LGR}{104}
+\DeclareTextSymbol{\texttheta}{LGR}{106}
+\DeclareTextSymbol{\textiota}{LGR}{105}
+\DeclareTextSymbol{\textkappa}{LGR}{107}
+\DeclareTextSymbol{\textlambda}{LGR}{108}
+\DeclareTextSymbol{\textmu}{LGR}{109}
+\DeclareTextSymbol{\textnu}{LGR}{110}
+\DeclareTextSymbol{\textxi}{LGR}{120}
+\DeclareTextSymbol{\textomicron}{LGR}{111}
+\DeclareTextSymbol{\textpi}{LGR}{112}
+\DeclareTextSymbol{\textrho}{LGR}{114}
+\DeclareTextCommand{\textsigma}{LGR}{s\noboundary} % σ
+\DeclareTextSymbol{\textvarsigma}{LGR}{99}         % ς final sigma
+\DeclareTextCommand{\textfinalsigma}{LGR}{\textvarsigma} % ς final sigma
+\DeclareTextSymbol{\textautosigma}{LGR}{115}       % σ (ς at end of word)
+\DeclareTextSymbol{\texttau}{LGR}{116}
+\DeclareTextSymbol{\textupsilon}{LGR}{117}
+\DeclareTextSymbol{\textphi}{LGR}{102}
+\DeclareTextSymbol{\textchi}{LGR}{113}
+\DeclareTextSymbol{\textpsi}{LGR}{121}
+\DeclareTextSymbol{\textomega}{LGR}{119}
+
+
+

Additional Greek symbols

+
+

Ancient Greek Numbers (Athenian Numerals)

+

Names from ucs (ucsencs.def) +(In ucs, five hundred is (wrongly?) named textpentehkaton.)

+
\DeclareTextSymbol{\textpentedeka}{LGR}{2}    % GREEK ACROPHONIC ATTIC FIFTY
+\DeclareTextSymbol{\textpentehekaton}{LGR}{3} % GREEK ACROPHONIC ATTIC FIVE HUNDRED
+\DeclareTextSymbol{\textpenteqilioi}{LGR}{4}  % GREEK ACROPHONIC ATTIC FIVE THOUSAND
+\DeclareTextSymbol{\textpentemuria}{LGR}{5}  % GREEK ACROPHONIC ATTIC FIFTY THOUSAND
+
+
+

Archaic letters

+

Names after teubner and ucs:

+
\DeclareTextSymbol{\textstigma}{LGR}{6}       % ϛ
+\DeclareTextSymbol{\textvarstigma}{LGR}{7}    % stigma variant (CB.enc, teubner)
+\DeclareTextSymbol{\textkoppa}{LGR}{18}       % ϟ (greek small letter koppa)
+\DeclareTextSymbol{\textqoppa}{LGR}{19}       % ϙ (archaic koppa)
+\DeclareTextSymbol{\textQoppa}{LGR}{21}       % Ϙ (archaic Koppa)
+\DeclareTextSymbol{\textStigma}{LGR}{22}      % Ϛ in some fonts ϹΤ ligature
+\DeclareTextSymbol{\textSampi}{LGR}{23}       % Ϡ
+\DeclareTextSymbol{\textsampi}{LGR}{27}       % ϡ
+\DeclareTextSymbol{\textanoteleia}{LGR}{38}   % ·
+\DeclareTextSymbol{\texterotimatiko}{LGR}{63} % ;
+\DeclareTextSymbol{\textdigamma}{LGR}{147}    % ϝ (ucs) \digamma used by amsmath for math-macro
+\DeclareTextSymbol{\textDigamma}{LGR}{195}    % Ϝ (ucs)
+
+
+

Numeral signs

+

See also http://en.wikipedia.org/wiki/Greek_numerals

+

Names from ucs:

+
\DeclareTextSymbol{\textdexiakeraia}{LGR}{254}      % ʹ (Dexia keraia)
+\DeclareTextSymbol{\textaristerikeraia}{LGR}{255}   % ͵ (Aristeri keraia)
+
+
+

variant symbols

+

Mathematical notation distinguishes variant shapes for pi, phi, rho, theta +(small and capital), beta, and kappa (characters for the latter three +symbols are not included in TeX’s math fonts). These variations have no +syntactic meaning in Greek text and are not given code-points in the LGR +encoding. Greek text fonts use the shape variants interchangeabely.

+

However, as Unicode defines separate code points for the symbol variants, we +provide fallback LICR macros with detailed error reporting:

+
\providecommand*{\LGR@TextSymbolUnavailable}[1]{%
+  \PackageError{greek-fontenc}{character \string#1 not available \MessageBreak
+    in 8-bit TeX}
+    {Use XeTeX/LuaTeX if you need to distinguish the symbol from the letter.\MessageBreak
+     The package `textalpha' with `normalize-symbols' maps the GREEK SYMBOL\MessageBreak
+     character to the corresponding GREEK LETTER.\MessageBreak
+     Press <return> to proceed (dropping the symbol from the document).}
+}
+
+\providecommand*{\LGR@TextSymbolOnlyMath}[2]{%
+  \PackageError{greek-fontenc}{character \string#1 not available in text mode}
+    {Use #2 or XeTeX/LuaTeX if you need to distinguish\MessageBreak
+     the symbol from the letter.\MessageBreak
+     The package `textalpha' with `normalize-symbols' maps the GREEK SYMBOL\MessageBreak
+     character to the corresponding GREEK LETTER.\MessageBreak
+     Press <return> to proceed (dropping the symbol from the document).}
+}
+
+\ProvideTextCommand{\textbetasymbol} {LGR}{\LGR@TextSymbolUnavailable{ϐ beta symbol}}
+\ProvideTextCommand{\textkappasymbol}{LGR}{\LGR@TextSymbolUnavailable{ϰ kappa symbol}}
+\ProvideTextCommand{\textThetasymbol}{LGR}{\LGR@TextSymbolUnavailable{ϴ Theta symbol}}
+
+\ProvideTextCommand{\textthetasymbol}  {LGR}{\LGR@TextSymbolOnlyMath{ϑ theta symbol}{$\vartheta$}}
+\ProvideTextCommand{\textphisymbol}    {LGR}{\LGR@TextSymbolOnlyMath{ϕ phi symbol}{$\phi$}}
+\ProvideTextCommand{\textpisymbol}     {LGR}{\LGR@TextSymbolOnlyMath{ϖ pi symbol}{$\varpi$}}
+\ProvideTextCommand{\textrhosymbol}    {LGR}{\LGR@TextSymbolOnlyMath{ϱ rho symbol}{$\varrho$}}
+\ProvideTextCommand{\textepsilonsymbol}{LGR}{\LGR@TextSymbolOnlyMath{ϵ lunate epsilon symbol}{$\epsilon$}}
+
+
+
+

Other

+

Characters that also exist in other font encodings:

+
    +
  • define them for LGR if there is a matching glyph,

  • +
  • use established macro names that match with other *enc.def files and +textcomp.sty.

  • +
+

All encodings: See usrguide.pdf, chapter 3.14 ff:

+
\DeclareTextSymbol{\textendash}{LGR}{0}          % EN DASH
+\DeclareTextSymbol{\textquoteleft}{LGR}{28}      % ‘
+\DeclareTextSymbol{\textquoteright}{LGR}{29}     % ’
+\DeclareTextSymbol{\textperiodcentered}{LGR}{38} % · = \textanoteleia
+\DeclareTextSymbol{\textcompwordmark}{LGR}{118}  % ZERO WIDTH NO JOINER
+\DeclareTextSymbol{\textemdash}{LGR}{127}        % EM DASH
+

T1:

+
\DeclareTextSymbol{\guillemotleft}{LGR}{123}     % «
+\DeclareTextSymbol{\guillemotright}{LGR}{125}    % »
+

TS1:

+
\ProvideTextCommand{\textasciibreve}{LGR}{\char30\textcompwordmark}  % ˘
+\ProvideTextCommand{\textasciimacron}{LGR}{\char31\textcompwordmark} % ¯
+\ProvideTextCommand{\textasciidieresis}{LGR}{"\textcompwordmark}     % "
+\ProvideTextCommand{\textasciiacute}{LGR}{'\textcompwordmark}        % '
+\ProvideTextCommand{\textasciigrave}{LGR}{`\textcompwordmark}        % `
+\DeclareTextCommand{\textasciitilde}{LGR}{\char126\textcompwordmark} % ~
+\DeclareTextSymbol{\textohm}{LGR}{87}            % Ω (Ohm sign -> Omega)
+\DeclareTextSymbol{\texteuro}{LGR}{24}           % € \euro in greek.ldf
+\DeclareTextSymbol{\textpercent}{LGR}{37}        % %
+\DeclareTextSymbol{\textperthousand}{LGR}{25}    % ‰ \permill in greek.ldf
+

T3 (tipa):

+
\DeclareTextSymbol{\textschwa}{LGR}{26}          % ə
+

T3 also defines some greek letters as well as Latin characters with Greek +names:

+

According to the Unicode standard, the following IPA characters are identic +to the Greek letters:

+
    +
  • 03B2 greek small letter beta

  • +
  • 03B8 greek small letter theta

  • +
  • 03BB greek small letter lamda

  • +
  • 03C7 greek small letter chi

  • +
+

The following characters in the IPA block refer to Greek letters:

+
    +
  • 0251 LATIN SMALL LETTER ALPHA → greek small letter alpha - 03B1

  • +
  • 025B LATIN SMALL LETTER OPEN E = epsilon → greek small letter epsilon - 03B5

  • +
  • 0263 LATIN SMALL LETTER GAMMA → greek small letter gamma - 03B3

  • +
  • 0269 LATIN SMALL LETTER IOTA → greek small letter iota - 03B9

  • +
  • 0278 LATIN SMALL LETTER PHI → greek small letter phi - 03C6

  • +
  • 028A LATIN SMALL LETTER UPSILON → greek small letter upsilon - 03C5

  • +
+

tipa uses the macro names \textepsilon, \textgamma, \textiota, +\textphi, and \textupsilon for the Latin characters. This is no +problem with 8-bit fonts (set the font encoding to T3 vs. LGR to +disambiguate), but leads to ambiguity with Unicode fonts. xunicode uses the +gr infix and alias names to disambiguate:

+
    +
  • 03B3 \textgrgamma

  • +
  • 03B9 \textgriota

  • +
  • 03C6 \textgrphi (see x0278 )

  • +
+

but not for epsilon and upsilon (03C2 \textgrsigma is the final sigma).

+

It also assigns alias names to the Latin counterparts, however not on a +systematical basis:

+
    +
  • 0194 \textGammaafrican

  • +
  • 0196 \textIotaafrican

  • +
  • 0251 \textscripta

  • +
  • 025B \texteopen

  • +
  • 0263 \textbabygamma, \textgammalatinsmall

  • +
  • 0269 \textiotalatin

  • +
  • 028A \textscupsilon % TIPA-U

  • +
+
+
+

Not implemented

+

The characters at position 16 and 17 are used in the \nexus macro +of the teubner package to form an extensible, hat-like bracket. In +CB.enc, they are mapped to

+
+

16–MODIFIER LETTER LOW ACUTE ACCENT +17–MODIFIER LETTER LOW GRAVE ACCENT

+
+

but according to the documentation of Werner Lemberg’s babel patch, +they rather represent the left and right part of U+23E0 TOP TORTOISE +SHELL BRACKET.

+

Babel’s lgrenc.def has some definitions to prevent surprises with +macros that expect a Latin script. These definitions are problematic in a +font-encoding definition file as they require \textlatin which is +defined in babel.def. They were moved to greek.ldf.

+
+
+
+

Diacritics

+

This section defines named macros for Greek diacritics and standard +symbol macros as alias for simple diacritics. Convenient input +conventions for composite diacritics are defined as composite +definitions.

+

Advantages:

+
    +
  • input convention similar to LGR input encodings (just prepend a \).

  • +
  • Access pre-composed characters without resorting to the +ligature mechanism (allows proper kerning, cf. teubner-doc).

  • +
  • Named macros can be used to ensure a font encoding supporting Greek is +used. However, substitution with pre-composed characters works only for +the active font encoding (cf. textalpha). Named accent macros can also be +used instead of the \@tabacckludge by to-LaTeX converters to ensure +working also inside the tabbing environment.

  • +
  • Named macros are required for upcasing according to Greek typesetting +conventions (cf. UPPERCASE below) and for composite diacritics.

  • +
+
+

Named macros

+

Definitions are based on the teubner package by Claudio Beccari, the ucs +package, and the babel patch by Werner Lemberg. Names are derived from +the Unicode name with the prefix “acc” (cf. How to name accent macros? +in the README) reducing the probability of incompatibilities compared to the +two-letter teubner diacritic macros or the “text” prefix used by ucs.

+

Simple Greek diacritics:

+
\DeclareTextAccent{\accdialytika}{LGR}{34} % διαλυτικά (diaeresis/trema)
+\DeclareTextAccent{\acctonos}{LGR}{39} % τόνος/ὀξεῖα tonos/oxia (acute)
+\DeclareTextAccent{\accdasia}{LGR}{60} % δασεῖα spiritus asper (rough breathing)
+\DeclareTextAccent{\accpsili}{LGR}{62} % ψιλή spiritus lenis (smooth breathing)
+\DeclareTextAccent{\accvaria}{LGR}{96} % βαρεῖα (grave)
+\DeclareTextAccent{\accperispomeni}{LGR}{126} % περισπωμένη (circonflex/tilde)
+

The sub-iota is input after the base character. In LGR fonts, ligatures are +defined for pre-composed characters, the postfix ligature does not interfere +with kerning:

+
\DeclareTextSymbol{\prosgegrammeni}{LGR}{8}  % ι "capital" sub-iota
+\DeclareTextSymbol{\ypogegrammeni}{LGR}{124} % ͺ "small" sub-iota
+

Composite diacritics:

+
%                                                       Teubner name
+\DeclareTextAccent{\accdialytikaperispomeni}{LGR}{32} % Cd
+\DeclareTextAccent{\accdialytikatonos}{LGR}{35}       % Ad
+\DeclareTextAccent{\accdialytikavaria}{LGR}{36}       % Gd
+
+\DeclareTextAccent{\accdasiaperispomeni}{LGR}{64}     % Cr
+\DeclareTextAccent{\accdasiavaria}{LGR}{67}           % Gr
+\DeclareTextAccent{\accdasiaoxia}{LGR}{86}            % Ar
+
+\DeclareTextAccent{\accpsiliperispomeni}{LGR}{92}     % Cs
+\DeclareTextAccent{\accpsilioxia}{LGR}{94}            % As
+\DeclareTextAccent{\accpsilivaria}{LGR}{95}           % Gs
+

For classical Greek and linguistics, the LGR font encoding contains a number +of additional diacritic symbols:

+
\DeclareTextAccent{\accinvertedbrevebelow}{LGR}{1} % INVERTED BREVE BELOW
+\DeclareTextAccent{\textsubarch}{LGR}{1}      % (tipa)
+\DeclareTextAccent{\accbrevebelow}{LGR}{20}   % BREVE BELOW
+\DeclareTextAccent{\u}{LGR}{30}               % BREVE (Greek vrachy)
+\DeclareTextAccent{\=}{LGR}{31}               % MACRON
+
+
+

Aliases

+

The standard symbol macros are exclusively used for Greek diacritics +in LGR:

+
\DeclareTextCommand{\"}{LGR}{\accdialytika}
+\DeclareTextCommand{\'}{LGR}{\acctonos}
+\DeclareTextCommand{\`}{LGR}{\accvaria}
+\DeclareTextCommand{\~}{LGR}{\accperispomeni}
+
+
+
+

Common Greek font encoding definitions

+

The file greek-fontenc.def contains font encoding definitions that are +shared by font encodings providing Greek characters:

+
\input{greek-fontenc.def}
+
+
+

Composite definitions

+
+

Composite diacritics

+

Composite accents can be input as sequence of simple diacritics (in +arbitrary order) via named macro, symbol macro and “transcription +characters”, e.g. \accdialytica\accvaria\textalpha, \"\'\textalpha, +\"'\textalpha, or \'"\textalpha.

+

The actual declarations are part of the common Greek font encoding +definitions.

+
+
+

Pre-composed letters

+
+

Small letters with diacritics

+

(from teubner with changed names of the composite accents):

+
\DeclareTextComposite{\accvaria}{LGR}{a}{128}
+\DeclareTextComposite{\accdasia}{LGR}{a}{129}
+\DeclareTextComposite{\accpsili}{LGR}{a}{130}
+\DeclareTextComposite{\accdasiavaria}{LGR}{a}{131}
+\DeclareTextComposite{\acctonos}{LGR}{a}{136}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{a}{137}
+\DeclareTextComposite{\accpsilioxia}{LGR}{a}{138}
+\DeclareTextComposite{\accpsilivaria}{LGR}{a}{139}
+\DeclareTextComposite{\accperispomeni}{LGR}{a}{144}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{a}{145}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{a}{146}
+\DeclareTextComposite{\accvaria}{LGR}{h}{152}
+\DeclareTextComposite{\accdasia}{LGR}{h}{153}
+\DeclareTextComposite{\accpsili}{LGR}{h}{154}
+\DeclareTextComposite{\acctonos}{LGR}{h}{160}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{h}{161}
+\DeclareTextComposite{\accpsilioxia}{LGR}{h}{162}
+\DeclareTextComposite{\accdasiavaria}{LGR}{h}{163}
+\DeclareTextComposite{\accperispomeni}{LGR}{h}{168}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{h}{169}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{h}{170}
+\DeclareTextComposite{\accpsilivaria}{LGR}{h}{171}
+\DeclareTextComposite{\accvaria}{LGR}{w}{176}
+\DeclareTextComposite{\accdasia}{LGR}{w}{177}
+\DeclareTextComposite{\accpsili}{LGR}{w}{178}
+\DeclareTextComposite{\accdasiavaria}{LGR}{w}{179}
+\DeclareTextComposite{\acctonos}{LGR}{w}{184}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{w}{185}
+\DeclareTextComposite{\accpsilioxia}{LGR}{w}{186}
+\DeclareTextComposite{\accpsilivaria}{LGR}{w}{187}
+\DeclareTextComposite{\accperispomeni}{LGR}{w}{192}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{w}{193}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{w}{194}
+\DeclareTextComposite{\accvaria}{LGR}{i}{200}
+\DeclareTextComposite{\accdasia}{LGR}{i}{201}
+\DeclareTextComposite{\accpsili}{LGR}{i}{202}
+\DeclareTextComposite{\accdasiavaria}{LGR}{i}{203}
+\DeclareTextComposite{\acctonos}{LGR}{i}{208}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{i}{209}
+\DeclareTextComposite{\accpsilioxia}{LGR}{i}{210}
+\DeclareTextComposite{\accpsilivaria}{LGR}{i}{211}
+\DeclareTextComposite{\accperispomeni}{LGR}{i}{216}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{i}{217}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{i}{218}
+\DeclareTextComposite{\accdialytika}{LGR}{i}{240}
+\DeclareTextComposite{\accdialytikavaria}{LGR}{i}{241}
+\DeclareTextComposite{\accdialytikatonos}{LGR}{i}{242}
+\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{i}{243}
+\DeclareTextComposite{\accvaria}{LGR}{u}{204}
+\DeclareTextComposite{\accdasia}{LGR}{u}{205}
+\DeclareTextComposite{\accpsili}{LGR}{u}{206}
+\DeclareTextComposite{\accdasiavaria}{LGR}{u}{207}
+\DeclareTextComposite{\acctonos}{LGR}{u}{212}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{u}{213}
+\DeclareTextComposite{\accpsilioxia}{LGR}{u}{214}
+\DeclareTextComposite{\accpsilivaria}{LGR}{u}{215}
+\DeclareTextComposite{\accperispomeni}{LGR}{u}{220}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{u}{221}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{u}{222}
+\DeclareTextComposite{\accdialytika}{LGR}{u}{244}
+\DeclareTextComposite{\accdialytikavaria}{LGR}{u}{245}
+\DeclareTextComposite{\accdialytikatonos}{LGR}{u}{246}
+\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{u}{247}
+\DeclareTextComposite{\accvaria}{LGR}{e}{224}
+\DeclareTextComposite{\accdasia}{LGR}{e}{225}
+\DeclareTextComposite{\accpsili}{LGR}{e}{226}
+\DeclareTextComposite{\accdasiavaria}{LGR}{e}{227}
+\DeclareTextComposite{\acctonos}{LGR}{e}{232}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{e}{233}
+\DeclareTextComposite{\accpsilioxia}{LGR}{e}{234}
+\DeclareTextComposite{\accpsilivaria}{LGR}{e}{235}
+\DeclareTextComposite{\accvaria}{LGR}{o}{228}
+\DeclareTextComposite{\accdasia}{LGR}{o}{229}
+\DeclareTextComposite{\accpsili}{LGR}{o}{230}
+\DeclareTextComposite{\accdasiavaria}{LGR}{o}{231}
+\DeclareTextComposite{\acctonos}{LGR}{o}{236}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{o}{237}
+\DeclareTextComposite{\accpsilioxia}{LGR}{o}{238}
+\DeclareTextComposite{\accpsilivaria}{LGR}{o}{239}
+\DeclareTextComposite{\accdasia}{LGR}{r}{251}
+\DeclareTextComposite{\accpsili}{LGR}{r}{252}
+

Pre-composed letters with diacritics + LICR macros:

+
\DeclareTextComposite{\accvaria}{LGR}{\textalpha}{128}
+\DeclareTextComposite{\accdasia}{LGR}{\textalpha}{129}
+\DeclareTextComposite{\accpsili}{LGR}{\textalpha}{130}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\textalpha}{131}
+\DeclareTextComposite{\acctonos}{LGR}{\textalpha}{136}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\textalpha}{137}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\textalpha}{138}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\textalpha}{139}
+\DeclareTextComposite{\accperispomeni}{LGR}{\textalpha}{144}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textalpha}{145}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textalpha}{146}
+\DeclareTextComposite{\accvaria}{LGR}{\texteta}{152}
+\DeclareTextComposite{\accdasia}{LGR}{\texteta}{153}
+\DeclareTextComposite{\accpsili}{LGR}{\texteta}{154}
+\DeclareTextComposite{\acctonos}{LGR}{\texteta}{160}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\texteta}{161}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\texteta}{162}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\texteta}{163}
+\DeclareTextComposite{\accperispomeni}{LGR}{\texteta}{168}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\texteta}{169}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\texteta}{170}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\texteta}{171}
+\DeclareTextComposite{\accvaria}{LGR}{\textomega}{176}
+\DeclareTextComposite{\accdasia}{LGR}{\textomega}{177}
+\DeclareTextComposite{\accpsili}{LGR}{\textomega}{178}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\textomega}{179}
+\DeclareTextComposite{\acctonos}{LGR}{\textomega}{184}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\textomega}{185}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\textomega}{186}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\textomega}{187}
+\DeclareTextComposite{\accperispomeni}{LGR}{\textomega}{192}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textomega}{193}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textomega}{194}
+\DeclareTextComposite{\accvaria}{LGR}{\textiota}{200}
+\DeclareTextComposite{\accdasia}{LGR}{\textiota}{201}
+\DeclareTextComposite{\accpsili}{LGR}{\textiota}{202}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\textiota}{203}
+\DeclareTextComposite{\acctonos}{LGR}{\textiota}{208}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\textiota}{209}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\textiota}{210}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\textiota}{211}
+\DeclareTextComposite{\accperispomeni}{LGR}{\textiota}{216}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textiota}{217}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textiota}{218}
+\DeclareTextComposite{\accdialytika}{LGR}{\textiota}{240}
+\DeclareTextComposite{\accdialytikavaria}{LGR}{\textiota}{241}
+\DeclareTextComposite{\accdialytikatonos}{LGR}{\textiota}{242}
+\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\textiota}{243}
+\DeclareTextComposite{\accvaria}{LGR}{\textupsilon}{204}
+\DeclareTextComposite{\accdasia}{LGR}{\textupsilon}{205}
+\DeclareTextComposite{\accpsili}{LGR}{\textupsilon}{206}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\textupsilon}{207}
+\DeclareTextComposite{\acctonos}{LGR}{\textupsilon}{212}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\textupsilon}{213}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\textupsilon}{214}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\textupsilon}{215}
+\DeclareTextComposite{\accperispomeni}{LGR}{\textupsilon}{220}
+\DeclareTextComposite{\accdasiaperispomeni}{LGR}{\textupsilon}{221}
+\DeclareTextComposite{\accpsiliperispomeni}{LGR}{\textupsilon}{222}
+\DeclareTextComposite{\accdialytika}{LGR}{\textupsilon}{244}
+\DeclareTextComposite{\accdialytikavaria}{LGR}{\textupsilon}{245}
+\DeclareTextComposite{\accdialytikatonos}{LGR}{\textupsilon}{246}
+\DeclareTextComposite{\accdialytikaperispomeni}{LGR}{\textupsilon}{247}
+\DeclareTextComposite{\accvaria}{LGR}{\textepsilon}{224}
+\DeclareTextComposite{\accdasia}{LGR}{\textepsilon}{225}
+\DeclareTextComposite{\accpsili}{LGR}{\textepsilon}{226}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\textepsilon}{227}
+\DeclareTextComposite{\acctonos}{LGR}{\textepsilon}{232}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\textepsilon}{233}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\textepsilon}{234}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\textepsilon}{235}
+\DeclareTextComposite{\accvaria}{LGR}{\textomicron}{228}
+\DeclareTextComposite{\accdasia}{LGR}{\textomicron}{229}
+\DeclareTextComposite{\accpsili}{LGR}{\textomicron}{230}
+\DeclareTextComposite{\accdasiavaria}{LGR}{\textomicron}{231}
+\DeclareTextComposite{\acctonos}{LGR}{\textomicron}{236}
+\DeclareTextComposite{\accdasiaoxia}{LGR}{\textomicron}{237}
+\DeclareTextComposite{\accpsilioxia}{LGR}{\textomicron}{238}
+\DeclareTextComposite{\accpsilivaria}{LGR}{\textomicron}{239}
+\DeclareTextComposite{\accdasia}{LGR}{\textrho}{251}
+\DeclareTextComposite{\accpsili}{LGR}{\textrho}{252}
+
+
+

Capital letters with diacritics

+
+

In Greek, diacritics are omitted in all-uppercase words, but kept as part +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)

+

http://en.wikipedia.org/wiki/Capitalization

+
+

In Title Case, place diacritics before instead of above the base character:

+
\DeclareTextCompositeCommand{\accdasia}{LGR}{A}{<A}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{A}{<`A}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{A}{<'A}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{A}{<\char126A}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{A}{>A}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{A}{>`A}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{A}{>'A}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{A}{>\char126A}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{A}{'A}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{A}{`A}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{E}{<E}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{E}{<'E}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{E}{<`E}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{E}{>E}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{E}{>'E}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{E}{>`E}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{E}{'E}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{E}{`E}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{H}{<H}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{H}{<`H}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{H}{<'H}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{H}{<\char126H}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{H}{>H}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{H}{>`H}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{H}{>'H}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{H}{>\char126H}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{H}{'H}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{H}{`H}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{I}{<I}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{I}{<`I}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{I}{<'I}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{I}{<\char126I}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{I}{>I}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{I}{>`I}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{I}{>'I}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{I}{>\char126I}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{I}{'I}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{I}{`I}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{O}{<O}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{O}{<`O}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{O}{<'O}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{O}{>O}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{O}{>`O}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{O}{>'O}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{O}{'O}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{O}{`O}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{R}{<R}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{U}{<U}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{U}{<`U}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{U}{<'U}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{U}{<\char126U}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{U}{'U}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{U}{`U}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{W}{<W}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{W}{<`W}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{W}{<'W}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{W}{<\char126W}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{W}{>W}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{W}{>`W}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{W}{>'W}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{W}{>\char126W}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{W}{'W}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{W}{`W}
+

Except for the dialytika:

+
\DeclareTextComposite{\accdialytika}{LGR}{I}{219}
+\DeclareTextComposite{\accdialytika}{LGR}{U}{223}
+

Do the same for the LICR macros:

+
\DeclareTextCompositeCommand{\accdasia}{LGR}{\textAlpha}{<A}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textAlpha}{<`A}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textAlpha}{<'A}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\textAlpha}{<\char126A}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\textAlpha}{>A}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textAlpha}{>`A}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textAlpha}{>'A}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textAlpha}{>\char126A}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textAlpha}{'A}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textAlpha}{`A}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textEpsilon}{<E}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textEpsilon}{<'E}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textEpsilon}{<`E}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\textEpsilon}{>E}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textEpsilon}{>'E}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textEpsilon}{>`E}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textEpsilon}{'E}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textEpsilon}{`E}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textEta}{<H}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textEta}{<`H}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textEta}{<'H}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\textEta}{<\char126H}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\textEta}{>H}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textEta}{>`H}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textEta}{>'H}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textEta}{>\char126H}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textEta}{'H}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textEta}{`H}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textIota}{<I}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textIota}{<`I}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textIota}{<'I}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\textIota}{<\char126I}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\textIota}{>I}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textIota}{>`I}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textIota}{>'I}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textIota}{>\char126I}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textIota}{'I}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textIota}{`I}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textOmicron}{<O}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textOmicron}{<`O}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textOmicron}{<'O}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\textOmicron}{>O}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textOmicron}{>`O}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textOmicron}{>'O}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textOmicron}{'O}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textOmicron}{`O}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textRho}{<R}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textUpsilon}{<U}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textUpsilon}{<`U}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textUpsilon}{<'U}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\textUpsilon}{<\char126U}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textUpsilon}{'U}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textUpsilon}{`U}
+
+\DeclareTextCompositeCommand{\accdasia}{LGR}{\textOmega}{<W}
+\DeclareTextCompositeCommand{\accdasiavaria}{LGR}{\textOmega}{<`W}
+\DeclareTextCompositeCommand{\accdasiaoxia}{LGR}{\textOmega}{<'W}
+\DeclareTextCompositeCommand{\accdasiaperispomeni}{LGR}{\textOmega}{<\char126W}
+\DeclareTextCompositeCommand{\accpsili}{LGR}{\textOmega}{>W}
+\DeclareTextCompositeCommand{\accpsilivaria}{LGR}{\textOmega}{>`W}
+\DeclareTextCompositeCommand{\accpsilioxia}{LGR}{\textOmega}{>'W}
+\DeclareTextCompositeCommand{\accpsiliperispomeni}{LGR}{\textOmega}{>\char126W}
+\DeclareTextCompositeCommand{\acctonos}{LGR}{\textOmega}{'W}
+\DeclareTextCompositeCommand{\accvaria}{LGR}{\textOmega}{`W}
+

Except for the dialytika:

+
\DeclareTextComposite{\accdialytika}{LGR}{\textIota}{219}
+\DeclareTextComposite{\accdialytika}{LGR}{\textUpsilon}{223}
+
+
+
+
+

UPPERCASE

+

The common Greek font encoding definitions in greek-fontenc.def extend +the uclclist with Greek LICR macros. Here, we add LGR specific “hiatus” +handling.

+

Composite commands for Latin transliteration:

+
\DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{A}{\LGR@A@hiatus}
+\DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{E}{\LGR@E@hiatus}
+

TODO: What does the LGR@hiatus command “see” if a Unicode literal follows?

+
% \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{\symbol{"ce}}{bluff}
+% \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{"cf}{blaff}
+% \DeclareTextCompositeCommand{\LGR@hiatus}{LGR}{ι}{blaff}
+

Look ahead and place a diaeresis on Ι or Υ:

+
\DeclareTextCommand{\LGR@A@hiatus}{LGR}{%
+  \LGR@ifnextchar{I}{A\"}{%
+    \LGR@ifnextchar{U}{A\"}{%
+      \LGR@ifnextchar{\textIota}{A\"}{%
+        \LGR@ifnextchar{\textUpsilon}{A\"}{A}%
+      }%
+    }%
+  }%
+}
+\DeclareTextCommand{\LGR@E@hiatus}{LGR}{%
+  \LGR@ifnextchar{I}{E\"}{%
+    \LGR@ifnextchar{U}{E\"}{%
+      \LGR@ifnextchar{\textIota}{E\"}{%
+        \LGR@ifnextchar{\textUpsilon}{E\"}{E}%
+      }%
+    }%
+  }%
+}
+

Unfortunately, the lookahead breaks kerning.

+

Alternatives tried:

+
    +
  • CompositeCommands fail at the end of a macro, e.g. \emph{\'a}

    +
    \DeclareTextCommand{\LGR@A@hiatus}{LGR}{A}
    +\DeclareTextCommand{\LGR@E@hiatus}{LGR}{E}
    +
    +\DeclareTextCompositeCommand{\LGR@A@hiatus}{LGR}{}{A}
    +\DeclareTextCompositeCommand{\LGR@A@hiatus}{LGR}{I}{A\"I}
    +\DeclareTextCompositeCommand{\LGR@A@hiatus}{LGR}{U}{A\"U}
    +
  • +
  • The glyph No 12 is a special “Upcase Alpha” that in ligature with Y +and I adds a diaresis to them. However, it seems that it has only +kerning definitions for I and Y (as it is not intended for direct +use)

    +
    \DeclareTextComposite{\LGR@hiatus}{LGR}{A}{12}
    +

    No such glyph exists for E but this is no problem as E does +not require kerning anyway.

    +
  • +
+ +
+
+
+ + diff --git a/language/greek/greek-fontenc/test-active-semicolon.pdf b/language/greek/greek-fontenc/test-active-semicolon.pdf new file mode 100644 index 0000000000..2581d974e1 Binary files /dev/null and b/language/greek/greek-fontenc/test-active-semicolon.pdf differ diff --git a/language/greek/greek-fontenc/test-nameclashes.pdf b/language/greek/greek-fontenc/test-nameclashes.pdf new file mode 100644 index 0000000000..e7ef112d3b Binary files /dev/null and b/language/greek/greek-fontenc/test-nameclashes.pdf differ diff --git a/language/greek/greek-fontenc/textalpha-doc.pdf b/language/greek/greek-fontenc/textalpha-doc.pdf new file mode 100644 index 0000000000..4f935bd555 Binary files /dev/null and b/language/greek/greek-fontenc/textalpha-doc.pdf differ diff --git a/language/greek/greek-fontenc/textalpha-doc.tex b/language/greek/greek-fontenc/textalpha-doc.tex new file mode 100644 index 0000000000..099bbc94cd --- /dev/null +++ b/language/greek/greek-fontenc/textalpha-doc.tex @@ -0,0 +1,368 @@ +\documentclass{article} +\usepackage{parskip} +\usepackage{booktabs} + +\usepackage{lmodern} +\usepackage{textcomp} +\usepackage[LGR,T1]{fontenc} + +% UTF8 input encoding for pdfTeX or LuaTeX in 8-bit compatibility mode: +% (XeTeX in compatibility mode would require xetex-inputenc.sty, which is not +% at CTAN but on https://github.com/wspr/xetex-inputenc) +\usepackage[utf8]{luainputenc} + +\usepackage[pdfencoding=auto,colorlinks=true]{hyperref} +\usepackage{bookmark} +% hyperrefs PU encoding supports Greek LICR macros +\DeclareTextCommand{\ensuregreek}{PU}[1]{#1} + +\usepackage[normalize-symbols] % comment option out to test error reporting + {textalpha} + +\begin{document} + +\title{The \emph{textalpha} package} +\author{Günter Milde} +\maketitle + +Standard 8-bit TeX fonts do not support the Greek script. If Greek +characters shall be used with 8-bit TeX, setup of a Greek text font and an +explcit font-encoding switch is required. + +With the \emph{textalpha} package, you can easily write a single Greek +symbol (like \textPsi{} or \textmu{}) or a +\textlambda\textomicron\textgamma\textomicron\textvarsigma{} in non-Greek +text as well as ISO-conforming formulas with upright constants (like +\textpi): $A = \mbox{\textpi} r^2$ vs. $A = \pi r^2$. Input is possible via +LICR macros (\verb|\textalpha| \ldots \verb|\textOmega|) +or Unicode literals\footnote{% +Requires \emph{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}} +and the utf8 option or XeTeX/LuaTeX.}. + +\tableofcontents + +\section{Usage} + +Load this package in the preamble of your document with +\begin{verbatim} + \usepackage{textalpha} +\end{verbatim} +If it is loaded after the setup of Unicode fonts with +\href{http://www.ctan.org/pkg/fontspec}{\emph{fontspec}} package under +LuaTeX and XeTeX, it provides a compatible interface for Greek in text mode. + +If you want to merge symbol variants, use the +\texttt{normalize-symbols} option:% +\footnote{This option is ignored with Unicode fonts.} +\begin{verbatim} + \usepackage[normalize-symbols]{textalpha} +\end{verbatim} + +See the source of this document \url{textalpha-doc.tex} for a setup and +usage example, the literate source of the package +\href{textalpha.sty.html}{textalpha.sty} for the implementation, and +\emph{Font setup for Greek with XeTeX/LuaTeX} +(\href{euenc-doc.pdf}{euenc-doc.pdf}) for special feature under XeTeX/LuaTeX. + + +\subsection{option \texttt{normalize-symbols}} + +This option is ignored with Unicode fonts. + +Mathematical notation uses variant shapes of some Greek letters as +additional symbols. There are separate code points for the symbol variants +in Unicode but not in the LGR font encoding used for Greek in 8-bit TeX. +TeX supports some of the variant shape symbols in mathematical mode +($\theta|\vartheta, \phi|\varphi, \pi|\varpi, \rho|\varrho, +\epsilon|\varepsilon$). + +The variations have no syntactic meaning in Greek text and text fonts may +use the variant shapes in place of the “regular” ones as a stylistic choice. +However, some Greek texts in Unicode encoding use these GREEK +... SYMBOL characters in place of the corresponding GREEK LETTER ... +characters. + +The \texttt{normalize-symbols} option merges letters and symbols to Greek +letters. This way, text copied from external sources can be compiled without +errors even if it contains GREEK SYMBOL characters in place of GREEK LETTERS: +\begin{quote} + This text uses both variants for beta (β|ϐ), theta (θ|ϑ), phi (φ|ϕ), pi + (π|ϖ), kappa (κ|ϰ), rho (ρ|ϱ), Theta (Θ|ϴ), and epsilon (ε|ϵ) in the LaTeX + source. +\end{quote} + +\textbf{Attention}: Do not use this option in cases where the distinction +between the symbol variants may be important (e.g. in a mathematical or +scientific context). Try the \emph{alphabeta} package with the +respective characters in math mode or use XeTeX/LuaTeX with Unicode fonts in +these cases. + +\section{Limitations} + +Because the internal font encoding switch interferes with other work behind +the scenes, kerning, diacritics and up/down-casing show problems if Greek +letters are used without explicit change of the font encoding. + +These problems can be avoided by use of \emph{babel} and the correct +language setting (greek), an explicit font encoding switch (e.g. +wrapping the Greek text in \verb|\ensuregreek|% +\footnote{The \texttt{\textbackslash ensuregreek} macro ensures the argument + is set in a font encoding supporting Greek. + % This can be used to fix these + % problems without adverse side-effects if the active font encoding is + % already LGR or Unicode. + }, +or XeTeX/LuaTeX with Unicode fonts. + + +\subsection{Diacritics} + +Composition of diacritics (like \verb|\accdasia\acctonos| or \verb|\<\'|) +fails in other font encodings. Long names (like \verb|\accdasiaoxia|) work. + +With LGR, pre-composed glyphs are chosen if available. In other font +encodings, accent macros do not select pre-composed characters. (The +difference is a sub-optimal placement of the accent and becomes obvious if +you drag-and-drop text from the PDF version of this document.): + +\begin{quote} + \ensuregreek{\<'a \accdasia\acctonos a \accdasiaoxia a + \accdasiaoxia\textalpha} (LGR) vs. \accdasiaoxia\textalpha{} (T1). +\end{quote} + +According to Greek typographical tradition, diacritics (except the +dialytika) are placed before capital letters in Titlecase and dropped in +UPPERCASE: +% +\begin{quote} + \ensuregreek{% + \<{\textalpha} \>{\textepsilon} \"'{\textiota} \`>\texteta{} + \'<{\textomicron} \~<{\textupsilon} \~>{\textomega} + \quad + \<{\textAlpha} \>{\textEpsilon} \"{\textIota} \`>\textEta{} + \'<{\textOmicron} \~<{\textUpsilon} \~>{\textOmega} + \quad + \MakeUppercase{% + \<{\textalpha} \>{\textepsilon} \"'{\textiota} \`\>\texteta{} + \'<{\textomicron} \~<{\textupsilon} \~>{\textomega} + } + } +\end{quote} +% +This fails for accent macros if the active font encoding is not LGR or +Unicode. Pre-composed literal Unicode characters are handled correctly: +\begin{quote} + \ensuregreek{\'\textAlpha/Ά} (LICR/Unicode in LGR) vs. + \'\textAlpha/Ά (LICR/Unicode in T1). +\end{quote} + +The dialytika marks a \emph{hiatus} (break-up of a diphthong). It must be +present in UPPERCASE even where it is redundant in lowercase (the hiatus can +also be marked by an accent on the first character of a diphthong). The +auto-hiatus feature works in LGR and Unicode font encodings only: +\begin{quote} + \acctonos\textalpha\textupsilon{}, \acctonos\textepsilon\textiota{} $\mapsto$ + \MakeUppercase{\ensuregreek{ + \acctonos\textalpha\textupsilon{}, \acctonos\textepsilon\textiota{} + }} (LGR) vs. + \MakeUppercase{ + \acctonos\textalpha\textupsilon{}, \acctonos\textepsilon\textiota{}% + } (T1) +\end{quote} + +Currently, the second vowel of the diphthong must be given as macro, not +Unicode literal if the auto-hiatus feature should work: +\begin{quote} +\ensuregreek{ἀ\textupsilon{}πνία} $\mapsto$ +\ensuregreek{\MakeUppercase{\ensuregreek{ἀ\textupsilon{}πνία}}} (LGR) vs. +\ensuregreek{\MakeUppercase{\ensuregreek{ἀυπνία}}} (T1). +\end{quote} + +\subsection{Kerning} + +No kerning occurs between Greek characters in non-Greek text due to the +internal font encoding switch: compare +\ensuregreek{\textAlpha\textUpsilon\textAlpha} (LGR) to +\textAlpha\textUpsilon\textAlpha (T1). + +Compiling with LuaTeX provides kerning also over font encoding boundaries. + +\section{Test and Examples} + +\subsection{Greek alphabet} + +Greek letters via Latin transcription in LGR font encoding: + +\begin{quote} + \ensuregreek{A B G D E Z H J I K L M N X O P R S T U F Q Y W}\\ + \ensuregreek{a b g d e z h j i k l m n x o p r sv c t u f q y w} +\end{quote} + +Greek letters via default macros in other font encoding (here T1): + +\begin{quote} + \textAlpha{} \textBeta{} \textGamma{} \textDelta{} \textEpsilon{} + \textZeta{} \textEta{} \textTheta{} \textIota{} \textKappa{} + \textLambda{} \textMu{} \textNu{} \textXi{} \textOmicron{} \textPi{} + \textRho{} \textSigma{} \textTau{} \textUpsilon{} \textPhi{} + \textChi{} \textPsi{} \textOmega{} + \\ + \textalpha{} \textbeta{} \textgamma{} \textdelta{} \textepsilon{} + \textzeta{} \texteta{} \texttheta{} \textiota{} \textkappa{} + \textlambda{} \textmu{} \textnu{} \textxi{} \textomicron{} \textpi{} + \textrho{} \textsigma{} \textvarsigma{} \texttau{} \textupsilon{} + \textphi{} \textchi{} \textpsi{} \textomega{} +\end{quote} + +Archaic Greek letters and Greek punctuation + +\begin{quote} + \textDigamma + \textanoteleia + \textQoppa + \textSampi + \textStigma + \textnumeralsigngreek + \texterotimatiko + \\ + \textdigamma + \textkoppa + \textqoppa + \textsampi + \textstigma + \textnumeralsignlowergreek + \textvarstigma +\end{quote} + +Diacritics + +\begin{quote} + Symbol macros:% + \footnote{Composite diacritics require wrapping in + \texttt{\textbackslash ensuregreek}.} + \"{} \'{} \`{} \~{} \<{} \>{} \u{} \={} + \ensuregreek{\"~{} \"'{} \"`{} \<~{} \<`{} \<'{} \>~{} \>'{} \>`{}} + + Named macros: + \accdialytika{} + \acctonos{} + \accvaria{} + \accperispomeni{} + \accdasia{} + \accpsili{} + \ypogegrammeni{} + \prosgegrammeni{} + % + \accdialytikaperispomeni{} + \accdialytikatonos{} + \accdialytikavaria{} + \accdasiaperispomeni{} + \accdasiavaria{} + \accdasiaoxia{} + \accpsiliperispomeni{} + \accpsilioxia{} + \accpsilivaria{} + % + \accinvertedbrevebelow{} % == \textsubarch{} + \accbrevebelow{} + + +\end{quote} + +Accent macros can start with \verb|\a| instead of \verb|\| when the +short form is redefined, e.\,g. inside a \emph{tabbing} environment. +This also works for the new-defined Dasia and Psili shortcuts: +\begin{quote} + \begin{tabbing} + COL1\quad \= COL2\quad \= COL3\quad \= COL4\quad \\ + COL1 \> \> COL3 \\ + Viele \> Gr\a"u\ss e + \> \greekscript \a<\textalpha{} + \> \greekscript \a>\textomega + \end{tabbing} +\end{quote} + + +\subsection{Greek Unicode characters in non-Greek text} + +With the \emph{textalpha} package, +\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc} and input +encoding \texttt{utf8}, Greek Unicode characters can be used in text with +any font encoding. See Tables \ref{tab:greek-and-coptic} and +\ref{tab:greek-extended}. + +Kerning is preserved if the font encoding is LGR: \ensuregreek{AΫA} + +\begin{table}[tbp] +\centerline{ +\begin{tabular}{rrrrrrrrrrrrrrrrr} +\toprule + & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & A & B & C & D & E & F\\ +\midrule +370 & * & * & * & * & ʹ & ͵ & * & * & & & ͺ & * & * & * & ; & \\ +380 & & & & & ΄ & ΅ & Ά & · & Έ & Ή & Ί & & Ό & & Ύ & Ώ\\ +390 & ΐ & Α & Β & Γ & Δ & Ε & Ζ & Η & Θ & Ι & Κ & Λ & Μ & Ν & Ξ & Ο\\ +3A0 & Π & Ρ & & Σ & Τ & Υ & Φ & Χ & Ψ & Ω & Ϊ & Ϋ & ά & έ & ή & ί\\ +3B0 & ΰ & α & β & γ & δ & ε & ζ & η & θ & ι & κ & λ & μ & ν & ξ & ο\\ +3C0 & π & ρ & ς & σ & τ & υ & φ & χ & ψ & ω & ϊ & ϋ & ό & ύ & ώ & \\ +3D0 & * & * & * & * & * & * & * & * & Ϙ & ϙ & Ϛ & ϛ & Ϝ & ϝ & * & ϟ\\ +3E0 & Ϡ & ϡ & * & * & * & * & * & * & * & * & * & * & * & * & * & *\\ +3F0 & * & * & * & * & * & * & * & * & * & * & * & * & * & * & * & *\\ +\bottomrule +\end{tabular} +} % end centerline +\caption{Greek and Coptic Unicode Block, input as literal Unicode + characters in T1 font encoding (legend: * glyph missing in LGR).} +\label{tab:greek-and-coptic} +\end{table} + + +\begin{table}[tbp] +\centerline{ +\begin{tabular}{rrrrrrrrrrrrrrrrr} +\toprule + & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & A & B & C & D & E & F\\ +\midrule +1F00 & ἀ & ἁ & ἂ & ἃ & ἄ & ἅ & ἆ & ἇ & Ἀ & Ἁ & Ἂ & Ἃ & Ἄ & Ἅ & Ἆ & Ἇ\\ +1F10 & ἐ & ἑ & ἒ & ἓ & ἔ & ἕ & & & Ἐ & Ἑ & Ἒ & Ἓ & Ἔ & Ἕ & & \\ +1F20 & ἠ & ἡ & ἢ & ἣ & ἤ & ἥ & ἦ & ἧ & Ἠ & Ἡ & Ἢ & Ἣ & Ἤ & Ἥ & Ἦ & Ἧ\\ +1F30 & ἰ & ἱ & ἲ & ἳ & ἴ & ἵ & ἶ & ἷ & Ἰ & Ἱ & Ἲ & Ἳ & Ἴ & Ἵ & Ἶ & Ἷ\\ +1F40 & ὀ & ὁ & ὂ & ὃ & ὄ & ὅ & & & Ὀ & Ὁ & Ὂ & Ὃ & Ὄ & Ὅ & & \\ +1F50 & ὐ & ὑ & ὒ & ὓ & ὔ & ὕ & ὖ & ὗ & & Ὑ & & Ὓ & & Ὕ & & Ὗ\\ +1F60 & ὠ & ὡ & ὢ & ὣ & ὤ & ὥ & ὦ & ὧ & Ὠ & Ὡ & Ὢ & Ὣ & Ὤ & Ὥ & Ὦ & Ὧ\\ +1F70 & ὰ & ά & ὲ & έ & ὴ & ή & ὶ & ί & ὸ & ό & ὺ & ύ & ὼ & ώ & & \\ +1F80 & ᾀ & ᾁ & ᾂ & ᾃ & ᾄ & ᾅ & ᾆ & ᾇ & ᾈ & ᾉ & ᾊ & ᾋ & ᾌ & ᾍ & ᾎ & ᾏ\\ +1F90 & ᾐ & ᾑ & ᾒ & ᾓ & ᾔ & ᾕ & ᾖ & ᾗ & ᾘ & ᾙ & ᾚ & ᾛ & ᾜ & ᾝ & ᾞ & ᾟ\\ +1FA0 & ᾠ & ᾡ & ᾢ & ᾣ & ᾤ & ᾥ & ᾦ & ᾧ & ᾨ & ᾩ & ᾪ & ᾫ & ᾬ & ᾭ & ᾮ & ᾯ\\ +1FB0 & ᾰ & ᾱ & ᾲ & ᾳ & ᾴ & & ᾶ & ᾷ & Ᾰ & Ᾱ & Ὰ & Ά & ᾼ & ᾽ & ι & ᾿\\ +1FC0 & ῀ & ῁ & ῂ & ῃ & ῄ & & ῆ & ῇ & Ὲ & Έ & Ὴ & Ή & ῌ & ῍ & ῎ & ῏\\ +1FD0 & ῐ & ῑ & ῒ & ΐ & & & ῖ & ῗ & Ῐ & Ῑ & Ὶ & Ί & & ῝ & ῞ & ῟\\ +1FE0 & ῠ & ῡ & ῢ & ΰ & ῤ & ῥ & ῦ & ῧ & Ῠ & Ῡ & Ὺ & Ύ & Ῥ & ῭ & ΅ & `\\ +1FF0 & & & ῲ & ῳ & ῴ & & ῶ & ῷ & Ὸ & Ό & Ὼ & Ώ & ῼ & ´ & ῾ & \\ +\bottomrule +\end{tabular} +} % end centerline +\caption{Greek Extended Unicode Block, input as literal Unicode +characters in T1 font encoding.} +\label{tab:greek-extended} +\end{table} + +Combined Diacritics work ᾅ, diacritics (except diaeresis) are dropped with +MakeUppercase (μαΐστρος $\mapsto$ \MakeUppercase{μαΐστρος}). + +\subsection{PDF strings} + +With \emph{textalpha} and +\emph{\href{http://www.ctan.org/pkg/greek-inputenc}{greek-inputenc}}, there +are two options to get Greek letters in PDF strings: LICR macros and literal +Unicode input. + +\subsubsection{\textlambda\textomicron\textgamma\textomicron\textvarsigma{}, + λογος and \ensuregreek{logos}} + +The subsection title above uses: LICR macros, Unicode input and the LGR +transcription for the Greek word \ensuregreek{logos}. Check the table of +contents in the PDF viewer: LICR macros and Unicode literals work fine, the +Latin transcription remains Latin in the PDF metadata. + +\end{document} diff --git a/language/greek/greek-fontenc/textalpha.sty b/language/greek/greek-fontenc/textalpha.sty new file mode 100644 index 0000000000..dda4d29ca1 --- /dev/null +++ b/language/greek/greek-fontenc/textalpha.sty @@ -0,0 +1,557 @@ +% textalpha.sty +% +++++++++++++ +% Greek symbols in text +% ********************* +% +% :Copyright: © 2010 Günter Milde +% :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: Provide a set of ``\text*`` macros for Greek characters +% in text mode. +% +% :Identification: +% :: + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{textalpha} +[2019/07/11 v0.13.4 macros for Greek letters in text] + +% .. note:: +% +% The package was renamed from `textgreek` to `textalpha` to prevent +% confusion with the textgreek_ package by Leonard Michlmayr. +% +% +% Changelog: +% .. class:: borderless +% +% ====== ========== ========================================================= +% 0.1 2010-06-16 initial version +% 0.2 2012-06-27 support for compound Unicode definitions outside LGR +% 0.3 2013-05-03 new accent macro names with ``lgrxenc.def`` 0.7 +% 0.4 2013-05-28 use ``lgrenc.def`` from greek-fontenc. +% 0.5 2013-09-11 move to greek-fontenc_, +% .. support XeTeX/LuaTeX, add breve below accents. +% 0.11 2013-11-28 compatibility with Xe/LuaTeX in 8-bit mode. +% 0.12 2014-12-12 fix auxiliary macro names, +% define symbol macros for breathing accents. +% 0.13 2015-09-04 Option normalize-symbols_: support for symbol variants. +% .. Option keep-semicolon_: use semicolon as erotimatiko +% in LGR. +% 0.13.2 2016-02-05 Support for standard Unicode text font encoding "TU" +% (new in fontspec v2.5a). +% 0.13.4 2019-07-11 Auxiliary command for subscript iota. +% ====== ========== ========================================================= +% +% .. contents:: +% +% Motivation +% ========== +% +% By default, TeX macros for Greek letters are only valid in mathematical +% mode. This package sets up a suitable `font encoding`_ and `LaTeX internal +% character representations` (LICR) definitions for Greek (``\textalpha`` -- +% ``\textOmega``). +% +% To allow documents using Greek LICR macros without worrying about the TeX +% engine used to compile them, this package tests the declared font encodings +% and does "the right thing" to set up Greek text font support: +% +% * If the Unicode font encodings EU1 (XeTeX) or EU2 (LuaTeX) are declared, +% before loading this package (e.g. via ``fontspec``) the package provides +% Greek LICR definitions for them. +% +% * Otherwise, the `LGR font encoding`_ is set as `default font encoding` +% (cf. fntguide_ section 5.3) for Greek. +% +% Advantages: +% +% * Symbols from a Greek text font (e.g. the `CB fonts`_) can be accessed +% without the need for an explicite font-encoding switch anywhere in the +% text. +% +% * Unicode input of Greek characters is supported +% +% + via ``\usepackage[utf8]{inputenc}`` and ``lgrenc.dfu`` from +% greek-inputenc_ for 8-bit TeX or XeTeX/LuaTeX in 8-bit compatibility +% mode in any font encoding (see textalpha-doc.tex_). +% +% + natively by XeTeX/LuaTeX for Unicode fonts. As inputenc_ does not work +% with these engines, text input can be done via the Latin transcription +% or LICR but *not via literal Unicode characters* for 8-bit font encodings +% like LGR (see greek-euenc-doc.tex_). +% +% .. Attention:: The macros work well in any font encoding for single symbols. +% However, with 8-bit TeX engines, the automatic font-encoding switches +% behind the doors interfere with kerning between letters and replacement +% of accent+character with a pre-composed character. +% +% Therefore, Greek text should be written with the help of babel_ or +% polyglossia_ (setting the language to ``greek``) or wrapped in the +% provided ``ensuregreek`` macro. Using babel_ or polyglossia_ also helps +% to ensure correct hyphenation of Greek text. +% +% +% Usage +% ===== +% +% Ensure support for Greek characters in text mode with +% +% .. code:: latex +% +% \usepackage{textalpha} +% +% eventually with the options_ to normalize symbols variants +% +% .. code:: latex +% +% \usepackage[normalize-symbols]{textalpha} +% +% and/or to use the semicolon as erotimatiko_ also in 8-bit TeX +% +% .. code:: latex +% +% \usepackage[normalize-symbols,keep-semicolon]{textalpha} +% +% +% To give ``textalpha.sty`` a chance of finding out which `font encodings`_ +% are used, load it after fontspec_ and/or fontenc_. +% +% +% +% For detailled examples see ``_ and ``_ +% (8-bit TeX and XeTeX/LuaTeX in 8-bit compatibility mode) as well as +% ``_ and ``_ (XeTeX/LuaTeX with +% Unicode fonts). +% +% With XeTeX or LuaTex, Unicode fonts and LGR encoded 8-bit fonts can be used +% in the same document (see greek-euenc-doc.tex_). +% +% +% Implementation +% ============== +% +% Options +% ------- +% +% normalize-symbols +% """"""""""""""""" +% +% The "variant shape" symbol characters like ``03D1 GREEK THETA SYMBOL`` are +% mathematical charcters for mathematical use +% (similar to ``1D440 MATHEMATICAL ITALIC CAPITAL M``). +% Unfortunately, some Greek texts sources in Unicode encoding mix letter and +% symbol characters . +% +% The "normalize-symbols" option controls the handling of `variant shape +% symbols`_ under 8-bit TeX: +% +% * The option activates a simple "folding" mechanism that merges ϰ and κ to +% \textkappa etc. for text copied from external sources which may use the +% GREEK SYMBOL characters in place of GREEK LETTERS, +% +% * Without this option, variant shape symbols in the input are reported as +% errors to prevent information loss in cases where the distinction between +% ϰ and κ is intended (e.g. in mathematical or scientific context). +% +% With XeTeX/LuaTeX and Unicode fonts, this option is ignored. +% :: + +\newif\iftextalpha@normalizeSymbols +\DeclareOption{normalize-symbols}{\textalpha@normalizeSymbolstrue} + +% keep-semicolon +% """""""""""""" +% +% The erotimatiko_ looks like a semicolon but is a +% **Greek question mark**: +% +% * The `LGR font encoding`_ uses the Latin question mark as input for the +% `erotimatiko` and maps the semicolon to a middle dot (`ano teleia`). +% * The Unicode standard provides the code point ``037E GREEK QUESTION MARK`` +% but says: "character ``003B SEMICOLON`` (and not 037E) is the preferred +% character for Greek question mark". +% +% The ``keep-semicolon`` option allows to use the `semicolon as erotimatiko`_ +% in both, Xe/LuaTeX and 8-bit TeX. (The `ano teleia` can be input as +% ``\textanoteleia`` or using character ``00B7 MIDDLE DOT``.) +% With XeTeX/LuaTeX and Unicode fonts, this option is ignored. +% :: + +\newif\iftextalpha@keepSemicolon +\DeclareOption{keep-semicolon}{\textalpha@keepSemicolontrue} + +\ProcessOptions\relax + +% .. _font encoding: +% +% Font encodings +% -------------- +% +% With 8-bit LaTeX, the `LGR font encoding`_ is used for Greek characters. If +% no Greek-supporting font encoding (TU, EU1, EU2, or LGR) is declared, LGR is +% loaded and set up as default Greek font encoding by this package. +% +% With XeTeX or LuaTeX, there is one common input and font encoding -- +% Unicode. 8-bit TeX font encodings are only used in compatibility mode or for +% fonts not available otherwise. For compatibility with the LaTeX font +% selection system, fontspec_ defines the TU font encoding or the (pseudo) +% font encodings EU1 and EU2 for XeTeX and LuaTeX respectively. However +% `fontspec` does not (yet) define Greek LICR macros. We therefore explicitely +% load Greek LICR definitions for XeTeX/LuaTeX from `greek-euenc.def +% `_ which in turn includes `greek-fontenc.def +% `_. +% +% .. _LGR font encoding: README.html#lgr +% +% Ensure a Greek-supporting font encoding exists and supports Greek LICR +% macros: +% +% * Load the Greek LICR definitions for Unicode if the font encoding TU, EU1 +% (XeTeX) or EU2 (LuaTeX) is detected. +% * Re-set ``\LastDeclaredEncoding`` (used in some included font-encoding files). +% * If none of TU, EU1, EU2, or LGR is declared, load ``lgrenc.def``. +% +% :: + +\@ifl@aded{def}{tuenc}{ + \renewcommand{\LastDeclaredEncoding}{TU} + \input{greek-euenc.def} +}{% else + \@ifl@aded{def}{eu1enc}{ + \renewcommand{\LastDeclaredEncoding}{EU1} + \input{greek-euenc.def} + }{% else + \@ifl@aded{def}{eu2enc}{ + \renewcommand{\LastDeclaredEncoding}{EU2} + \input{greek-euenc.def} + }{% else + \@ifl@aded{def}{lgrenc}{ + % LGR already declared and set up + \renewcommand{\LastDeclaredEncoding}{LGR} + }{ + \input{lgrenc.def} + } + } + } +} + +% The package hyperref_ defines the PU font encoding which also supports +% (monotonic) Greek. It currently misses polytonic greek and the +% ``\greekscript`` and ``\ensuregreek`` TextCommands:: + +\@ifl@aded{def}{puenc} + {\ProvideTextCommand{\greekscript}{PU}{} + \ProvideTextCommand{\ensuregreek}{PU}[1]{#1}} + {} + + +% Symbol macros for breathings +% ---------------------------- +% +% In the Latin transcription provided by LGR, breathing accents (Dasia and +% Psili) are input as < and >. We provide the corresponding NFSS macro accents +% (moved here from `greek-fontenc.def`_). +% +% As Xe/LuaTeX may use LGR in combination with EU1 or EU2, we define the +% macros twice, for LGR and Unicode font encodings (if they are defined):: + +\@ifl@aded{def}{lgrenc}{ + \DeclareTextCommand{\<}{LGR}{\accdasia} + \DeclareTextCommand{\>}{LGR}{\accpsili} + % Composite accents starting with the new-defined shortcuts: + \DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia} + \DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria} + \DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni} + \DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia} + \DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria} + \DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni} + % Hiatus feature (see greek-fontenc.def and babel-greek (greek.ldf)) + \DeclareTextCompositeCommand{\<}{LGR}{^^9f}{\LGR@hiatus} + \DeclareTextCompositeCommand{\>}{LGR}{^^9f}{\LGR@hiatus} + +}{} + +\@ifl@aded{def}{greek-euenc}{ % XeTeX or LuaTeX with Unicode fonts + \DeclareTextCommand{\<}{\LastDeclaredEncoding}{\accdasia} + \DeclareTextCommand{\>}{\LastDeclaredEncoding}{\accpsili} + % Composite accents starting with the new-defined shortcuts: + \DeclareTextCompositeCommand{\>}{\LastDeclaredEncoding}{'}{\accpsilioxia} + \DeclareTextCompositeCommand{\>}{\LastDeclaredEncoding}{`}{\accpsilivaria} + \DeclareTextCompositeCommand{\>}{\LastDeclaredEncoding}{~}{\accpsiliperispomeni} + \DeclareTextCompositeCommand{\<}{\LastDeclaredEncoding}{'}{\accdasiaoxia} + \DeclareTextCompositeCommand{\<}{\LastDeclaredEncoding}{`}{\accdasiavaria} + \DeclareTextCompositeCommand{\<}{\LastDeclaredEncoding}{~}{\accdasiaperispomeni} +}{} + + +% Default declarations +% -------------------- +% +% The following definitions ensure that the Greek LICR macros can be used +% anywhere in the document also with 8-bit TeX by declaring LGR as their +% default font encoding. Abort here, if the LGR font encoding is not defined:: + +\@ifl@aded{def}{lgrenc} + {} +% else return: + {\expandafter\endinput} + + +% greekscript, ensuregreek +% """""""""""""""""""""""" +% +% The ``\greekscript`` declaration ensures the current font encoding supports +% the Greek script. ``greek-fontenc.def`` sets this to the empty declaration +% for font encodings that do so. This is currently used by ``lgrenc.def`` +% (LGR) and ``greek-euenc.def`` (Greek LICR macros for EU1 and EU2). +% +% +% We define LGR as default encoding for Greek text. We use +% ``\ProvideTextCommandDefault`` to enable the author or other packages to use +% an alternative definition (see [fntguide_]):: + +\ProvideTextCommandDefault{\greekscript}{\fontencoding{LGR}\selectfont} + +% The ``\ensuregreek`` command can be used to ensure that its argument is set in +% a font encoding with support for Greek. Again the default is LGR:: + +\ProvideTextCommandDefault{\ensuregreek}[1]{\leavevmode{\greekscript #1}} + +% .. The [fntguide_] writes +% +% Note that ``\DeclareTextAccentDefault`` can be used on any +% one-argument encoding-specific command, not just those defined with +% ``\DeclareTextAccent``. +% +% However, the simpler alternative +% ``\DeclareTextAccentDefault{\ensuregreek}{LGR}`` fails with the table of +% Unicode characters in the test document ``__: +% +% ``! You can't use a prefix with `end-group character }'.`` +% +% Eventually, all font encodings supporting Greek script (e.g. LGI, PU, TU, +% EU1, EU2) will declare ``\ensuregreek`` as text command that passes the +% argument unchanged. This way, kerning and selection of precomposed glyphs +% would work also for cases like ``\ensuregreek{\'A}U``. +% +% +% Greek Alphabet +% """""""""""""" +% +% Define the ``text*`` marcos as default for all font encodings:: + +\DeclareTextSymbolDefault{\textAlpha}{LGR} +\DeclareTextSymbolDefault{\textBeta}{LGR} +\DeclareTextSymbolDefault{\textGamma}{LGR} +\DeclareTextSymbolDefault{\textDelta}{LGR} +\DeclareTextSymbolDefault{\textEpsilon}{LGR} +\DeclareTextSymbolDefault{\textZeta}{LGR} +\DeclareTextSymbolDefault{\textEta}{LGR} +\DeclareTextSymbolDefault{\textTheta}{LGR} +\DeclareTextSymbolDefault{\textIota}{LGR} +\DeclareTextSymbolDefault{\textKappa}{LGR} +\DeclareTextSymbolDefault{\textLambda}{LGR} +\DeclareTextSymbolDefault{\textMu}{LGR} +\DeclareTextSymbolDefault{\textNu}{LGR} +\DeclareTextSymbolDefault{\textXi}{LGR} +\DeclareTextSymbolDefault{\textOmicron}{LGR} +\DeclareTextSymbolDefault{\textPi}{LGR} +\DeclareTextSymbolDefault{\textRho}{LGR} +\DeclareTextSymbolDefault{\textSigma}{LGR} +\DeclareTextSymbolDefault{\textTau}{LGR} +\DeclareTextSymbolDefault{\textUpsilon}{LGR} +\DeclareTextSymbolDefault{\textPhi}{LGR} +\DeclareTextSymbolDefault{\textChi}{LGR} +\DeclareTextSymbolDefault{\textPsi}{LGR} +\DeclareTextSymbolDefault{\textOmega}{LGR} +% +\DeclareTextSymbolDefault{\textalpha}{LGR} +\DeclareTextSymbolDefault{\textbeta}{LGR} +\DeclareTextSymbolDefault{\textgamma}{LGR} +\DeclareTextSymbolDefault{\textdelta}{LGR} +\DeclareTextSymbolDefault{\textepsilon}{LGR} +\DeclareTextSymbolDefault{\textzeta}{LGR} +\DeclareTextSymbolDefault{\texteta}{LGR} +\DeclareTextSymbolDefault{\texttheta}{LGR} +\DeclareTextSymbolDefault{\textiota}{LGR} +\DeclareTextSymbolDefault{\textkappa}{LGR} +\DeclareTextSymbolDefault{\textlambda}{LGR} +\DeclareTextSymbolDefault{\textmu}{LGR} +\DeclareTextSymbolDefault{\textnu}{LGR} +\DeclareTextSymbolDefault{\textxi}{LGR} +\DeclareTextSymbolDefault{\textomicron}{LGR} +\DeclareTextSymbolDefault{\textpi}{LGR} +\DeclareTextSymbolDefault{\textrho}{LGR} +\DeclareTextSymbolDefault{\textsigma}{LGR} +\DeclareTextSymbolDefault{\textvarsigma}{LGR} +\DeclareTextSymbolDefault{\textfinalsigma}{LGR} % alias for \textvarsigma +\DeclareTextSymbolDefault{\textautosigma}{LGR} % char 115 in LGR +\DeclareTextSymbolDefault{\texttau}{LGR} +\DeclareTextSymbolDefault{\textupsilon}{LGR} +\DeclareTextSymbolDefault{\textphi}{LGR} +\DeclareTextSymbolDefault{\textchi}{LGR} +\DeclareTextSymbolDefault{\textpsi}{LGR} +\DeclareTextSymbolDefault{\textomega}{LGR} + +% Additional Greek symbols +% """""""""""""""""""""""" +% +% Including alias names for compatibility with hyperref's puenc.def. +% +% Ancient Greek Numbers (Athenian Numerals):: + +\DeclareTextSymbolDefault{\textpentedeka}{LGR} % GREEK ACROPHONIC ATTIC FIFTY +\DeclareTextSymbolDefault{\textpentehekaton}{LGR} % GREEK ACROPHONIC ATTIC FIVE HUNDRED +\DeclareTextSymbolDefault{\textpenteqilioi}{LGR} % GREEK ACROPHONIC ATTIC FIVE THOUSAND +\DeclareTextSymbolDefault{\textpentemurioi}{LGR} % GREEK ACROPHONIC ATTIC FIFTY THOUSAND + +% Archaic letters:: + +\DeclareTextSymbolDefault{\textstigma}{LGR} % ϛ +\DeclareTextSymbolDefault{\textstigmagreek}{LGR} % ϛ (puenc.def) +\DeclareTextSymbolDefault{\textvarstigma}{LGR} % stigma variant +\DeclareTextSymbolDefault{\textkoppa}{LGR} % ϟ (greek small letter koppa) +\DeclareTextSymbolDefault{\textkoppagreek}{LGR} % ϟ (puenc.def) +\DeclareTextSymbolDefault{\textqoppa}{LGR} % ϙ (archaic koppa) +\DeclareTextSymbolDefault{\textQoppa}{LGR} % Ϙ (archaic Koppa) +\DeclareTextSymbolDefault{\textStigma}{LGR} % Ϛ ϹΤ ligature in some fonts +\DeclareTextSymbolDefault{\textStigmagreek}{LGR} % Ϛ (puenc.def) +\DeclareTextSymbolDefault{\textSampi}{LGR} % Ϡ +\DeclareTextSymbolDefault{\textSampigreek}{LGR} % Ϡ (puenc.def) +\DeclareTextSymbolDefault{\textsampi}{LGR} % ϡ +\DeclareTextSymbolDefault{\textsampigreek}{LGR} % ϡ (puenc.def) +\DeclareTextSymbolDefault{\textanoteleia}{LGR} % · +\DeclareTextSymbolDefault{\texterotimatiko}{LGR} % ; (003B is the preferred character) +\DeclareTextSymbolDefault{\textdigamma}{LGR} % ϝ +\DeclareTextSymbolDefault{\textDigamma}{LGR} % Ϝ +\DeclareTextSymbolDefault{\textdigammagreek}{LGR} % ϝ (puenc.def) +\DeclareTextSymbolDefault{\textDigammagreek}{LGR} % Ϝ (puenc.def) + +% numeral signs: http://en.wikipedia.org/wiki/Greek_numerals :: + +\DeclareTextSymbolDefault{\textnumeralsigngreek}{LGR} % (puenc.def) +\DeclareTextSymbolDefault{\textnumeralsignlowergreek}{LGR} % (puenc.def) + +% variant shape symbols +% ''''''''''''''''''''' +% +% Mathematical notation uses variant shapes of some Greek letters as +% additional symbols. There are separate code points for the symbol variants +% in Unicode but not in the LGR font encoding used for Greek in 8-bit TeX. +% The variations have no syntactic meaning in Greek text. :: + +\DeclareTextSymbolDefault{\textbetasymbol}{LGR} % ϐ GREEK BETA SYMBOL +\DeclareTextSymbolDefault{\textthetasymbol}{LGR} % ϑ $\vartheta$ GREEK THETA SYMBOL +\DeclareTextSymbolDefault{\textphisymbol}{LGR} % ϕ $\phi$ GREEK PHI SYMBOL +\DeclareTextSymbolDefault{\textpisymbol}{LGR} % ϖ $\varpi$ GREEK PI SYMBOL +\DeclareTextSymbolDefault{\textkappasymbol}{LGR} % ϰ GREEK KAPPA SYMBOL +\DeclareTextSymbolDefault{\textrhosymbol}{LGR} % ϱ $\varrho$ GREEK RHO SYMBOL +\DeclareTextSymbolDefault{\textThetasymbol}{LGR} % ϴ GREEK CAPITAL THETA SYMBOL +\DeclareTextSymbolDefault{\textepsilonsymbol}{LGR} % ϵ $\epsilon$ GREEK LUNATE EPSILON SYMBOL + +% Define compatibility mappings if the normalize-symbols_ option is set:: + +\iftextalpha@normalizeSymbols + \DeclareTextCommand{\textbetasymbol} {LGR}{\textbeta} + \DeclareTextCommand{\textthetasymbol} {LGR}{\texttheta} + \DeclareTextCommand{\textphisymbol} {LGR}{\textphi} + \DeclareTextCommand{\textpisymbol} {LGR}{\textpi} + \DeclareTextCommand{\textkappasymbol} {LGR}{\textkappa} + \DeclareTextCommand{\textrhosymbol} {LGR}{\textrho} + \DeclareTextCommand{\textThetasymbol} {LGR}{\textTheta} + \DeclareTextCommand{\textepsilonsymbol}{LGR}{\textepsilon} +\fi + + +% Diacritics +% """""""""" +% +% Greek diacritics via "named" macros:: + +\DeclareTextAccentDefault{\accdasia}{LGR} +\DeclareTextAccentDefault{\accpsili}{LGR} +\DeclareTextAccentDefault{\acctonos}{LGR} +\DeclareTextAccentDefault{\accvaria}{LGR} +\DeclareTextAccentDefault{\accperispomeni}{LGR} +\DeclareTextAccentDefault{\accdialytika}{LGR} +% +\DeclareTextAccentDefault{\accdasiaoxia}{LGR} +\DeclareTextAccentDefault{\accdasiavaria}{LGR} +\DeclareTextAccentDefault{\accdasiaperispomeni}{LGR} +\DeclareTextAccentDefault{\accpsilioxia}{LGR} +\DeclareTextAccentDefault{\accpsilivaria}{LGR} +\DeclareTextAccentDefault{\accpsiliperispomeni}{LGR} +\DeclareTextAccentDefault{\accdialytikatonos}{LGR} +\DeclareTextAccentDefault{\accdialytikavaria}{LGR} +\DeclareTextAccentDefault{\accdialytikaperispomeni}{LGR} + +% Symbol macros for the breathings:: + +\DeclareTextAccentDefault{\<}{LGR} +\DeclareTextAccentDefault{\>}{LGR} + +% Postfix accents:: + +\DeclareTextSymbolDefault{\ypogegrammeni}{LGR} % "small" sub-iota +\DeclareTextSymbolDefault{\prosgegrammeni}{LGR} % "capital" sub-iota + +% Other accents in LGR:: + +\DeclareTextAccentDefault{\accinvertedbrevebelow}{LGR} % INVERTED BREVE BELOW +\DeclareTextAccentDefault{\textsubarch}{LGR} % tipa, Teubner name: ut +\DeclareTextAccentDefault{\accbrevebelow}{LGR} % BREVE BELOW + + +% Auxiliary macros +% """""""""""""""" +% +% ``\MakeUppercase`` requires four internal commands:: + +\DeclareTextAccentDefault{\LGR@accdropped}{LGR} +\DeclareTextAccentDefault{\LGR@accDialytika}{LGR} +\DeclareTextAccentDefault{\LGR@hiatus}{LGR} +\DeclareTextSymbolDefault{\LGR@ypogegrammeni}{LGR} + + +% semicolon as erotimatiko +% """""""""""""""""""""""" +% +% The text command ``\textsemicolon`` inserts ``\texterotimatiko`` +% in LGR font encoding and a "normal" semicolon else:: + +\ProvideTextCommandDefault{\textsemicolon}{;} +\ProvideTextCommand{\textsemicolon}{LGR}{\texterotimatiko} + +% The LGR font encoding maps ";" to a middle dot (ano teleia). With the +% keep-semicolon_ option, the semicolon is made an active character and calls +% ``\textsemicolon``:: + +\iftextalpha@keepSemicolon + \catcode`;=\active + \newcommand{;}{\textsemicolon} +\fi + + + +% .. References +% ---------- +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _CB fonts: http://www.ctan.org/pkg/cbgreek-complete +% .. _babel: http://www.ctan.org/pkg/babel +% .. _euenc: http://www.ctan.org/pkg/euenc +% .. _e-TeX: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=etex +% .. _fontenc: http://www.ctan.org/pkg/fontenc +% .. _fontspec: http://www.ctan.org/pkg/fontspec +% .. _fntguide: http://mirror.ctan.org/macros/latex/doc/fntguide.pdf +% .. _greek-fontenc: http://www.ctan.org/pkg/greek-fontenc +% .. _greek-inputenc: http://www.ctan.org/pkg/greek-inputenc +% .. _hyperref: http://www.ctan.org/pkg/hyperref +% .. _inputenc: http://www.ctan.org/pkg/inputenc +% .. _polyglossia: http://www.ctan.org/pkg/polyglossia +% .. _textgreek: http://www.ctan.org/pkg/textgreek +% .. _xunicode: http://www.ctan.org/pkg/xunicode +% +% .. _erotimatiko: https://en.wikipedia.org/wiki/Question_mark#Erotimatiko diff --git a/language/greek/greek-fontenc/textalpha.sty.html b/language/greek/greek-fontenc/textalpha.sty.html new file mode 100644 index 0000000000..514a7c82db --- /dev/null +++ b/language/greek/greek-fontenc/textalpha.sty.html @@ -0,0 +1,1084 @@ + + + + + +textalpha.sty + + + + + + +
+

textalpha.sty

+

Greek symbols in text

+
+ + +
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{textalpha}
+[2019/07/11 v0.13.4 macros for Greek letters in text]
+
+
+
+

Abstract

+

Provide a set of \text* macros for Greek characters +in text mode.

+
+
+

Note

+

The package was renamed from textgreek to textalpha to prevent +confusion with the textgreek package by Leonard Michlmayr.

+
+
+
Changelog:
+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

0.1

2010-06-16

initial version

0.2

2012-06-27

support for compound Unicode definitions outside LGR

0.3

2013-05-03

new accent macro names with lgrxenc.def 0.7

0.4

2013-05-28

use lgrenc.def from greek-fontenc.

0.5

2013-09-11 +..

move to greek-fontenc, +support XeTeX/LuaTeX, add breve below accents.

0.11

2013-11-28

compatibility with Xe/LuaTeX in 8-bit mode.

0.12

2014-12-12

fix auxiliary macro names, +define symbol macros for breathing accents.

0.13

2015-09-04 +..

Option normalize-symbols: support for symbol variants. +Option keep-semicolon: use semicolon as erotimatiko +in LGR.

0.13.2

2016-02-05

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

0.13.4

2019-07-11

Auxiliary command for subscript iota.

+
+
+ +
+

Motivation

+

By default, TeX macros for Greek letters are only valid in mathematical +mode. This package sets up a suitable font encoding and LaTeX internal +character representations (LICR) definitions for Greek (\textalpha – +\textOmega).

+

To allow documents using Greek LICR macros without worrying about the TeX +engine used to compile them, this package tests the declared font encodings +and does “the right thing” to set up Greek text font support:

+
    +
  • If the Unicode font encodings EU1 (XeTeX) or EU2 (LuaTeX) are declared, +before loading this package (e.g. via fontspec) the package provides +Greek LICR definitions for them.

  • +
  • Otherwise, the LGR font encoding is set as default font encoding +(cf. fntguide section 5.3) for Greek.

  • +
+

Advantages:

+
    +
  • Symbols from a Greek text font (e.g. the CB fonts) can be accessed +without the need for an explicite font-encoding switch anywhere in the +text.

  • +
  • Unicode input of Greek characters is supported

    +
      +
    • via \usepackage[utf8]{inputenc} and lgrenc.dfu from +greek-inputenc for 8-bit TeX or XeTeX/LuaTeX in 8-bit compatibility +mode in any font encoding (see textalpha-doc.tex).

    • +
    • natively by XeTeX/LuaTeX for Unicode fonts. As inputenc does not work +with these engines, text input can be done via the Latin transcription +or LICR but not via literal Unicode characters for 8-bit font encodings +like LGR (see greek-euenc-doc.tex).

    • +
    +
  • +
+
+

Attention!

+

The macros work well in any font encoding for single symbols. +However, with 8-bit TeX engines, the automatic font-encoding switches +behind the doors interfere with kerning between letters and replacement +of accent+character with a pre-composed character.

+

Therefore, Greek text should be written with the help of babel or +polyglossia (setting the language to greek) or wrapped in the +provided ensuregreek macro. Using babel or polyglossia also helps +to ensure correct hyphenation of Greek text.

+
+
+
+

Usage

+

Ensure support for Greek characters in text mode with

+
\usepackage{textalpha}
+

eventually with the options to normalize symbols variants

+
\usepackage[normalize-symbols]{textalpha}
+

and/or to use the semicolon as erotimatiko also in 8-bit TeX

+
\usepackage[normalize-symbols,keep-semicolon]{textalpha}
+

To give textalpha.sty a chance of finding out which font encodings +are used, load it after fontspec and/or fontenc.

+

For detailled examples see textalpha-doc.tex and textalpha-doc.pdf +(8-bit TeX and XeTeX/LuaTeX in 8-bit compatibility mode) as well as +greek-euenc-doc.tex and greek-euenc-doc.pdf (XeTeX/LuaTeX with +Unicode fonts).

+

With XeTeX or LuaTex, Unicode fonts and LGR encoded 8-bit fonts can be used +in the same document (see greek-euenc-doc.tex).

+
+
+

Implementation

+
+

Options

+
+

normalize-symbols

+

The “variant shape” symbol characters like 03D1 GREEK THETA SYMBOL are +mathematical charcters for mathematical use +(similar to 1D440 MATHEMATICAL ITALIC CAPITAL M). +Unfortunately, some Greek texts sources in Unicode encoding mix letter and +symbol characters .

+

The “normalize-symbols” option controls the handling of variant shape +symbols under 8-bit TeX:

+
    +
  • The option activates a simple “folding” mechanism that merges ϰ and κ to +textkappa etc. for text copied from external sources which may use the +GREEK SYMBOL characters in place of GREEK LETTERS,

  • +
  • Without this option, variant shape symbols in the input are reported as +errors to prevent information loss in cases where the distinction between +ϰ and κ is intended (e.g. in mathematical or scientific context).

  • +
+

With XeTeX/LuaTeX and Unicode fonts, this option is ignored.

+
\newif\iftextalpha@normalizeSymbols
+\DeclareOption{normalize-symbols}{\textalpha@normalizeSymbolstrue}
+
+
+

keep-semicolon

+

The erotimatiko looks like a semicolon but is a +Greek question mark:

+
    +
  • The LGR font encoding uses the Latin question mark as input for the +erotimatiko and maps the semicolon to a middle dot (ano teleia).

  • +
  • The Unicode standard provides the code point 037E GREEK QUESTION MARK +but says: “character 003B SEMICOLON (and not 037E) is the preferred +character for Greek question mark”.

  • +
+

The keep-semicolon option allows to use the semicolon as erotimatiko +in both, Xe/LuaTeX and 8-bit TeX. (The ano teleia can be input as +\textanoteleia or using character 00B7 MIDDLE DOT.) +With XeTeX/LuaTeX and Unicode fonts, this option is ignored.

+
\newif\iftextalpha@keepSemicolon
+\DeclareOption{keep-semicolon}{\textalpha@keepSemicolontrue}
+
+\ProcessOptions\relax
+
+
+
+

Font encodings

+

With 8-bit LaTeX, the LGR font encoding is used for Greek characters. If +no Greek-supporting font encoding (TU, EU1, EU2, or LGR) is declared, LGR is +loaded and set up as default Greek font encoding by this package.

+

With XeTeX or LuaTeX, there is one common input and font encoding – +Unicode. 8-bit TeX font encodings are only used in compatibility mode or for +fonts not available otherwise. For compatibility with the LaTeX font +selection system, fontspec defines the TU font encoding or the (pseudo) +font encodings EU1 and EU2 for XeTeX and LuaTeX respectively. However +fontspec does not (yet) define Greek LICR macros. We therefore explicitely +load Greek LICR definitions for XeTeX/LuaTeX from greek-euenc.def which in turn includes greek-fontenc.def.

+

Ensure a Greek-supporting font encoding exists and supports Greek LICR +macros:

+
    +
  • Load the Greek LICR definitions for Unicode if the font encoding TU, EU1 +(XeTeX) or EU2 (LuaTeX) is detected.

  • +
  • Re-set \LastDeclaredEncoding (used in some included font-encoding files).

  • +
  • If none of TU, EU1, EU2, or LGR is declared, load lgrenc.def.

  • +
+
\@ifl@aded{def}{tuenc}{
+  \renewcommand{\LastDeclaredEncoding}{TU}
+  \input{greek-euenc.def}
+}{% else
+  \@ifl@aded{def}{eu1enc}{
+    \renewcommand{\LastDeclaredEncoding}{EU1}
+    \input{greek-euenc.def}
+  }{% else
+    \@ifl@aded{def}{eu2enc}{
+      \renewcommand{\LastDeclaredEncoding}{EU2}
+      \input{greek-euenc.def}
+    }{% else
+      \@ifl@aded{def}{lgrenc}{
+        % LGR already declared and set up
+        \renewcommand{\LastDeclaredEncoding}{LGR}
+      }{
+        \input{lgrenc.def}
+      }
+    }
+  }
+}
+

The package hyperref defines the PU font encoding which also supports +(monotonic) Greek. It currently misses polytonic greek and the +\greekscript and \ensuregreek TextCommands:

+
\@ifl@aded{def}{puenc}
+  {\ProvideTextCommand{\greekscript}{PU}{}
+   \ProvideTextCommand{\ensuregreek}{PU}[1]{#1}}
+  {}
+
+
+

Symbol macros for breathings

+

In the Latin transcription provided by LGR, breathing accents (Dasia and +Psili) are input as < and >. We provide the corresponding NFSS macro accents +(moved here from greek-fontenc.def).

+

As Xe/LuaTeX may use LGR in combination with EU1 or EU2, we define the +macros twice, for LGR and Unicode font encodings (if they are defined):

+
\@ifl@aded{def}{lgrenc}{
+  \DeclareTextCommand{\<}{LGR}{\accdasia}
+  \DeclareTextCommand{\>}{LGR}{\accpsili}
+  % Composite accents starting with the new-defined shortcuts:
+  \DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia}
+  \DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria}
+  \DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni}
+  \DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia}
+  \DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria}
+  \DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni}
+  % Hiatus feature (see greek-fontenc.def and babel-greek (greek.ldf))
+  \DeclareTextCompositeCommand{\<}{LGR}{^^9f}{\LGR@hiatus}
+  \DeclareTextCompositeCommand{\>}{LGR}{^^9f}{\LGR@hiatus}
+
+}{}
+
+\@ifl@aded{def}{greek-euenc}{ % XeTeX or LuaTeX with Unicode fonts
+  \DeclareTextCommand{\<}{\LastDeclaredEncoding}{\accdasia}
+  \DeclareTextCommand{\>}{\LastDeclaredEncoding}{\accpsili}
+  % Composite accents starting with the new-defined shortcuts:
+  \DeclareTextCompositeCommand{\>}{\LastDeclaredEncoding}{'}{\accpsilioxia}
+  \DeclareTextCompositeCommand{\>}{\LastDeclaredEncoding}{`}{\accpsilivaria}
+  \DeclareTextCompositeCommand{\>}{\LastDeclaredEncoding}{~}{\accpsiliperispomeni}
+  \DeclareTextCompositeCommand{\<}{\LastDeclaredEncoding}{'}{\accdasiaoxia}
+  \DeclareTextCompositeCommand{\<}{\LastDeclaredEncoding}{`}{\accdasiavaria}
+  \DeclareTextCompositeCommand{\<}{\LastDeclaredEncoding}{~}{\accdasiaperispomeni}
+}{}
+
+
+

Default declarations

+

The following definitions ensure that the Greek LICR macros can be used +anywhere in the document also with 8-bit TeX by declaring LGR as their +default font encoding. Abort here, if the LGR font encoding is not defined:

+
\@ifl@aded{def}{lgrenc}
+  {}
+% else return:
+  {\expandafter\endinput}
+
+

greekscript, ensuregreek

+

The \greekscript declaration ensures the current font encoding supports +the Greek script. greek-fontenc.def sets this to the empty declaration +for font encodings that do so. This is currently used by lgrenc.def +(LGR) and greek-euenc.def (Greek LICR macros for EU1 and EU2).

+

We define LGR as default encoding for Greek text. We use +\ProvideTextCommandDefault to enable the author or other packages to use +an alternative definition (see [fntguide]):

+
\ProvideTextCommandDefault{\greekscript}{\fontencoding{LGR}\selectfont}
+

The \ensuregreek command can be used to ensure that its argument is set in +a font encoding with support for Greek. Again the default is LGR:

+
\ProvideTextCommandDefault{\ensuregreek}[1]{\leavevmode{\greekscript #1}}
+ +

Eventually, all font encodings supporting Greek script (e.g. LGI, PU, TU, +EU1, EU2) will declare \ensuregreek as text command that passes the +argument unchanged. This way, kerning and selection of precomposed glyphs +would work also for cases like \ensuregreek{\'A}U.

+
+
+

Greek Alphabet

+

Define the text* marcos as default for all font encodings:

+
\DeclareTextSymbolDefault{\textAlpha}{LGR}
+\DeclareTextSymbolDefault{\textBeta}{LGR}
+\DeclareTextSymbolDefault{\textGamma}{LGR}
+\DeclareTextSymbolDefault{\textDelta}{LGR}
+\DeclareTextSymbolDefault{\textEpsilon}{LGR}
+\DeclareTextSymbolDefault{\textZeta}{LGR}
+\DeclareTextSymbolDefault{\textEta}{LGR}
+\DeclareTextSymbolDefault{\textTheta}{LGR}
+\DeclareTextSymbolDefault{\textIota}{LGR}
+\DeclareTextSymbolDefault{\textKappa}{LGR}
+\DeclareTextSymbolDefault{\textLambda}{LGR}
+\DeclareTextSymbolDefault{\textMu}{LGR}
+\DeclareTextSymbolDefault{\textNu}{LGR}
+\DeclareTextSymbolDefault{\textXi}{LGR}
+\DeclareTextSymbolDefault{\textOmicron}{LGR}
+\DeclareTextSymbolDefault{\textPi}{LGR}
+\DeclareTextSymbolDefault{\textRho}{LGR}
+\DeclareTextSymbolDefault{\textSigma}{LGR}
+\DeclareTextSymbolDefault{\textTau}{LGR}
+\DeclareTextSymbolDefault{\textUpsilon}{LGR}
+\DeclareTextSymbolDefault{\textPhi}{LGR}
+\DeclareTextSymbolDefault{\textChi}{LGR}
+\DeclareTextSymbolDefault{\textPsi}{LGR}
+\DeclareTextSymbolDefault{\textOmega}{LGR}
+%
+\DeclareTextSymbolDefault{\textalpha}{LGR}
+\DeclareTextSymbolDefault{\textbeta}{LGR}
+\DeclareTextSymbolDefault{\textgamma}{LGR}
+\DeclareTextSymbolDefault{\textdelta}{LGR}
+\DeclareTextSymbolDefault{\textepsilon}{LGR}
+\DeclareTextSymbolDefault{\textzeta}{LGR}
+\DeclareTextSymbolDefault{\texteta}{LGR}
+\DeclareTextSymbolDefault{\texttheta}{LGR}
+\DeclareTextSymbolDefault{\textiota}{LGR}
+\DeclareTextSymbolDefault{\textkappa}{LGR}
+\DeclareTextSymbolDefault{\textlambda}{LGR}
+\DeclareTextSymbolDefault{\textmu}{LGR}
+\DeclareTextSymbolDefault{\textnu}{LGR}
+\DeclareTextSymbolDefault{\textxi}{LGR}
+\DeclareTextSymbolDefault{\textomicron}{LGR}
+\DeclareTextSymbolDefault{\textpi}{LGR}
+\DeclareTextSymbolDefault{\textrho}{LGR}
+\DeclareTextSymbolDefault{\textsigma}{LGR}
+\DeclareTextSymbolDefault{\textvarsigma}{LGR}
+\DeclareTextSymbolDefault{\textfinalsigma}{LGR} % alias for \textvarsigma
+\DeclareTextSymbolDefault{\textautosigma}{LGR}  % char 115 in LGR
+\DeclareTextSymbolDefault{\texttau}{LGR}
+\DeclareTextSymbolDefault{\textupsilon}{LGR}
+\DeclareTextSymbolDefault{\textphi}{LGR}
+\DeclareTextSymbolDefault{\textchi}{LGR}
+\DeclareTextSymbolDefault{\textpsi}{LGR}
+\DeclareTextSymbolDefault{\textomega}{LGR}
+
+
+

Additional Greek symbols

+

Including alias names for compatibility with hyperref’s puenc.def.

+

Ancient Greek Numbers (Athenian Numerals):

+
\DeclareTextSymbolDefault{\textpentedeka}{LGR}    % GREEK ACROPHONIC ATTIC FIFTY
+\DeclareTextSymbolDefault{\textpentehekaton}{LGR} % GREEK ACROPHONIC ATTIC FIVE HUNDRED
+\DeclareTextSymbolDefault{\textpenteqilioi}{LGR}  % GREEK ACROPHONIC ATTIC FIVE THOUSAND
+\DeclareTextSymbolDefault{\textpentemurioi}{LGR}  % GREEK ACROPHONIC ATTIC FIFTY THOUSAND
+

Archaic letters:

+
\DeclareTextSymbolDefault{\textstigma}{LGR}      % ϛ
+\DeclareTextSymbolDefault{\textstigmagreek}{LGR} % ϛ (puenc.def)
+\DeclareTextSymbolDefault{\textvarstigma}{LGR}   % stigma variant
+\DeclareTextSymbolDefault{\textkoppa}{LGR}       % ϟ (greek small letter koppa)
+\DeclareTextSymbolDefault{\textkoppagreek}{LGR}  % ϟ (puenc.def)
+\DeclareTextSymbolDefault{\textqoppa}{LGR}       % ϙ (archaic koppa)
+\DeclareTextSymbolDefault{\textQoppa}{LGR}       % Ϙ (archaic Koppa)
+\DeclareTextSymbolDefault{\textStigma}{LGR}      % Ϛ ϹΤ ligature in some fonts
+\DeclareTextSymbolDefault{\textStigmagreek}{LGR} % Ϛ (puenc.def)
+\DeclareTextSymbolDefault{\textSampi}{LGR}       % Ϡ
+\DeclareTextSymbolDefault{\textSampigreek}{LGR}  % Ϡ (puenc.def)
+\DeclareTextSymbolDefault{\textsampi}{LGR}       % ϡ
+\DeclareTextSymbolDefault{\textsampigreek}{LGR}  % ϡ (puenc.def)
+\DeclareTextSymbolDefault{\textanoteleia}{LGR}   % ·
+\DeclareTextSymbolDefault{\texterotimatiko}{LGR} % ; (003B is the preferred character)
+\DeclareTextSymbolDefault{\textdigamma}{LGR}     % ϝ
+\DeclareTextSymbolDefault{\textDigamma}{LGR}     % Ϝ
+\DeclareTextSymbolDefault{\textdigammagreek}{LGR} % ϝ (puenc.def)
+\DeclareTextSymbolDefault{\textDigammagreek}{LGR} % Ϝ (puenc.def)
+

numeral signs: http://en.wikipedia.org/wiki/Greek_numerals

+
\DeclareTextSymbolDefault{\textnumeralsigngreek}{LGR}      % (puenc.def)
+\DeclareTextSymbolDefault{\textnumeralsignlowergreek}{LGR} % (puenc.def)
+
+

variant shape symbols

+

Mathematical notation uses variant shapes of some Greek letters as +additional symbols. There are separate code points for the symbol variants +in Unicode but not in the LGR font encoding used for Greek in 8-bit TeX. +The variations have no syntactic meaning in Greek text.

+
\DeclareTextSymbolDefault{\textbetasymbol}{LGR}    % ϐ GREEK BETA SYMBOL
+\DeclareTextSymbolDefault{\textthetasymbol}{LGR}   % ϑ $\vartheta$ GREEK THETA SYMBOL
+\DeclareTextSymbolDefault{\textphisymbol}{LGR}     % ϕ $\phi$ GREEK PHI SYMBOL
+\DeclareTextSymbolDefault{\textpisymbol}{LGR}      % ϖ $\varpi$ GREEK PI SYMBOL
+\DeclareTextSymbolDefault{\textkappasymbol}{LGR}   % ϰ GREEK KAPPA SYMBOL
+\DeclareTextSymbolDefault{\textrhosymbol}{LGR}     % ϱ $\varrho$ GREEK RHO SYMBOL
+\DeclareTextSymbolDefault{\textThetasymbol}{LGR}   % ϴ GREEK CAPITAL THETA SYMBOL
+\DeclareTextSymbolDefault{\textepsilonsymbol}{LGR} % ϵ $\epsilon$ GREEK LUNATE EPSILON SYMBOL
+

Define compatibility mappings if the normalize-symbols option is set:

+
\iftextalpha@normalizeSymbols
+  \DeclareTextCommand{\textbetasymbol}   {LGR}{\textbeta}
+  \DeclareTextCommand{\textthetasymbol}  {LGR}{\texttheta}
+  \DeclareTextCommand{\textphisymbol}    {LGR}{\textphi}
+  \DeclareTextCommand{\textpisymbol}     {LGR}{\textpi}
+  \DeclareTextCommand{\textkappasymbol}  {LGR}{\textkappa}
+  \DeclareTextCommand{\textrhosymbol}    {LGR}{\textrho}
+  \DeclareTextCommand{\textThetasymbol}  {LGR}{\textTheta}
+  \DeclareTextCommand{\textepsilonsymbol}{LGR}{\textepsilon}
+\fi
+
+
+
+

Diacritics

+

Greek diacritics via “named” macros:

+
\DeclareTextAccentDefault{\accdasia}{LGR}
+\DeclareTextAccentDefault{\accpsili}{LGR}
+\DeclareTextAccentDefault{\acctonos}{LGR}
+\DeclareTextAccentDefault{\accvaria}{LGR}
+\DeclareTextAccentDefault{\accperispomeni}{LGR}
+\DeclareTextAccentDefault{\accdialytika}{LGR}
+%
+\DeclareTextAccentDefault{\accdasiaoxia}{LGR}
+\DeclareTextAccentDefault{\accdasiavaria}{LGR}
+\DeclareTextAccentDefault{\accdasiaperispomeni}{LGR}
+\DeclareTextAccentDefault{\accpsilioxia}{LGR}
+\DeclareTextAccentDefault{\accpsilivaria}{LGR}
+\DeclareTextAccentDefault{\accpsiliperispomeni}{LGR}
+\DeclareTextAccentDefault{\accdialytikatonos}{LGR}
+\DeclareTextAccentDefault{\accdialytikavaria}{LGR}
+\DeclareTextAccentDefault{\accdialytikaperispomeni}{LGR}
+

Symbol macros for the breathings:

+
\DeclareTextAccentDefault{\<}{LGR}
+\DeclareTextAccentDefault{\>}{LGR}
+

Postfix accents:

+
\DeclareTextSymbolDefault{\ypogegrammeni}{LGR} % "small" sub-iota
+\DeclareTextSymbolDefault{\prosgegrammeni}{LGR}  % "capital" sub-iota
+

Other accents in LGR:

+
\DeclareTextAccentDefault{\accinvertedbrevebelow}{LGR} % INVERTED BREVE BELOW
+\DeclareTextAccentDefault{\textsubarch}{LGR}           % tipa, Teubner name: ut
+\DeclareTextAccentDefault{\accbrevebelow}{LGR}         % BREVE BELOW
+
+
+

Auxiliary macros

+

\MakeUppercase requires four internal commands:

+
\DeclareTextAccentDefault{\LGR@accdropped}{LGR}
+\DeclareTextAccentDefault{\LGR@accDialytika}{LGR}
+\DeclareTextAccentDefault{\LGR@hiatus}{LGR}
+\DeclareTextSymbolDefault{\LGR@ypogegrammeni}{LGR}
+
+
+

semicolon as erotimatiko

+

The text command \textsemicolon inserts \texterotimatiko +in LGR font encoding and a “normal” semicolon else:

+
\ProvideTextCommandDefault{\textsemicolon}{;}
+\ProvideTextCommand{\textsemicolon}{LGR}{\texterotimatiko}
+

The LGR font encoding maps “;” to a middle dot (ano teleia). With the +keep-semicolon option, the semicolon is made an active character and calls +\textsemicolon:

+
\iftextalpha@keepSemicolon
+  \catcode`;=\active
+  \newcommand{;}{\textsemicolon}
+\fi
+ +
+
+
+
+ + -- cgit v1.2.3