diff options
author | Karl Berry <karl@freefriends.org> | 2015-09-05 22:00:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-09-05 22:00:16 +0000 |
commit | 62cb48658056cee12fac2741b88adac4d664851e (patch) | |
tree | a06a15d042d5db480314b5a436d63ca3e02a2c0e /Master/texmf-dist/doc/latex/greek-fontenc/README | |
parent | b87d035e26c6d72bc073ee6a6cf5459e444afbd2 (diff) |
greek-fontenc (4sep15)
git-svn-id: svn://tug.org/texlive/trunk@38297 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/greek-fontenc/README')
-rw-r--r-- | Master/texmf-dist/doc/latex/greek-fontenc/README | 282 |
1 files changed, 181 insertions, 101 deletions
diff --git a/Master/texmf-dist/doc/latex/greek-fontenc/README b/Master/texmf-dist/doc/latex/greek-fontenc/README index 784744d2720..ac269077d6e 100644 --- a/Master/texmf-dist/doc/latex/greek-fontenc/README +++ b/Master/texmf-dist/doc/latex/greek-fontenc/README @@ -15,9 +15,11 @@ Greek font encoding definition files under both, 8-bit TeX and XeTeX/LuaTeX. Use cases are macro definitions and generated text - This package provides Greek LICR macro definitions and encoding + This package provides `Greek LICR macros`_ and encoding definition files for `Greek text font encodings`_ for use with - fontenc_. + 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. @@ -53,6 +55,12 @@ News 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``. ====== =========== ========================================================== @@ -62,26 +70,33 @@ TeX files `<greek-fontenc.def>`_ `Common Greek font encoding definitions <greek-fontenc.def.html>`_. +.. _LGR font encoding definition file: + `<lgrenc.def>`_ `LGR Greek font encoding definitions <lgrenc.def.html>`_. This file is the successor of the basic LGR encoding definition file which - comes with babel_'s Greek support and ``lgrxenc.def`` from the lgrx_ - bundle. + comes with babel_'s Greek support and of ``lgrxenc.def`` from the now + obsolete lgrx_ bundle. + + .. _textalpha: `<textalpha.sty>`_ `Greek symbols in text <textalpha.sty.html>`_ independent of font encoding and TeX engine. + .. _alphabeta: + `<alphabeta.sty>`_ Generic macros for `Greek symbols in text and math <alphabeta.sty.html>`_. `<alphabeta-euenc.def>`_ - `Composite defintions for alphabeta.sty_ with XeTeX/LuaTeX. - <alphabeta-euenc.def.html>`_ + `Composite definitions with XeTeX/LuaTeX. <alphabeta-euenc.def.html>`_. + .. _greek-euenc: + `<greek-euenc.def>`_ - `Greek LICR definitions for XeTeX and LuaTeX <greek-euenc.def.html>`_. + `Font setup for Greek with XeTeX/LuaTeX <greek-euenc.def.html>`_. Requires euenc_. Literate source files were converted with PyLit_ to reStructuredText_ and @@ -101,7 +116,7 @@ Documentation and test documents Test and usage example. `<greek-euenc-doc.tex>`_, `<greek-euenc-doc.pdf>`_ - Example for use of the experimental Greek LICR definitions with XeTeX or + Example for use of the Greek LICR definitions with XeTeX or LuaTeX. `<greekhyperref.tex>`_, `<greekhyperref.pdf>`_ @@ -129,25 +144,42 @@ manager. Otherwise, make sure LaTeX can find the package and definition files: -* Download and unpack ``greek-fontenc.zip``. +* Download and unpack greek-fontenc.zip_. * Copy/Move/Link files ending in ``.def`` or ``.sty`` to a suitable place in - the TDS_ and run ``texhash``, or place them in the current working - directory (e.g. for testing). + the “TeX Directory Structure” (TDS_) and run ``texhash``, or place them in + the current working directory (e.g. for testing). + Usage ===== There are many alternatives to use the Greek font encoding setup -provided by this package/bundle, e.g.: +provided by this package, e.g.: -* Ensure Greek support in text mode with `textalpha`:: +* Ensure support for Greek characters in text mode with textalpha_ :: \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). + + .. _normalize-symbols: textalpha.sty.html#normalize-symbols + .. _keep-semicolon: textalpha.sty.html#keep-semicolon + .. _semicolon as erotimatiko: textalpha.sty.html#semicolon-as-erotimatiko * To use the short macro names (``\alpha`` ... ``\Omega``) known from math mode in both, text and math mode, write :: @@ -156,31 +188,44 @@ provided by this package/bundle, e.g.: For details see `<alphabeta-doc.tex>`_ and `<alphabeta-doc.pdf>`_. -* Use the ``greek`` option with Babel_ (requires babel-greek_):: +* 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_. + * 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 + 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. -* LGR encoded fonts can also be used alongside Unicode fonts with - XeTeX/LuaTeX to enable the input of Greek letters via the Latin - transcription provided by this font encoding. - See `<greek-euenc-doc.tex>`_ -> `<greek-euenc-doc.pdf>`_ and - `<lgrenc-test.tex>`_ -> `<lgrenc-test.pdf>`_. +* 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>`_. 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 EU1 (XeTeX), EU2 (LuaTeX) and PU (hyperref_). +encodings EU1_ , EU2_ and PU (hyperref_). T7 -- @@ -195,11 +240,15 @@ LGR --- The LGR font encoding is the de-facto standard for typesetting Greek with -(8-bit) LaTeX. Fonts in this encoding include the `CB fonts`_ (matching CM), +(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), and the `GFS font collection`_. 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 @@ -223,63 +272,69 @@ 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). +EU1 +--- + +Unicode font encoding set up by euenc_ for XeTeX and indirectly loaded by +fontspec_. `greek-fontenc` adds support for the Greek script (see +greek-euenc_). + +EU2 +--- + +Unicode font encoding set up by euenc_ for XeTeX and indirectly loaded by +fontspec_. `greek-fontenc` adds support for the Greek script (see +greek-euenc_). -Greek LICR macro names -====================== +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: -The fntguide_ (section 6.4 Naming conventions) recommends: +letters and symbols +------------------- - Where possible, text symbols should be named as ``\text`` followed - by the Adobe glyph name: for example ``\textonequarter`` or - ``\textsterling``. Similarly, math symbols should be named as - ``\math`` followed by the glyph name, for example - ``\mathonequarter`` or ``\mathsterling``. +* The fntguide_ (section 6.4 Naming conventions) recommends: -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. As these are not intened for further active use, the latter are not -considered in the name choice. + 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``. -Proposals ---------- + 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, form the corresponding text - macro by prepending ``text``? +* 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 could be - made available as ``\textvarsigma``. - - Problems: - ``\varepsilon`` and ``\varphi`` math macros map to characters named - "GREEK SMALL **LETTER** ...", while ``\\vartheta``, ``\\varkappa``, - ``\\varrho``, and ``\\varpi`` math macros map to "GREEK ... **SYMBOL**" - Unicode characters. - - In Greek text, these variants are interchangeable. The LGR font encoding - does not contain slots for "symbol" glyph variants. In some Greek fonts, - GREEK SMALL LETTERS use glyph variants resembling the corresponding - GREEK SYMBOL Unicode character's reference glyph. - -* Derive macro names from Unicode names? - - The `Unicode names list`_ provides standardized descriptive names for all + 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 a LICR macros, they can be either - - a) used as inspiration for new LICR macro names or + While not suited for direct use in LICR macros, they can be either - b) converted to LICR macro names via a defined set of transformation rules. + 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`` or just ``\finalsigma`` as a more descriptive name - for GREEK SMALL LETTER FINAL SIGMA derived via the rules: + ``\textfinalsigma`` is a descriptive alias for + GREEK SMALL LETTER FINAL SIGMA derived via the rules: * drop "LETTER" if the name remains unique, * drop "GREEK" if the name remains unique, @@ -291,41 +346,28 @@ Proposals Pro: + Simpler, - + ease of use (less typing, better readability of source text), - + many established text macro names without "text", - - + there are examples of encoding-specific macros - without the ``text``-prefix, especially for letters, - - :T1: ``\AE \DH \DJ \L \NG \OE \O \SS \TH \ae \dh \dj \guillemotleft`` - ``\guillemotright \guilsinglleft \guilsinglright \i \j \l \ng`` - ``\oe \o \quotedblbase \quotesinglbase \ss \th`` (also in OT1) - :T2*: ``\CYR*`` and ``\cyr*`` - :HE8: ``\heb*`` or no prefix - :PU: short descriptive names in the arabic part (``puarenc.def``) - + ``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. - + - Less consistent, + - possible name clashes - ``text`` prefix marks a macro as confined to text (as opposed to math) - mode. + mode, - Conclusion: - To avoid name clashes, the font encoding definition files use the - ``text`` prefix for symbols. Aliases (short forms, compatibility defs, - etc.) can be defined locally or in additional packages (see - alphabeta.sty_, `babel-greek`_, or teubner_) + 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_) -How to name *accent macros*? ----------------------------- +accent macros +------------- * standard accent macros (``\DeclareTextAccent`` definitions in ``latex/base/...``) are one-symbol macros (``\' \" ... \u \v ...``) . @@ -333,24 +375,58 @@ How to name *accent macros*? * ``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 0384 GREEK TONOS and 0385 GREEK DIALYTIKA TONOS, hence - `\texttonos` and `\textdiaresistonos` should be spacing characters. + "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). -* Use a common prefix ``\textaccent...``, ``\accent...``, - or just ``\acc...`` (cf. ``\@tabacckludge``)? - Currently, `greek-fontenc` uses for diacritics: -- Greek names like in Unicode, and ucsencs.def +- 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``). -- The prefix "acc" to distinguish the macros as `TextAaccent` and reduce the - risc of name clashes. +For the end-user "symbol macros" (``\~ \' \` \" \< \> \"' ...``) are +provided. (The non-standard macros ``\<`` and ``\>`` only with +textalpha_ or alphabeta_.) -- For the end-user "symbol macros" (``\~ \' \` \" \< \>``) are provided. - (The non-standard macros ``\<`` and ``\>`` only with textalpha.sty_.) + +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 @@ -360,7 +436,7 @@ 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 +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. @@ -391,26 +467,28 @@ as-is). http://www.eutypon.gr/eutypon/pdf/e2008-20/e20-a03.pdf .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt -.. _PyLit: http://pylit.berlios.de +.. _PyLit: http://repo.or.cz/pylit.git .. _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://www.adobe.com/devnet-archive/opentype/archives/aglfn.txt + http://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/aglfn.txt .. _Adobe Glyph List: - http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt + 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 .. _GFS font collection: http://www.ctan.org/pkg/gfs .. _Kerkis: http://www.ctan.org/pkg/kerkis +.. _amssymb: http://www.ctan.org/pkg/amsfonts .. _babel: http://www.ctan.org/pkg/babel .. _babel-greek: http://www.ctan.org/pkg/babel-greek .. _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 @@ -419,5 +497,7 @@ as-is). .. _libertine: http://www.ctan.org/pkg/libertine-legacy .. _substitutefont: http://www.ctan.org/pkg/substitutefont .. _teubner: http://www.ctan.org/pkg/teubner +.. _unicode-math: http://www.ctan.org/pkg/unicode-math .. _ucs: http://www.ctan.org/pkg/unicode +.. _xgreek: http://www.ctan.org/pkg/xgreek .. _xunicode: http://www.ctan.org/pkg/xunicode |