diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lgrx/textalpha.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lgrx/textalpha.sty | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lgrx/textalpha.sty b/Master/texmf-dist/tex/latex/lgrx/textalpha.sty new file mode 100644 index 00000000000..af13546602b --- /dev/null +++ b/Master/texmf-dist/tex/latex/lgrx/textalpha.sty @@ -0,0 +1,166 @@ +% 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 letters +% outside math. +% +% :Identification: +% :: + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{textalpha} +[2010/08/04 v0.1 macros for Greek letters in text] + +% Changelog: +% .. class:: borderless +% +% ========== ===== ========================================================= +% 2010-06-16 0.1 initial version +% ========== ===== ========================================================= +% +% Motivation +% ========== +% +% By default, the ``\alpha`` -- ``\Omega`` macros for Greek letters +% +% * are only valid in mathematical mode +% +% * do not change shape (default shape is italic) +% +% In Greek text fonts with the LGR font encoding, letters are +% accessible by a Latin transcription. +% +% This package provides a set of macros that can be used to access Greek +% symbols from a font in LGR encoding (e.g. the `CB fonts`_) without the +% need for an explicite font-encoding switch. +% +% The macro names follow the established scheme to prepend ``\text*`` to +% the Adobe glyph name (if it exists) or the corresponding math-macro, so +% ``\textalpha`` -- ``\textOmega`` prints α – Ω. +% +% * In combination with the ``\text`` macro from amsmath, this can be +% used to get matching upright and bold upright Greek symbols in math +% as well. +% +% * In combination with ``\usepackage[utf8]{inputenc}`` and the +% accompanying ``lgrenc.dfu`` file, Unicode input of Greek characters +% is supported. +% +% This is done using NFSS default definitions as explained in the +% fntguide_ (section 5.3). +% +% Attention +% While the macros work reasonably well for single letters, the +% automatic font-encoding switches behind the doors destroy the +% kerning between the letters. +% +% Text composites (replacement of accent+character with a pre-composed +% character) work in LGR, but not in other encodings (due to the +% forth-and-back font encoding switch). +% +% Therefore, Greek text should be written with the help of babel_, +% setting the language to either ``greek`` or ``polutonikogreek``. +% +% +% Implementation +% ============== +% +% This package requires the extended font encoding definitions:: + +\input{lgrxenc.def} + + +% 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{\texttau}{LGR} +\DeclareTextSymbolDefault{\textupsilon}{LGR} +\DeclareTextSymbolDefault{\textphi}{LGR} +\DeclareTextSymbolDefault{\textchi}{LGR} +\DeclareTextSymbolDefault{\textpsi}{LGR} +\DeclareTextSymbolDefault{\textomega}{LGR} + +% Diacritics +% ---------- +% +% Diacritics are defined via "named" macros in ``lgrxenc.def``. Make them +% default in any encoding:: + +\DeclareTextAccentDefault{\Dasia}{LGR} +\DeclareTextAccentDefault{\Psili}{LGR} +\DeclareTextAccentDefault{\Tonos}{LGR} +\DeclareTextAccentDefault{\Varia}{LGR} +\DeclareTextAccentDefault{\Perispomeni}{LGR} +\DeclareTextAccentDefault{\Dialytika}{LGR} +\DeclareTextAccentDefault{\<}{LGR} +\DeclareTextAccentDefault{\>}{LGR} +% +\DeclareTextAccentDefault{\DasiaOxia}{LGR} +\DeclareTextAccentDefault{\DasiaVaria}{LGR} +\DeclareTextAccentDefault{\DasiaPerispomeni}{LGR} +\DeclareTextAccentDefault{\PsiliOxia}{LGR} +\DeclareTextAccentDefault{\PsiliVaria}{LGR} +\DeclareTextAccentDefault{\PsiliPerispomeni}{LGR} +\DeclareTextAccentDefault{\DialytikaTonos}{LGR} +\DeclareTextAccentDefault{\DialytikaVaria}{LGR} +\DeclareTextAccentDefault{\DialytikaPerispomeni}{LGR} + + + +% .. References +% ---------- +% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +% .. _babel: http://www.ctan.org/cgi-bin/ctanPackageInformation.py?id=babel +% .. _fntguide: http://www.ctan.org/tex-archive/macros/latex/doc/fntguide.pdf +% .. _CB fonts: http://www.ctan.org/pkg/cbgreek-complete |