summaryrefslogtreecommitdiff
path: root/language/greek/greek-fontenc/textalpha.sty.html
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-11-05 03:02:04 +0000
committerNorbert Preining <norbert@preining.info>2020-11-05 03:02:04 +0000
commitb8f26d1a3ca0ba4b66477af6bd2cff2071ddd0fc (patch)
treef4f4a5d17850094c77b0ef61d004cd2532b9ad9e /language/greek/greek-fontenc/textalpha.sty.html
parent07794af1099869d326e5904c42f1224de759fd56 (diff)
CTAN sync 202011050302
Diffstat (limited to 'language/greek/greek-fontenc/textalpha.sty.html')
-rw-r--r--language/greek/greek-fontenc/textalpha.sty.html134
1 files changed, 75 insertions, 59 deletions
diff --git a/language/greek/greek-fontenc/textalpha.sty.html b/language/greek/greek-fontenc/textalpha.sty.html
index 48021df494..3ff75859bd 100644
--- a/language/greek/greek-fontenc/textalpha.sty.html
+++ b/language/greek/greek-fontenc/textalpha.sty.html
@@ -621,7 +621,7 @@ version 1.3 of this license or any later version.</p>
<dt class="identification">Identification</dt>
<dd class="identification"><pre class="literal-block">\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{textalpha}
-[2020/09/25 1.0 macros for Greek letters in text]</pre>
+[2020/10/30 2.0 macros for Greek letters in text]</pre>
</dd>
</dl>
<div class="abstract topic">
@@ -700,6 +700,12 @@ Don’t use <span class="docutils literal">\LastDeclaredEncoding</span>.</p></td
<td><p>2020-09-25</p></td>
<td><p>Also set <span class="docutils literal">\encodingdefault</span> with <span class="docutils literal">\greekscript</span>.</p></td>
</tr>
+<tr><td><p>2.0</p></td>
+<td><p>2020-10-30
+..</p></td>
+<td><p>Load <span class="docutils literal"><span class="pre">tuenc-greek.def</span></span> with Xe/LuaTeX by default.
+Load <span class="docutils literal"><span class="pre">puenc-greek.def</span></span> if used with <a class="reference external" href="http://ctan.org/pkg/hyperref">hyperref</a>.</p></td>
+</tr>
</tbody>
</table>
</dd>
@@ -717,8 +723,8 @@ Don’t use <span class="docutils literal">\LastDeclaredEncoding</span>.</p></td
<li><p><a class="reference internal" href="#keep-semicolon" id="id6">keep-semicolon</a></p></li>
</ul>
</li>
-<li><p><a class="reference internal" href="#font-encodings" id="id7">Font encodings</a></p></li>
-<li><p><a class="reference internal" href="#symbol-macros-for-breathings" id="id8">Symbol macros for breathings</a></p></li>
+<li><p><a class="reference internal" href="#symbol-macros-for-breathings" id="id7">Symbol macros for breathings</a></p></li>
+<li><p><a class="reference internal" href="#font-encodings" id="id8">Font encodings</a></p></li>
<li><p><a class="reference internal" href="#default-declarations" id="id9">Default declarations</a></p>
<ul>
<li><p><a class="reference internal" href="#greekscript-ensuregreek" id="id10">greekscript, ensuregreek</a></p></li>
@@ -765,7 +771,7 @@ mode in any font encoding (see <a class="reference external" href="textalpha-doc
<li><p>natively by XeTeX/LuaTeX for Unicode fonts.</p>
<p>If 8-bit font encodings like LGR are used alongside Unicode fonts, text
input can be done via the Latin transcription or LICR but <em>not via
-literal Unicode characters</em> (see <a class="reference external" href="tuenc-greek-doc.tex">tuenc-greek-doc.tex</a>).</p>
+literal Unicode characters</em> (see <a class="reference external" href="test-tuenc-greek.tex">test-tuenc-greek.tex</a>).</p>
</li>
</ul>
</li>
@@ -794,10 +800,10 @@ to ensure correct hyphenation of Greek text.</p>
are used, load it after <a class="reference external" href="http://ctan.org/pkg/fontspec">fontspec</a> and/or <a class="reference external" href="http://ctan.org/pkg/fontenc">fontenc</a>.</p>
<p>For detailled examples see <a class="reference external" href="textalpha-doc.tex">textalpha-doc.tex</a> and <a class="reference external" href="textalpha-doc.pdf">textalpha-doc.pdf</a>
(8-bit TeX and XeTeX/LuaTeX in 8-bit compatibility mode) as well as
-<a class="reference external" href="tuenc-greek-doc.tex">tuenc-greek-doc.tex</a> and <a class="reference external" href="tuenc-greek-doc.pdf">tuenc-greek-doc.pdf</a> (XeTeX/LuaTeX with
+<a class="reference external" href="test-tuenc-greek.tex">test-tuenc-greek.tex</a> and <a class="reference external" href="test-tuenc-greek.pdf">test-tuenc-greek.pdf</a> (XeTeX/LuaTeX with
Unicode fonts).</p>
<p>With XeTeX or LuaTex, Unicode fonts and LGR encoded 8-bit fonts can be used
-in the same document (see <a class="reference external" href="tuenc-greek-doc.tex">tuenc-greek-doc.tex</a>).</p>
+in the same document (see <a class="reference external" href="test-tuenc-greek.tex">test-tuenc-greek.tex</a>).</p>
</section>
<section id="implementation">
<h2><a class="toc-backref" href="#id3">Implementation</a></h2>
@@ -845,83 +851,92 @@ With XeTeX/LuaTeX and Unicode fonts, this option is ignored.</p>
\ProcessOptions\relax</pre>
</section>
</section>
+<section id="symbol-macros-for-breathings">
+<span id="font-encoding"></span><h3><a class="toc-backref" href="#id7">Symbol macros for breathings</a></h3>
+<p>In the Latin transcription provided by LGR, breathing accents (Dasia and
+Psili) are input as &lt; and &gt;. Provide the corresponding NFSS macro accents.
+(Used below for LGR, TU, and PU, if these font encodings are defined):</p>
+<pre class="literal-block">\newcommand{\textalpha&#64;define&#64;breathings}[1]{
+ \DeclareTextCommand{\&lt;}{#1}{\accdasia}
+ \DeclareTextCommand{\&gt;}{#1}{\accpsili}
+ % Composite accents starting with the new-defined shortcuts:
+ \DeclareTextCompositeCommand{\&gt;}{#1}{'}{\accpsilioxia}
+ \DeclareTextCompositeCommand{\&gt;}{#1}{`}{\accpsilivaria}
+ \DeclareTextCompositeCommand{\&gt;}{#1}{~}{\accpsiliperispomeni}
+ \DeclareTextCompositeCommand{\&lt;}{#1}{'}{\accdasiaoxia}
+ \DeclareTextCompositeCommand{\&lt;}{#1}{`}{\accdasiavaria}
+ \DeclareTextCompositeCommand{\&lt;}{#1}{~}{\accdasiaperispomeni}
+}</pre>
+</section>
<section id="font-encodings">
-<span id="font-encoding"></span><h3><a class="toc-backref" href="#id7">Font encodings</a></h3>
+<h3><a class="toc-backref" href="#id8">Font encodings</a></h3>
<p>With 8-bit LaTeX, the <a class="reference external" href="README.html#lgr">LGR font encoding</a> is used for Greek characters. If
-no Greek-supporting font encoding (TU, EU1, EU2, or LGR) is declared, LGR is
+no Greek-supporting font encoding (TU or LGR) is declared, LGR is
loaded and set up as default Greek font encoding by this package.</p>
<p>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, <a class="reference external" href="http://ctan.org/pkg/fontspec">fontspec</a> defines the TU font encoding or the (pseudo)
-font encodings EU1 and EU2 for XeTeX and LuaTeX respectively. However
+selection system, <a class="reference external" href="http://ctan.org/pkg/fontspec">fontspec</a> defines the TU font encoding. However
<cite>fontspec</cite> does not define Greek LICR macros. We therefore explicitely
load Greek LICR definitions for XeTeX/LuaTeX from <a class="reference external" href="tuenc-greek.def.html">tuenc-greek.def</a> which in turn includes <a class="reference external" href="greek-fontenc.def.html">greek-fontenc.def</a>.</p>
<p>Ensure a Greek-supporting font encoding exists and supports Greek LICR
macros:</p>
<ul class="simple">
-<li><p>Load the Greek LICR definitions for Unicode if the font encoding TU, EU1,
-or EU2 is detected.</p></li>
-<li><p>If none of TU, EU1, EU2, or LGR is declared, load <span class="docutils literal">lgrenc.def</span>.</p></li>
+<li><p>Load the Greek LICR definitions for Unicode if the font encoding TU
+is detected.</p></li>
+<li><p>If none of TU or LGR is declared, load <span class="docutils literal">tuenc.def</span> with
+Xe/LuaTeX and <span class="docutils literal">lgrenc.def</span> else.</p></li>
</ul>
-<pre class="literal-block">\ifdefined \UTFencname % set by &quot;fontspec.sty&quot;
+<pre class="literal-block">\ifdefined \UnicodeEncodingName % set by LaTeX for Unicode-aware engines
\input{tuenc-greek.def}
+ \textalpha&#64;define&#64;breathings{\UnicodeEncodingName}
\else
- \&#64;ifl&#64;aded{def}{lgrenc}{
- % LGR already declared and set up
- }{
+ \&#64;ifl&#64;aded{def}{lgrenc}{}{% else
\input{lgrenc.def}
}
+ \textalpha&#64;define&#64;breathings{LGR}
+ % Hiatus feature (see greek-fontenc.def and babel-greek (greek.ldf))
+ \DeclareTextCompositeCommand{\&lt;}{LGR}{^^9f}{\LGR&#64;hiatus}
+ \DeclareTextCompositeCommand{\&gt;}{LGR}{^^9f}{\LGR&#64;hiatus}
\fi</pre>
-<p>The package <a class="reference external" href="http://ctan.org/pkg/hyperref">hyperref</a> defines the PU font encoding which also supports
-(monotonic) Greek. It currently misses polytonic greek and the
-<span class="docutils literal">\greekscript</span> and <span class="docutils literal">\ensuregreek</span> TextCommands:</p>
-<pre class="literal-block">\&#64;ifl&#64;aded{def}{puenc}
- {\ProvideTextCommand{\greekscript}{PU}{}
- \ProvideTextCommand{\ensuregreek}{PU}[1]{#1}
- \pdfstringdefDisableCommands{\let\TextOrMath\&#64;firstoftwo}
- }
- {}</pre>
-</section>
-<section id="symbol-macros-for-breathings">
-<h3><a class="toc-backref" href="#id8">Symbol macros for breathings</a></h3>
-<p>In the Latin transcription provided by LGR, breathing accents (Dasia and
-Psili) are input as &lt; and &gt;. We provide the corresponding NFSS macro accents
-(moved here from <a class="reference external" href="greek-fontenc.def.html">greek-fontenc.def</a>).</p>
-<p>As Xe/LuaTeX may use LGR in combination with TU, we define the
-macros twice, for LGR and Unicode font encodings (if they are defined):</p>
-<pre class="literal-block">\newcommand{\textalpha&#64;define&#64;breathings}[1]{
- \DeclareTextCommand{\&lt;}{#1}{\accdasia}
- \DeclareTextCommand{\&gt;}{#1}{\accpsili}
- % Composite accents starting with the new-defined shortcuts:
- \DeclareTextCompositeCommand{\&gt;}{#1}{'}{\accpsilioxia}
- \DeclareTextCompositeCommand{\&gt;}{#1}{`}{\accpsilivaria}
- \DeclareTextCompositeCommand{\&gt;}{#1}{~}{\accpsiliperispomeni}
- \DeclareTextCompositeCommand{\&lt;}{#1}{'}{\accdasiaoxia}
- \DeclareTextCompositeCommand{\&lt;}{#1}{`}{\accdasiavaria}
- \DeclareTextCompositeCommand{\&lt;}{#1}{~}{\accdasiaperispomeni}
-}
-
-\&#64;ifl&#64;aded{def}{lgrenc}{
+<p>LGR may also be used in a document compiled with Xe/LuaTeX
+(enables use of 8-bit TeX fonts and input via the Latin transcription).
+Add setup for breathings:</p>
+<pre class="literal-block">\&#64;ifl&#64;aded{def}{lgrenc}{
\textalpha&#64;define&#64;breathings{LGR}
% Hiatus feature (see greek-fontenc.def and babel-greek (greek.ldf))
\DeclareTextCompositeCommand{\&lt;}{LGR}{^^9f}{\LGR&#64;hiatus}
\DeclareTextCompositeCommand{\&gt;}{LGR}{^^9f}{\LGR&#64;hiatus}
-}{}
-
-\&#64;ifl&#64;aded{def}{tuenc-greek}{ % XeTeX or LuaTeX with Unicode fonts
- \textalpha&#64;define&#64;breathings{\UTFencname}
}{}</pre>
+<p>The package <a class="reference external" href="http://ctan.org/pkg/hyperref">hyperref</a> defines the PU font encoding which also supports
+(monotonic) Greek. It currently misses polytonic greek, archaic symbols,
+and the <span class="docutils literal">\greekscript</span> and <span class="docutils literal">\ensuregreek</span> TextCommands:</p>
+<pre class="literal-block">\AtBeginDocument{
+ \&#64;ifl&#64;aded{def}{puenc}{
+ \makeatletter % required inside \AtBeginDocument
+ \input{puenc-greek.def}
+ \textalpha&#64;define&#64;breathings{PU}
+ \pdfstringdefDisableCommands{\let\TextOrMath\&#64;firstoftwo}
+ \makeatother
+ }{}
+}</pre>
+<p>The package textcomp defines the TS1 font encoding with the MICRO SIGN
+named <span class="docutils literal">\texmu</span>. Provide the alias <span class="docutils literal">\textmicro</span>:</p>
+<pre class="literal-block">\AtBeginDocument{
+ \&#64;ifl&#64;aded{def}{ts1enc}{
+ \DeclareTextSymbol{\textmicro}{TS1}{181} % micro sign
+ \DeclareTextSymbolDefault{\textmicro}{TS1}
+ }{}
+}</pre>
</section>
<section id="default-declarations">
<h3><a class="toc-backref" href="#id9">Default declarations</a></h3>
<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. Abort here, if the LGR font encoding is not defined:</p>
-<pre class="literal-block">\&#64;ifl&#64;aded{def}{lgrenc}
- {}
-% else return:
- {\expandafter\endinput}</pre>
+<pre class="literal-block">\&#64;ifl&#64;aded{def}{lgrenc}{}{ % else return:
+ \expandafter\endinput
+}</pre>
<section id="greekscript-ensuregreek">
<h4><a class="toc-backref" href="#id10">greekscript, ensuregreek</a></h4>
<p>The <span class="docutils literal">\greekscript</span> declaration ensures the current font encoding supports
@@ -947,8 +962,8 @@ However, the simpler alternative
Unicode characters in the test document `<textalpha-doc.tex>`__:
``! You can't use a prefix with `end-group character }'.`` -->
-<p>Eventually, all font encodings supporting Greek script (e.g. LGI, PU, TU,
-EU1, EU2) will declare <span class="docutils literal">\ensuregreek</span> as text command that passes the
+<p>Eventually, all font encodings supporting Greek script (e.g. LGI, PU, TU)
+will declare <span class="docutils literal">\ensuregreek</span> as text command that passes the
argument unchanged. This way, kerning and selection of precomposed glyphs
would work also for cases like <span class="docutils literal"><span class="pre">\ensuregreek{\'A}U</span></span>.</p>
</section>
@@ -1019,9 +1034,10 @@ would work also for cases like <span class="docutils literal"><span class="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{\textvarstigma}{LGR} % stigma variant (no separate Unicode character)
+\DeclareTextSymbolDefault{\textkoppa}{LGR} % ϟ Greek small letter koppa
\DeclareTextSymbolDefault{\textkoppagreek}{LGR} % ϟ (puenc.def)
+\DeclareTextSymbolDefault{\textKoppa}{LGR} % ϟ Greek letter koppa (numeral koppa)
\DeclareTextSymbolDefault{\textqoppa}{LGR} % ϙ (archaic koppa)
\DeclareTextSymbolDefault{\textQoppa}{LGR} % Ϙ (archaic Koppa)
\DeclareTextSymbolDefault{\textStigma}{LGR} % Ϛ ϹΤ ligature in some fonts