summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-13 22:08:33 +0000
committerKarl Berry <karl@freefriends.org>2013-09-13 22:08:33 +0000
commit85c6a8aa9952fa244dac588d1e2a036ecd7ca772 (patch)
tree6e994248b566a58d83b1ac450e5fcd34f6401fa5 /Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html
parent55ecfa6fbf846c1437ea75881c6fead2cf945736 (diff)
greek-fontenc (13sep13)
git-svn-id: svn://tug.org/texlive/trunk@31645 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html')
-rw-r--r--Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html358
1 files changed, 358 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html b/Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html
new file mode 100644
index 00000000000..49876aeabe7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/greek-fontenc/textalpha.sty.html
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
+<title>textalpha: Greek symbols in text</title>
+<meta name="copyright" content="© 2010 Günter Milde" />
+<link rel="stylesheet" href="../../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css1.css" type="text/css" />
+<link rel="stylesheet" href="../../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css2.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="textalpha-greek-symbols-in-text">
+<h1 class="title">textalpha: Greek symbols in text</h1>
+
+<dl class="docinfo">
+<dt class="copyright">Copyright</dt>
+<dd class="copyright">© 2010 Günter Milde</dd>
+<dt>Licence</dt>
+<dd><p>This work may be distributed and/or modified under the
+conditions of the <a class="reference external" href="http://www.latex-project.org/lppl.txt">LaTeX Project Public License</a>, either
+version&nbsp;1.3 of this license or any later version.</p>
+</dd>
+<dt>Identification</dt>
+<dd><pre class="literal-block">\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{textalpha}
+[2013/09/11 v0.5 macros for Greek letters in text]
+</pre>
+</dd>
+</dl>
+<div class="abstract topic">
+<p class="topic-title first">Abstract</p>
+<p>Provide a set of <tt class="literal">\text*</tt> macros for Greek letters
+outside math.</p>
+</div>
+<div class="note">
+<p class="admonition-title">Note</p>
+<p>The package was renamed from <cite>textgreek</cite> to <cite>textalpha</cite> to prevent
+confusion with the <a class="reference external" href="http://www.ctan.org/pkg/textgreek">textgreek</a> package by Leonard Michlmayr.</p>
+</div>
+<dl class="docutils">
+<dt>Changelog:</dt>
+<dd><table class="borderless">
+<colgroup>
+<col width="14%" />
+<col width="7%" />
+<col width="79%" />
+</colgroup>
+<tbody>
+<tr><td><p>2010-06-16</p></td>
+<td><p>0.1</p></td>
+<td><p>initial version</p></td>
+</tr>
+<tr><td><p>2012-06-27</p></td>
+<td><p>0.2</p></td>
+<td><p>support for compound Unicode definitions outside LGR</p></td>
+</tr>
+<tr><td><p>2013-05-03</p></td>
+<td><p>0.3</p></td>
+<td><p>new accent macro names with <tt class="literal">lgrxenc.def</tt> 0.7</p></td>
+</tr>
+<tr><td><p>2013-05-28</p></td>
+<td><p>0.4</p></td>
+<td><p>use <tt class="literal">lgrenc.def</tt> from greek-fontenc.</p></td>
+</tr>
+<tr><td><p>2013-09-11</p></td>
+<td><p>0.5</p></td>
+<td><p>move to <a class="reference external" href="http://www.ctan.org/pkg/greek-fontenc">greek-fontenc</a>,</p></td>
+</tr>
+<tr><td><!-- -->
+</td>
+<td>&nbsp;</td>
+<td><p>support XeTeX/LuaTeX, add breve below accents.</p></td>
+</tr>
+</tbody>
+</table>
+</dd>
+</dl>
+<div class="section" id="motivation">
+<h1>Motivation</h1>
+<p>By default, TeX macros for Greek letters are only valid in mathematical
+mode. This package sets up a suitable font encoding and Greek LICR
+definitions (<tt class="literal">\textalpha</tt> – <tt class="literal">\textOmega</tt>).</p>
+<p>To allow documents using Greek LICR macros without worrying about the TeX
+engine used to compile them, this package does a simple test (based on the
+<tt class="literal">\ifdefined</tt> command provided by the <a class="reference external" href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=etex">e-TeX</a> extension) and does “the right
+thing” to set up Greek text font support for the detected engine.</p>
+<p>For 8-bit TeX, this package also declares the LGR font encoding as default
+for Greek LICR macros (cf. <a class="reference external" href="http://www.ctan.org/tex-archive/macros/latex/doc/fntguide.pdf">fntguide</a> section 5.3):</p>
+<ul class="simple">
+<li><p>Symbols from a Greek text font (e.g. the <a class="reference external" href="http://www.ctan.org/pkg/cbgreek-complete">CB fonts</a>) can be accessed
+without the need for an explicite font-encoding switch.</p></li>
+<li><p>In combination with <tt class="literal"><span class="pre">\usepackage[utf8]{inputenc}</span></tt> and <tt class="literal">lgrenc.dfu</tt>
+from <a class="reference external" href="http://www.ctan.org/pkg/greek-inputenc">greek-inputenc</a>, Unicode input of Greek characters is supported in
+any font encoding.</p></li>
+</ul>
+<div class="attention">
+<p class="admonition-title">Attention!</p>
+<p>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.</p>
+<p>Therefore, Greek text should be written with the help of <a class="reference external" href="http://www.ctan.org/pkg/babel">babel</a> or
+<a class="reference external" href="http://www.ctan.org/pkg/polyglossia">polyglossia</a> (setting the language to <tt class="literal">greek</tt>) or wrapped in the
+provided <tt class="literal">ensuregreek</tt> macro. Using <a class="reference external" href="http://www.ctan.org/pkg/babel">babel</a> or <a class="reference external" href="http://www.ctan.org/pkg/polyglossia">polyglossia</a> also helps
+to ensure proper hyphenation.</p>
+</div>
+</div>
+<div class="section" id="usage">
+<h1>Usage</h1>
+<pre class="code latex literal-block"><span class="keyword">\usepackage</span><span class="name builtin">{</span>textalpha<span class="name builtin">}</span>
+</pre>
+<p>For details see <a class="reference external" href="textalpha-test.tex">textalpha-test.tex</a> and <a class="reference external" href="textalpha-test.pdf">textalpha-test.pdf</a> (8-bit
+TeX) as well as <a class="reference external" href="test-euenc.tex">test-euenc.tex</a> and <a class="reference external" href="test-euenc.pdf">test-euenc.pdf</a> (XeTeX/LuaTeX).</p>
+</div>
+<div class="section" id="implementation">
+<h1>Implementation</h1>
+<div class="section" id="requirements">
+<h2>Requirements</h2>
+<p>With XeTeX or LuaTeX, there is one common input and font encoding –
+Unicode. 8-bit TeX&nbsp;font&nbsp;encodings should generally not be used. For
+compatibility with the LaTeX font selection system, the package <a class="reference external" href="http://www.ctan.org/pkg/euenc">euenc</a>
+defines the (pseudo) font encodings EU1 and EU2 for XeTeX and LuaTeX
+respectively. However euenc does not (yet) define LICR macros. We therefore
+explicitely load Greek LICR definitions for XeTeX/LuaTeX from <a class="reference external" href="http://www.ctan.org/pkg/greek-fontenc">greek-fontenc</a>.</p>
+<div class="section" id="xetex">
+<h3>XeTeX</h3>
+<p>Use the EU1 font encoding. This is the only font encoding used with XeTeX,
+so loading it with <a class="reference external" href="http://www.ctan.org/pkg/fontenc">fontenc</a> cannot mix up the default font encoding:</p>
+<pre class="literal-block">\ifdefined\XeTeXrevision
+ \usepackage[EU1]{fontenc}
+</pre>
+<p>Load the Greek LICR definitions for XeTeX/LuaTeX. In an ideal world, this
+should be done in the eu1enc.def file of the <a class="reference external" href="http://www.ctan.org/pkg/euenc">euenc</a> package.</p>
+<p>Before that, we must ensure EU1 is the <tt class="literal">\LastDeclaredEncoding</tt>: Beacause
+fontenc loads font encoding definition files only once, it may happen that
+another font encoding is defined after EU1 — for example <a class="reference external" href="http://www.ctan.org/pkg/fontspec">fontspec</a>
+declares EU1 but leaves <tt class="literal">\LastDeclaredEncoding</tt> at <tt class="literal">T3</tt> (tipa), because
+it later inputs the <a class="reference external" href="http://www.ctan.org/pkg/xunicode">xunicode</a> package which in turn loads <tt class="literal">t3enc.def</tt>.</p>
+<pre class="literal-block">\renewcommand{\LastDeclaredEncoding}{EU1}
+\input{greek-euenc.def}
+</pre>
+<p>No other action is required with Unicode-aware TeX engines:</p>
+<pre class="literal-block"> \expandafter\endinput % &quot;return&quot;
+\fi
+</pre>
+</div>
+<div class="section" id="luatex">
+<h3>LuaTeX</h3>
+<p>Similar actions to XeTeX, but use the font encoding EU2:<a class="footnote-reference" href="#eu" id="id1"><sup>1</sup></a></p>
+<pre class="literal-block">\ifdefined\luatexversion
+ \usepackage[EU2]{fontenc}
+ \renewcommand{\LastDeclaredEncoding}{EU2}
+ \input{greek-euenc.def}
+ \expandafter\endinput % &quot;return&quot;
+\fi
+</pre>
+<dl class="footnote"><dt class="label"><a class="fn-backref" href="#id1">1</a></dt>
+<dd id="eu">
+<p class="first last">The two different (pseudo) font encodings allow different font setups for
+XeTeX vs. LuaTeX using differently named <tt class="literal">*.fd</tt> files (see <a class="reference external" href="http://www.ctan.org/pkg/euenc">euenc</a> for
+details).</p>
+</dd>
+</dl>
+</div>
+<div class="section" id="bit-tex">
+<h3>8-bit TeX</h3>
+<p>With 8-bit TeX, you usually pass the font encoding name(s) as option to
+<a class="reference external" href="http://www.ctan.org/pkg/fontenc">fontenc</a> which then loads the corresponding <tt class="literal">*.def</tt> file(s). The last
+option indicates the document’s default font encoding. (See <a class="citation-reference" href="#" id="id2">[fntguide]</a> for
+details and <a class="reference external" href="lgrenc-test.tex">lgrenc-test.tex</a> for an example.) Therefore, we do not know
+the documents main font encoding and hence cannot use
+<tt class="literal"><span class="pre">\usepackage[LGR]{inputenc}</span></tt>. We load <tt class="literal">lgrenc.def</tt> directly, if it is
+not already done and re-set <tt class="literal">\LastDeclaredEncoding</tt> else.</p>
+<div class="note">
+<p class="admonition-title">Note</p>
+<p>The use of <tt class="literal">\&#64;ifundefined</tt> has the side-effect that the tested
+macro becomes defined and set to <tt class="literal">\relax</tt> (polluting the namespace and
+interfering with tests via eTeX’s <tt class="literal">\ifdefined</tt>). However, in this case
+no harm is done as the macro is defined by <tt class="literal">lgrenc.def</tt> anyway.</p>
+</div>
+<pre class="literal-block">\&#64;ifundefined{ver&#64;lgrenc.def}
+ {\input{lgrenc.def}}
+ {\renewcommand{\LastDeclaredEncoding}{EU1}}
+</pre>
+</div>
+</div>
+<div class="section" id="default-declarations">
+<h2>Default declarations</h2>
+<p>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.</p>
+<div class="section" id="ensuregreek">
+<h3>ensuregreek</h3>
+<p>The <tt class="literal">\ensuregreek</tt> command can be used to ensure that its argument is set in
+a font encoding with support for Greek. We define LGR as default encoding for
+Greek text:</p>
+<pre class="literal-block">\DeclareTextCommandDefault{\ensuregreek}[1]{{\fontencoding{LGR}\selectfont #1}}
+</pre>
+<!-- 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 `<textalpha-test.tex>`__:
+
+ ``! You can't use a prefix with `end-group character }'.`` -->
+<p>Eventually, all font encodings supporting Greek script (e.g. LGI, PU, EU1,
+EU2) will declare <tt class="literal">\ensuregreek</tt> as text command that passes the argument
+unchanged. This way, kerning and selection of precomposed glyphs would work
+also for cases like <tt class="literal"><span class="pre">\ensuregreek{\'A}U</span></tt>.</p>
+<!-- Do this for PU here? ``\DeclareTextCommand{\ensuregreek}{PU}[1]{#1}``
+
+Can lead to infinite recursion (``TeX capacity exeeded``) without the
+``unicode=true`` hyperref option.
+(How about a test whether the PU font encoding is defined?). -->
+</div>
+<div class="section" id="greek-alphabet">
+<h3>Greek Alphabet</h3>
+<p>Define the <tt class="literal">text*</tt> marcos as default for all font encodings:</p>
+<pre class="literal-block">\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}
+</pre>
+<div class="section" id="additional-greek-symbols">
+<h4>Additional Greek symbols</h4>
+<p>Including alias names for compatibility with hyperref’s puenc.def.</p>
+<p>Ancient Greek Numbers (Athenian Numerals):</p>
+<pre class="literal-block">\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
+</pre>
+<p>Archaic letters:</p>
+<pre class="literal-block">\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)
+</pre>
+<p>numeral signs: <a class="reference external" href="http://en.wikipedia.org/wiki/Greek_numerals">http://en.wikipedia.org/wiki/Greek_numerals</a></p>
+<pre class="literal-block">\DeclareTextSymbolDefault{\textnumeralsigngreek}{LGR} % (puenc.def)
+\DeclareTextSymbolDefault{\textnumeralsignlowergreek}{LGR} % (puenc.def)
+</pre>
+</div>
+</div>
+<div class="section" id="diacritics">
+<h3>Diacritics</h3>
+<p>Greek diacritics via “named” macros:</p>
+<pre class="literal-block">\DeclareTextAccentDefault{\accdasia}{LGR}
+\DeclareTextAccentDefault{\accpsili}{LGR}
+\DeclareTextAccentDefault{\acctonos}{LGR}
+\DeclareTextAccentDefault{\accvaria}{LGR}
+\DeclareTextAccentDefault{\accperispomeni}{LGR}
+\DeclareTextAccentDefault{\accdialytika}{LGR}
+\DeclareTextAccentDefault{\&lt;}{LGR}
+\DeclareTextAccentDefault{\&gt;}{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}
+</pre>
+<p>Postfix accents:</p>
+<pre class="literal-block">\DeclareTextSymbolDefault{\ypogegrammeni}{LGR} % &quot;small&quot; sub-iota
+\DeclareTextSymbolDefault{\prosgegrammeni}{LGR} % &quot;capital&quot; sub-iota
+</pre>
+<p>Other accents in LGR:</p>
+<pre class="literal-block">\DeclareTextAccentDefault{\accinvertedbrevebelow}{LGR} % INVERTED BREVE BELOW
+\DeclareTextAccentDefault{\textsubarch}{LGR} % tipa, Teubner name: ut
+\DeclareTextAccentDefault{\accbrevebelow}{LGR} % BREVE BELOW
+</pre>
+</div>
+<div class="section" id="auxiliary-macros">
+<h3>Auxiliary macros</h3>
+<p><tt class="literal">\MakeUppercase</tt> requires two internal commands:</p>
+<pre class="literal-block">\DeclareTextAccentDefault{\LGR&#64;hiatus}{LGR}
+\DeclareTextAccentDefault{\LGR&#64;Dialytika}{LGR}
+</pre>
+<!-- References
+- - - - - - - - - - -->
+</div>
+</div>
+</div>
+</div>
+</body>
+</html>