summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/babel-contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-17 03:01:16 +0000
committerNorbert Preining <norbert@preining.info>2023-03-17 03:01:16 +0000
commitcb77be104201eaab9be41990136901f05d4fa4a6 (patch)
tree35d9e43977059833f86218f7a0139a54efb25285 /macros/latex/contrib/babel-contrib
parent7126e67439fccc8851427298ecccd01727575864 (diff)
CTAN sync 202303170301
Diffstat (limited to 'macros/latex/contrib/babel-contrib')
-rw-r--r--macros/latex/contrib/babel-contrib/greek/README.md34
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html117
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst103
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek.dtx154
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek.pdfbin544962 -> 549394 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-athnum.pdfbin174634 -> 174634 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-case-changing-minimal.tex75
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-case-changing-varia-tu.tex41
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-case-changing.tex39
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex2
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.pdfbin428667 -> 463797 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.tex115
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-tildeshorthand.tex106
-rw-r--r--macros/latex/contrib/babel-contrib/greek/unicode-examples.pdfbin0 -> 15549 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/unicode-examples.tex57
-rw-r--r--macros/latex/contrib/babel-contrib/greek/usage.pdfbin184955 -> 184955 bytes
16 files changed, 650 insertions, 193 deletions
diff --git a/macros/latex/contrib/babel-contrib/greek/README.md b/macros/latex/contrib/babel-contrib/greek/README.md
index 652a58975d..c6a10c1292 100644
--- a/macros/latex/contrib/babel-contrib/greek/README.md
+++ b/macros/latex/contrib/babel-contrib/greek/README.md
@@ -1,35 +1,35 @@
babel-greek
===========
-Babel support for the Greek language
-------------------------------------
Comprehensive support for the Greek language and script with
[Babel](https://ctan.org/pkg/babel).
-**Version**: 1.12 ([changelog][1])
+**Version**: 1.13
-**Copyright**: © 1997 Apostles Syropoulos, Claudio Beccari, Johannes Brahms,
+**Copyright**: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
© 2013 - 2023 Günter Milde.
-**License**:
- This work may be distributed and/or modified under the conditions of the
- [LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
- either version 1.3 of this license or any later version.
+This work may be distributed and/or modified under the conditions of the
+[LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
+either version 1.3 of this license or any later version.
**Home**: <https://codeberg.org/milde/greek-tex>
**Latest Release**: <https://ctan.org/pkg/babel-greek>
-**Requires**: [greek-fontenc](https://ctan.org/pkg/greek-fontenc),
- [text fonts supporting the Greek script][2]
+Usage
+-----
-**Recommends**: [greek-inputenc](https://ctan.org/pkg/greek-inputenc)
- (when used with 8-bit TeX/pdfTeX)
+Load Babel with the “greek” option.
-See [babel-greek-doc][3] ([babel-greek-doc.rst][4]) for a detailed overview.
+Select the Greek language with the declaration ``\selectlanguage{greek}``
+or the function ``\foreignlanguage{greek}{<some text>}``.
+See the **documentation** for options, peculiarities, and other details:
-[1]: babel-greek-doc.html#changelog
-[2]: babel-greek-doc.html#greek-text-fonts
-[3]: babel-greek-doc.html
-[4]: babel-greek-doc.rst
+* [babel-greek-doc.html](https://ctan.org/tex-archive/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html)
+ (🡥CTAN)
+* [babel-greek-doc.rst](https://codeberg.org/milde/greek-tex/src/branch/master/babel-greek/babel-greek-doc.rst)
+ (🡥codeberg.org)
+
+or the shell command `texdoc babel-greek` to view local documentation.
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html
index 0e108edc12..395fe33fd2 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.html
@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="generator" content="Docutils 0.20b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="dcterms.rights" content="© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms, © 2013 – 2022 Günter Milde." />
+<meta name="dcterms.rights" content="© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms, © 2013 – 2023 Günter Milde." />
<title>babel-greek</title>
<link rel="schema.dcterms" href="http://purl.org/dc/terms/"/>
<style type="text/css">
@@ -791,10 +791,12 @@ mstyle.mathscr, mi.mathscr {
<main id="babel-greek">
<h1 class="title">babel-greek</h1>
<p class="subtitle" id="babel-support-for-the-greek-language-and-script">Babel support for the Greek language and script</p>
-<dl class="docinfo simple">
+<dl class="docinfo">
+<dt class="version">Version<span class="colon">:</span></dt>
+<dd class="version">1.13 (<a class="reference internal" href="#changelog">changelog</a>)</dd>
<dt class="copyright">Copyright<span class="colon">:</span></dt>
<dd class="copyright">© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
-© 2013 – 2022 Günter Milde.</dd>
+© 2013 – 2023 Günter Milde.</dd>
<dt class="licence">Licence<span class="colon">:</span></dt>
<dd class="licence"><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
@@ -812,7 +814,7 @@ version 1.3 of this license or any later version.</p>
<p><cite>babel-greek</cite> is a contributed package providing comprehensive
support for the Greek language and script via the <a class="reference external" href="https://ctan.org/pkg/babel">Babel</a> system.
Document authors can select between the <em>monotonic</em>
-(single-diacritic), <em>polytonic</em> (multiple-diacritic) and
+(single-diacritic), <em>polytonic</em> (multiple-diacritic), and
<em>ancient</em> orthography of the Greek language.</p>
</div>
<nav class="contents" id="contents" role="doc-toc">
@@ -849,8 +851,9 @@ Document authors can select between the <em>monotonic</em>
<dd><p>Description of the <a class="reference internal" href="#lgr-latin-transliteration">LGR Latin transliteration</a> and the <a class="reference internal" href="#greek-numerals">Greek numerals</a>.
[<a class="reference external" href="usage.pdf">usage.pdf</a>]</p>
</dd>
-<dt>test-*</dt>
-<dd><p>Documented test sample documents.</p>
+<dt>test-*.tex</dt>
+<dd><p>Documented test samples.
+[<a class="reference external" href="test-greek.pdf">test-greek.pdf</a>, <a class="reference external" href="test-greeknum.pdf">test-greeknum.pdf</a>, <a class="reference external" href="test-athnum.pdf">test-athnum.pdf</a>]</p>
</dd>
</dl>
</section>
@@ -882,7 +885,7 @@ in the TeX search path.</p></li>
ending in <span class="docutils literal">.dtx</span> through LaTeX.</p></li>
</ul>
<p>The last steps can be automated using the Unix <a class="reference external" href="https://en.wikipedia.org/wiki/Make_(software)">make</a> tool.
-The provided <a class="reference external" href="Makefile">Makefile</a> defines the targets</p>
+The repository sources include a <a class="reference external" href="https://codeberg.org/milde/greek-tex/src/branch/master/babel-greek/Makefile">Makefile</a> defining the targets</p>
<dl class="field-list simple">
<dt><span class="docutils literal">all</span><span class="colon">:</span></dt>
<dd><p>(re)build packages, documentation, and tests,</p>
@@ -919,26 +922,41 @@ package are not removed.</p>
</section>
<section id="usage">
<h2><a class="toc-backref" href="#toc-entry-4" role="doc-backlink">Usage</a></h2>
-<p>Use the “greek” document option or pass the “greek” option to Babel,<a class="footnote-reference superscript" href="#footnote-1" id="footnote-reference-3" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>
-e.g.:</p>
+<p>To <strong>load Greek language support</strong> with Babel, use the <span class="docutils literal">greek</span>
+document option or pass the <span class="docutils literal">greek</span> option to Babel. For example,</p>
<pre class="code latex literal-block"><code><span class="keyword">\usepackage</span><span class="name attribute">[greek,english]</span><span class="name builtin">{</span>babel<span class="name builtin">}</span></code></pre>
-<p>For polytonic Greek, set the language attribute “polutoniko”, either
+<p>activates support for Greek text parts in an English document.<a class="footnote-reference superscript" href="#footnote-1" id="footnote-reference-3" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a></p>
+<p>For ancient Greek, set the language attribute “ancient”, either
after loading Babel</p>
<pre class="code latex literal-block"><code><span class="keyword">\usepackage</span><span class="name attribute">[greek,english]</span><span class="name builtin">{</span>babel<span class="name builtin">}</span>
-<span class="keyword">\languageattribute</span><span class="name builtin">{</span>greek<span class="name builtin">}{</span>polutoniko<span class="name builtin">}</span></code></pre>
+<span class="keyword">\languageattribute</span><span class="name builtin">{</span>greek<span class="name builtin">}{</span>ancient<span class="name builtin">}</span></code></pre>
<p>or as modifier</p>
+<pre class="code latex literal-block"><code><span class="keyword">\usepackage</span><span class="name attribute">[greek.ancient,english]</span><span class="name builtin">{</span>babel<span class="name builtin">}</span></code></pre>
+<p>Similarly, the attribute “polutoniko” selects the modern polytonic Greek
+language variant,</p>
<pre class="code latex literal-block"><code><span class="keyword">\usepackage</span><span class="name attribute">[greek.polutoniko,english]</span><span class="name builtin">{</span>babel<span class="name builtin">}</span></code></pre>
-<p>Similarly, the attribute “ancient” selects the ancient Greek language
-variant.</p>
-<p>For details see <a class="citation-reference" href="#" id="citation-reference-1" role="doc-biblioref">[babel-greek.pdf]</a> and the <a class="reference external" href="https://ctan.org/pkg/babel">babel</a> documentation.</p>
-<p>Input of Greek characters is possible as literal characters (α … Ω)<a class="footnote-reference superscript" href="#footnote-2" id="footnote-reference-4" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>, as LICR macro (<span class="docutils literal">\textalpha{} ... \textOmega</span>), or via the <a class="reference internal" href="#lgr-latin-transliteration">LGR
-Latin transliteration</a> (a … W)<a class="footnote-reference superscript" href="#footnote-3" id="footnote-reference-5" role="doc-noteref"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a>. See
-<a class="citation-reference" href="#" id="citation-reference-2" role="doc-biblioref">[usage.pdf]</a> and the example files provided with <a class="reference external" href="https://ctan.org/pkg/greek-fontenc">greek-fontenc</a>.</p>
+<p>The <a class="reference external" href="https://ctan.org/pkg/babel">Babel</a> core provides two commands to <strong>select the active language</strong>:</p>
+<ul class="simple">
+<li><p>The declaration <span class="docutils literal">\selectlanguage{greek}</span> switches to the Greek
+language,</p></li>
+<li><p>the function <span class="docutils literal"><span class="pre">\foreignlanguage{greek}{&lt;some</span> text&gt;}</span> sets
+its second argument in Greek.</p></li>
+</ul>
+<p>Both ensure support for the Greek script and select Greek
+case-changing and hyphenation rules.
+For details see the <a class="reference external" href="https://ctan.org/pkg/babel">Babel</a> documentation and <a class="reference external" href="babel-greek.pdf">babel-greek.pdf</a>.</p>
+<p>Input of Greek characters is possible</p>
+<ul class="simple">
+<li><p>as literal characters (α … Ω)<a class="footnote-reference superscript" href="#footnote-2" id="footnote-reference-4" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>,</p></li>
+<li><p>as LICR macro (<span class="docutils literal">\textalpha{} ... \textOmega</span>),</p></li>
+<li><p>or via the <a class="reference internal" href="#lgr-latin-transliteration">LGR Latin transliteration</a> (a … W)<a class="footnote-reference superscript" href="#footnote-3" id="footnote-reference-5" role="doc-noteref"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a>.</p></li>
+</ul>
+<p>For details and caveats, see <a class="reference external" href="test-greek.pdf">test-greek.pdf</a> and the example files
+provided with <a class="reference external" href="https://ctan.org/pkg/greek-fontenc">greek-fontenc</a>.</p>
<aside class="footnote-list superscript">
<aside class="footnote superscript" id="footnote-1" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-3">2</a><span class="fn-bracket">]</span></span>
-<p>Alongside other languages that will be used in the document.
-The <em>last</em> language option sets the document’s main language.</p>
+<p>The <em>last</em> language option sets the document’s main language.</p>
</aside>
<aside class="footnote superscript" id="footnote-2" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-4">3</a><span class="fn-bracket">]</span></span>
@@ -946,43 +964,45 @@ The <em>last</em> language option sets the document’s main language.</p>
</aside>
<aside class="footnote superscript" id="footnote-3" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-5">4</a><span class="fn-bracket">]</span></span>
-<p>only with LGR fonts</p>
+<p>only with 8-bit <a class="reference external" href="http://mirrors.ctan.org/language/greek/greek-fontenc/greek-fontenc-doc.html#lgr">LGR</a> fonts</p>
</aside>
</aside>
</section>
<section id="greek-text-fonts">
<h2><a class="toc-backref" href="#toc-entry-5" role="doc-backlink">Greek text fonts</a></h2>
<p>A list of <a class="reference external" href="https://ctan.org/topic/font-greek">Greek text fonts for use with LaTeX</a> is available at CTAN.</p>
-<p>The non-standard LGR <a class="reference external" href="https://mirrors.ctan.org/macros/latex/base/encguide.pdf">font encoding</a> is used for typesetting Greek with
-“traditional” 8-bit TeX engines (pdfTeX). Fonts in this encoding include
+<p>The non-standard <strong>LGR</strong> <a class="reference external" href="https://mirrors.ctan.org/macros/latex/base/encguide.pdf">font encoding</a> is used for typesetting Greek with
+“traditional” <strong>8-bit TeX</strong> engines (pdfTeX). Fonts in this encoding include
the <a class="reference external" href="https://ctan.org/pkg/cbgreek-complete">CB fonts</a> (matching CM), <a class="reference external" href="https://ctan.org/pkg/grtimes">grtimes</a> (Greek Times), <a class="reference external" href="https://ctan.org/pkg/kerkis">Kerkis</a> (matching
URW Bookman), and the <a class="reference external" href="https://ctan.org/pkg/gfs">GFS font collection</a>.
The package <a class="reference external" href="https://ctan.org/pkg/cbfonts-fd">cbfonts-fd</a> registers the CB fonts as Greek substitute for
the Computer Modern and Latin Modern font families. For other font
families, declaring Greek fonts as supplement for matching Latin font
families can be done with the <code class="latex">\DeclareFontFamilySubstitution</code>
-macro (see section <cite>Providing font family substitutions</cite> in <a class="citation-reference" href="#fntguide" id="citation-reference-3" role="doc-biblioref">[fntguide]</a>).</p>
-<p>Unicode fonts used with XeTeX or LuaTeX provide slots for all Unicode
-characters in one font but commonly only a subset of the actual glyphs.</p>
+macro (see section <cite>Providing font family substitutions</cite> in <a class="citation-reference" href="#fntguide" id="citation-reference-1" role="doc-biblioref">[fntguide]</a>).</p>
+<p><strong>Unicode fonts</strong> used with <strong>XeTeX</strong> or <strong>LuaTeX</strong> provide slots for all
+Unicode characters in one font but commonly only a subset of the actual
+glyphs.</p>
<aside class="admonition warning">
<p class="admonition-title">Warning</p>
-<p>The default <strong>Latin Modern contains only a few Greek letters!</strong>
+<p>The default <strong>Latin Modern</strong> Unicode font
+<strong>contains only a few Greek letters!</strong>
Unsupported characters are silently dropped from the output.
-Warnings about missing glyphs are written to the log
-file only, not to the console.</p>
+Warnings about missing glyphs are written to the log file
+but not to the console.</p>
</aside>
-<p>Select a suitable font with <a class="reference external" href="https://ctan.org/pkg/babel">Babel</a>’s font selecting framework or
-directly with <a class="reference external" href="https://ctan.org/pkg/fontspec">fontspec</a>. Examples for suitable fonts are <a class="reference external" href="https://ctan.org/pkg/cm-unicode">CM-unicode</a>
-or <a class="reference external" href="https://ctan.org/pkg/libertine">Linux Libertine</a> as well as any system-wide installed OTF font
-that supports Greek (e.g. <a class="reference external" href="http://dejavu-fonts.org">Deja Vu</a>). See, e.g., the list of free
-<a class="reference external" href="https://fontinfo.opensuse.org/scripts/script-Greek.html">fonts supporting Greek script</a> by openSUSE’s fontinfo.</p>
+<p>Select a suitable font with <a class="reference external" href="https://ctan.org/pkg/babel">Babel</a>’s font selecting framework or <a class="reference external" href="https://ctan.org/pkg/fontspec">fontspec</a>.
+Examples for suitable fonts are <a class="reference external" href="https://ctan.org/pkg/cm-unicode">CM-unicode</a> or <a class="reference external" href="https://ctan.org/pkg/libertine">Linux Libertine</a> as well
+as any system-wide installed OTF font that supports Greek (e.g. <a class="reference external" href="http://dejavu-fonts.org">Deja Vu</a>).
+See, e.g., the list of free <a class="reference external" href="https://fontinfo.opensuse.org/scripts/script-Greek.html">fonts supporting Greek script</a> by
+openSUSE’s fontinfo.</p>
</section>
<section id="lgr-latin-transliteration">
<h2><a class="toc-backref" href="#toc-entry-6" role="doc-backlink">LGR Latin Transliteration</a></h2>
<p>The LGR font encoding allows input of Greek characters via a Latin
transliteration. This enables simple input with a Latin keyboard. Characters
with diacritics may be selected with accent macros (cf. <a class="reference external" href="https://ctan.org/pkg/greek-fontenc">greek-fontenc</a>) or
-via the ligature definitions in the font (see <a class="citation-reference" href="#" id="citation-reference-4" role="doc-biblioref">[usage.pdf]</a>).</p>
+via the ligature definitions in the font (see <a class="reference external" href="usage.pdf">usage.pdf</a>).</p>
<p>The following ASCII characters are converted to Greek symbols:</p>
<table>
<tbody>
@@ -1095,7 +1115,7 @@ via the ligature definitions in the font (see <a class="citation-reference" href
<p>Accent symbols and punctuation:</p>
<table>
<tbody>
-<tr><td><p>tonos</p></td>
+<tr><td><p>tonos/oxia</p></td>
<td><p><span class="docutils literal">'a</span></p></td>
<td><p>ά</p></td>
<td><p>right apostrophe</p></td>
@@ -1133,7 +1153,7 @@ via the ligature definitions in the font (see <a class="citation-reference" href
<tr><td><p>dialytika</p></td>
<td><p><span class="docutils literal">&quot;i</span></p></td>
<td><p>ϊ</p></td>
-<td><p>middle dot</p></td>
+<td><p>ano teleia<a class="footnote-reference superscript" href="#footnote-4" id="footnote-reference-6" role="doc-noteref"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p></td>
<td><p><span class="docutils literal">;</span></p></td>
<td><p>·</p></td>
</tr>
@@ -1150,6 +1170,14 @@ via the ligature definitions in the font (see <a class="citation-reference" href
LGR is the active font encoding. This means that for every Latin-written
word or acronym in a Greek text part, an explicit font encoding switch is
required.</p>
+<aside class="footnote-list superscript">
+<aside class="footnote superscript" id="footnote-4" role="doc-footnote">
+<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-6">5</a><span class="fn-bracket">]</span></span>
+<p>The “<span class="target" id="keep-semicolon">keep-semicolon</span>” language attribute prevents the mapping of
+a semicolon to a middle dot to allow its use as Greek question mark
+(erotimatiko).</p>
+</aside>
+</aside>
</section>
<section id="greek-numerals">
<h2><a class="toc-backref" href="#toc-entry-7" role="doc-backlink">Greek Numerals</a></h2>
@@ -1163,7 +1191,7 @@ from the city of Miletus in Ionia replacing the <a class="reference external" hr
They are still used in everyday life for ordinal numbers and
more generally by the Orthodox church and certain scholars.</p>
<p>Greek numerals use several now obsolete letters:
-<a class="reference external" href="https://en.wikipedia.org/wiki/Digamma">digamma</a> ϝ or <a class="reference external" href="https://en.wikipedia.org/wiki/Stigma_(ligature)">stigma</a> ϛ, <a class="reference external" href="https://en.wikipedia.org/wiki/Koppa_(letter)">koppa</a> ϟ or ϙ, and <a class="reference external" href="https://en.wikipedia.org/wiki/Sampi">sampi</a> ϡ <a class="citation-reference" href="#nicholas-05" id="citation-reference-5" role="doc-biblioref">[Nicholas-05]</a>.</p>
+<a class="reference external" href="https://en.wikipedia.org/wiki/Digamma">digamma</a> ϝ or <a class="reference external" href="https://en.wikipedia.org/wiki/Stigma_(ligature)">stigma</a> ϛ, <a class="reference external" href="https://en.wikipedia.org/wiki/Koppa_(letter)">koppa</a> ϟ or ϙ, and <a class="reference external" href="https://en.wikipedia.org/wiki/Sampi">sampi</a> ϡ <a class="citation-reference" href="#nicholas-05" id="citation-reference-2" role="doc-biblioref">[Nicholas-05]</a>.</p>
<ul>
<li><p>Standing for 6 is the <a class="reference external" href="https://en.wikipedia.org/wiki/Digamma">digamma</a> ϝ, the sixth letter of the Ionic
alphabet (just as its Latin equivalent F is the sixth letter of the
@@ -1335,7 +1363,7 @@ to hard-coded <span class="docutils literal">\latinencoding</span> when leaving
<dd><ul class="simple">
<li><p>Do not change the uccode values if the LaTeX version is newer than
2022/06. The new <span class="docutils literal">\MakeUppercase</span> definition ignores them and fails
-with the “dummy” character 0x9f (cf. <a class="citation-reference" href="#ltnews35" id="citation-reference-6" role="doc-biblioref">[ltnews35]</a>, <a class="reference external" href="https://github.com/latex3/latex2e/issues/987">LaTeX issue 987</a>).</p></li>
+with the “dummy” character 0x9f (cf. <a class="citation-reference" href="#ltnews35" id="citation-reference-3" role="doc-biblioref">[ltnews35]</a>, <a class="reference external" href="https://github.com/latex3/latex2e/issues/987">LaTeX issue 987</a>).</p></li>
<li><p>New modifiers <span class="docutils literal"><span class="pre">local-LGR-fixes</span></span> and <span class="docutils literal"><span class="pre">no-LGR-fixes</span></span> to address
indexing problmes with Roman numerals (<a class="reference external" href="https://github.com/latex3/babel/issues/170">Babel issue 170</a>). Provisional.</p></li>
<li><p>New TextCommand <span class="docutils literal">\EnsureStandardFontEncoding</span>.</p></li>
@@ -1348,23 +1376,30 @@ Don’t require Babel.
Use LICR macros instead of the Latin transliteration.</p></li>
</ul>
</dd>
+<dt>1.13 (2023-03-15)</dt>
+<dd><ul class="simple">
+<li><p>New language attribute “<a class="reference internal" href="#keep-semicolon">keep-semicolon</a>”.</p></li>
+<li><p>Rename <span class="docutils literal">\greek&#64;tilde</span> to <span class="docutils literal">\bbl&#64;greek&#64;tilde</span>, simplify definition.</p></li>
+<li><p>Fix links, update documentation.</p></li>
+</ul>
+</dd>
</dl>
</section>
<section id="references">
<h2><a class="toc-backref" href="#toc-entry-9" role="doc-backlink">References</a></h2>
<div role="list" class="citation-list">
<div class="citation" id="fntguide" role="doc-biblioentry">
-<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#citation-reference-3">fntguide</a><span class="fn-bracket">]</span></span>
+<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#citation-reference-1">fntguide</a><span class="fn-bracket">]</span></span>
<p>LaTeX Project Team <cite>LaTeX2e font selection</cite>, December 2021.
<a class="reference external" href="https://www.latex-project.org/help/documentation/fntguide.pdf">https://www.latex-project.org/help/documentation/fntguide.pdf</a></p>
</div>
<div class="citation" id="ltnews35" role="doc-biblioentry">
-<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#citation-reference-6">ltnews35</a><span class="fn-bracket">]</span></span>
+<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#citation-reference-3">ltnews35</a><span class="fn-bracket">]</span></span>
<p>LaTeX Project Team <cite>LaTeX News 35</cite>, June 2022.
<a class="reference external" href="https://www.latex-project.org/news/latex2e-news/ltnews35.pdf">https://www.latex-project.org/news/latex2e-news/ltnews35.pdf</a></p>
</div>
<div class="citation" id="nicholas-05" role="doc-biblioentry">
-<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#citation-reference-5">Nicholas-05</a><span class="fn-bracket">]</span></span>
+<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#citation-reference-2">Nicholas-05</a><span class="fn-bracket">]</span></span>
<p>Nick Nicholas <cite>Numerals: Stigma, Koppa, Sampi</cite>, 2005.
<a class="reference external" href="https://opoudjis.net/unicode/numerals.html">https://opoudjis.net/unicode/numerals.html</a></p>
</div>
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst
index fe62a4ff66..2c65158b9a 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek-doc.rst
@@ -3,8 +3,10 @@ babel-greek
Babel support for the Greek language and script
===============================================
+:Version: 1.13 (changelog_)
+
:Copyright: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
- © 2013 -- 2022 Günter Milde.
+ © 2013 -- 2023 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.
@@ -16,7 +18,7 @@ Babel support for the Greek language and script
:Abstract: `babel-greek` is a contributed package providing comprehensive
support for the Greek language and script via the Babel_ system.
Document authors can select between the *monotonic*
- (single-diacritic), *polytonic* (multiple-diacritic) and
+ (single-diacritic), *polytonic* (multiple-diacritic), and
*ancient* orthography of the Greek language.
.. contents::
@@ -36,8 +38,9 @@ Files
`<usage.tex>`_
Description of the `LGR Latin transliteration`_ and the `Greek numerals`_.
[`<usage.pdf>`_]
-test-*
- Documented test sample documents.
+test-\*.tex
+ Documented test samples.
+ [`<test-greek.pdf>`_, `<test-greeknum.pdf>`_, `<test-athnum.pdf>`_]
Requirements
@@ -78,7 +81,7 @@ Alternatively:
ending in ``.dtx`` through LaTeX.
The last steps can be automated using the Unix `make`_ tool.
-The provided `<Makefile>`_ defines the targets
+The repository sources include a `Makefile`_ defining the targets
:``all``: (re)build packages, documentation, and tests,
:``packages``: (re)build the packages,
@@ -99,6 +102,7 @@ The provided `<Makefile>`_ defines the targets
.. _greek-tex: https://codeberg.org/milde/greek-tex/
.. _snapshot: https://codeberg.org/milde/greek-tex/archive/master.zip
.. _make: https://en.wikipedia.org/wiki/Make_(software)
+.. _Makefile: https://codeberg.org/milde/greek-tex/src/branch/master/babel-greek/Makefile
Usage
@@ -106,49 +110,69 @@ Usage
.. role:: latex(code)
-Use the "greek" document option or pass the "greek" option to Babel, [#]_
-e.g.:
+To **load Greek language support** with Babel, use the ``greek``
+document option or pass the ``greek`` option to Babel. For example,
.. code:: latex
\usepackage[greek,english]{babel}
-For polytonic Greek, set the language attribute "polutoniko", either
+activates support for Greek text parts in an English document. [#]_
+
+For ancient Greek, set the language attribute "ancient", either
after loading Babel
.. code:: latex
\usepackage[greek,english]{babel}
- \languageattribute{greek}{polutoniko}
+ \languageattribute{greek}{ancient}
or as modifier
.. code:: latex
+ \usepackage[greek.ancient,english]{babel}
+
+Similarly, the attribute "polutoniko" selects the modern polytonic Greek
+language variant,
+
+.. code:: latex
+
\usepackage[greek.polutoniko,english]{babel}
-Similarly, the attribute "ancient" selects the ancient Greek language
-variant.
+The Babel_ core provides two commands to **select the active language**:
-For details see [babel-greek.pdf]_ and the babel_ documentation.
+* The declaration ``\selectlanguage{greek}`` switches to the Greek
+ language,
-Input of Greek characters is possible as literal characters (α ... Ω)
-[#]_, as LICR macro (``\textalpha{} ... \textOmega``), or via the `LGR
-Latin transliteration`_ (a ... W) [#]_. See
-[usage.pdf]_ and the example files provided with greek-fontenc_.
+* the function ``\foreignlanguage{greek}{<some text>}`` sets
+ its second argument in Greek.
-.. [#] Alongside other languages that will be used in the document.
- The *last* language option sets the document's main language.
+Both ensure support for the Greek script and select Greek
+case-changing and hyphenation rules.
+For details see the Babel_ documentation and babel-greek.pdf_.
+
+Input of Greek characters is possible
+
+* as literal characters (α ... Ω) [#]_,
+* as LICR macro (``\textalpha{} ... \textOmega``),
+* or via the `LGR Latin transliteration`_ (a ... W) [#]_.
+
+For details and caveats, see test-greek.pdf_ and the example files
+provided with greek-fontenc_.
+
+.. [#] The *last* language option sets the document's main language.
.. [#] with the greek-inputenc_ package or XeTeX/LuaTeX
-.. [#] only with LGR fonts
+.. [#] only with 8-bit LGR_ fonts
+
Greek text fonts
----------------
A list of `Greek text fonts for use with LaTeX`_ is available at CTAN.
-The non-standard LGR `font encoding`_ is used for typesetting Greek with
-"traditional" 8-bit TeX engines (pdfTeX). Fonts in this encoding include
+The non-standard **LGR** `font encoding`_ is used for typesetting Greek with
+"traditional" **8-bit TeX** engines (pdfTeX). Fonts in this encoding include
the `CB fonts`_ (matching CM), grtimes_ (Greek Times), Kerkis_ (matching
URW Bookman), and the `GFS font collection`_.
The package `cbfonts-fd`_ registers the CB fonts as Greek substitute for
@@ -157,20 +181,22 @@ families, declaring Greek fonts as supplement for matching Latin font
families can be done with the :latex:`\DeclareFontFamilySubstitution`
macro (see section `Providing font family substitutions` in [fntguide]_).
-Unicode fonts used with XeTeX or LuaTeX provide slots for all Unicode
-characters in one font but commonly only a subset of the actual glyphs.
+**Unicode fonts** used with **XeTeX** or **LuaTeX** provide slots for all
+Unicode characters in one font but commonly only a subset of the actual
+glyphs.
.. Warning::
- The default **Latin Modern contains only a few Greek letters!**
+ The default **Latin Modern** Unicode font
+ **contains only a few Greek letters!**
Unsupported characters are silently dropped from the output.
- Warnings about missing glyphs are written to the log
- file only, not to the console.
+ Warnings about missing glyphs are written to the log file
+ but not to the console.
-Select a suitable font with Babel_'s font selecting framework or
-directly with fontspec_. Examples for suitable fonts are CM-unicode_
-or `Linux Libertine`_ as well as any system-wide installed OTF font
-that supports Greek (e.g. `Deja Vu`_). See, e.g., the list of free
-`fonts supporting Greek script`_ by openSUSE's fontinfo.
+Select a suitable font with Babel_'s font selecting framework or fontspec_.
+Examples for suitable fonts are CM-unicode_ or `Linux Libertine`_ as well
+as any system-wide installed OTF font that supports Greek (e.g. `Deja Vu`_).
+See, e.g., the list of free `fonts supporting Greek script`_ by
+openSUSE's fontinfo.
.. _Greek text fonts for use with LaTeX: https://ctan.org/topic/font-greek
.. _fonts supporting Greek script:
@@ -183,7 +209,7 @@ LGR Latin Transliteration
The LGR font encoding allows input of Greek characters via a Latin
transliteration. This enables simple input with a Latin keyboard. Characters
with diacritics may be selected with accent macros (cf. greek-fontenc_) or
-via the ligature definitions in the font (see [usage.pdf]_).
+via the ligature definitions in the font (see usage.pdf_).
The following ASCII characters are converted to Greek symbols:
@@ -197,12 +223,12 @@ a b g d e z h j i k l m n x o p r s c t u f q y w
Accent symbols and punctuation:
============== ======= == ====================== ======= ==
-tonos ``'a`` ά right apostrophe ``''`` ’
+tonos/oxia ``'a`` ά right apostrophe ``''`` ’
varia ```a`` ὰ left apostrophe \`\` ‘
dasia ``<a`` ἁ left quotation mark ``((`` «
psili ``>a`` ἀ right quotation mark ``))`` »
perispomeni ``\~a`` ᾶ erotimatiko ``?`` ;
-dialytika ``"i`` ϊ middle dot ``;`` ·
+dialytika ``"i`` ϊ ano teleia [#]_ ``;`` ·
ypogegrammeni ``a|`` ᾳ zero width non-joiner ``av|`` αͺ
============== ======= == ====================== ======= ==
@@ -211,6 +237,10 @@ LGR is the active font encoding. This means that for every Latin-written
word or acronym in a Greek text part, an explicit font encoding switch is
required.
+.. [#] The "_`keep-semicolon`" language attribute prevents the mapping of
+ a semicolon to a middle dot to allow its use as Greek question mark
+ (erotimatiko).
+
Greek Numerals
--------------
@@ -364,6 +394,10 @@ Changelog
- `athnum.dtx`_ 2.0:
Don't require Babel.
Use LICR macros instead of the Latin transliteration.
+1.13 (2023-03-15)
+ - New language attribute "keep-semicolon_".
+ - Rename ``\greek@tilde`` to ``\bbl@greek@tilde``, simplify definition.
+ - Fix links, update documentation.
.. _babel/4303: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4303
.. _babel/4305: http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=babel/4305
@@ -405,6 +439,7 @@ References
.. _hyperref: https://ctan.org/pkg/hyperref
.. _textalpha:
.. _greek-fontenc: https://ctan.org/pkg/greek-fontenc
+.. _LGR: http://mirrors.ctan.org/language/greek/greek-fontenc/greek-fontenc-doc.html#lgr
.. _greek-inputenc: https://ctan.org/pkg/greek-inputenc
.. _GFS font collection: https://ctan.org/pkg/gfs
.. _Kerkis: https://ctan.org/pkg/kerkis
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
index 328aee6de2..3d75104121 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
@@ -26,7 +26,7 @@
% and covered by LPPL is defined by the unpacking script (babel-greek.ins)
% which is part of the package.
% \fi
-% \CheckSum{1651}
+% \CheckSum{1648}
%
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
@@ -37,12 +37,12 @@
%<code>\ProvidesLanguage{greek}
%\fi
%\ProvidesFile{babel-greek.dtx}
- [2023/03/04 1.12 Greek support for the babel system]
+ [2023/03/15 1.13 Greek support for the babel system]
%\iffalse
%% File `babel-greek.dtx'
%% Greek language Definition File
%% Copyright © 1997, 2005 Apostolos Syropoulos, Johannes Braams
-%% Copyright © 2013 -- 2020 Günter Milde
+%% Copyright © 2013 -- 2023 Günter Milde
%
%% Please report errors to: Günter Milde <milde@users.sf.net>
%
@@ -84,13 +84,10 @@
% \changes{greek-1.4}{2013/05/17}{new maintainer}
% \changes{greek-1.5}{2013/06/21}{bugfixes,
% change some symbol macros to aliases,
-% LGR fixes via DeclareTextCommand instead of
+% LGR fixes via \cs{DeclareTextCommand} instead of
% extrasgreek/noextrasgreek definitions,
% LICR macros in string definitions,
% LGR font encoding not used with XeTeX/LuaTeX.}
-% \changes{greek-1.5a}{2013/06/27}{``extraspolutonikogreek'' definition
-% was missing with Xe/LuaTeX.
-% Replaced non-printable literal character with ^^-notation.}
% \changes{greek-1.6}{2013/07/18}{fix \cs{@roman} and \cs{@Roman}
% redefinition (thanks to Enrico Gregorio and Claudio Beccari),
% load LICR macro definitions for Xe/LuaTeX.}
@@ -184,9 +181,10 @@
%
% \subsection{Language attributes}
%
-% The attributes \Lopt{monotoniko}, \Lopt{polutoniko}^^A
+% The attributes \hyperref[sec:polutoniko]{\Lopt{polutoniko}}^^A
% \footnote{with the alias \Lopt{polytonic}},
-% and \Lopt{ancient} allow the specification of the used orthography.
+% and \hyperref[sec:ancient]{\Lopt{ancient}} allow the specification
+% of the used orthography.
% The language variant affects automatic hyphenation, spelling of
% auto-generated strings and support for multi-accented letters.
%
@@ -209,22 +207,28 @@
% \begin{verbatim}
% \usepackage[greek.ancient,english]{babel}\end{verbatim}
%
+% The \hyperref[sec:keep-semicolon]{\Lopt{keep-semicolon}} language
+% attribute (new in babel-greek 1.13) ensures that a SEMICOLON character (;)
+% can be used as input for the similar looking Greek question mark
+% (\emph{erotimatiko}).
+% By default, the LGR font encoding uses the QUESTION MARK (?)
+% as input for the \emph{erotimatiko} and maps the SEMICOLON
+% to an \emph{ano teleia} (·).
%
% \subsection{Modifiers \label{sec:modifiers}}
%
+% Modifiers cannot be set with |\languageattribute|.
+% Misspelled modifiers are ignored without warning!
+%
% \changes{babel-greek-1.12}{2023/03/04}{
% New modifiers \Lopt{local-LGR-fixes} and \Lopt{no-LGR-fixes}.}
%
-% The following modifiers cannot be set with |\languageattribute|.
-% Misspelled modifiers are ignored without warning!
-% \medskip
-%
% Some workarounds for the non-standard LGR font encoding may have
% serious side-effects.
-% The \texttt{local-LGR-fixes} \emph{modifier} restricts the re-definitions
+% The \Lopt{local-LGR-fixes} modifier restricts the re-definitions
% in section~\ref{sec:lgr-redefinitions} to text parts using the Greek
% language.
-% The \texttt{no-LGR-fixes} \emph{modifier} disables them completely.
+% The \Lopt{no-LGR-fixes} modifier disables them completely.
% You may try, e.g.,
% \begin{verbatim}
% \usepackage[greek.local-LGR-fixes,english]{babel}\end{verbatim}
@@ -232,7 +236,6 @@
% and using Xe/LuaTeX with Unicode fonts is not an option.
% Check for problems with enumerations in Greek text parts and with
% Roman and Greek numerals everywhere (especially in the ToC).
-%
% These modifiers are provisional, naming and behaviour may change.
%
% \subsection{Language hooks \label{sec:language-hooks}}
@@ -257,9 +260,11 @@
%
% There are several alternatives to write Greek text.
% \begin{itemize}
-% \item Literal input using the UTF-8 encoding is the standard input
-% method. With 8-bit TeX, this requires the package
-% \pkgref{greek-inputenc}.
+% \item Literal input using the UTF-8 encoding is the standard input method.
+% With 8-bit TeX, this requires the package \pkgref{greek-inputenc}
+% and special handling for Latin letters and some symbols
+% (consider using the \hyperref[sec:keep-semicolon]{\Lopt{keep-semicolon}}
+% attribute).
%
% With the packages \pkgref{inputenc} and \pkgref{greek-inputenc},
% literal Greek characters can also be input using the legacy encodings
@@ -287,7 +292,7 @@
%
% \DescribeMacro\greekscript
% The \emph{TextCommand}\footnote{For a discussion of TextCommands, see
-% the \emph{LaTeX font guide}, too.}
+% the \emph{LaTeX font guide}.}
% |\greekscript| switches to a font encoding
% supporting the Greek script.
% \DescribeMacro\greektext
@@ -420,6 +425,14 @@
% \begin{macrocode}
\gdef\CurrentOption{greek}
% \end{macrocode}
+% Set up the Babel shorthands feature. It is used later to insert literal
+% |~| characters with polytonic Greek and LGR and to prevent LGR converting
+% a literal semicolon |;| to an \emph{ano teleia} |·|.
+% \changes{babel-greek-1.13}{2023/03/15}{
+% Setup \cs{languageshorthands} for all language variants.}
+% \begin{macrocode}
+\addto\extrasgreek{\languageshorthands{greek}}
+% \end{macrocode}
%
%
% \subsection{Hyphenation patterns \label{sec:hyphenation-patterns}}
@@ -462,7 +475,7 @@
% ^^A TODO: Move the |\let\l@greek=...| definitions to the language
% ^^A attribute functions (as we only have one language variant per document)
% ^^A or use the hooks to allow more than one language variant?
-% \changes{greek-1.5a}{2013/06/27}{provide ``extraspolutonikogreek'' also
+% \changes{greek-1.5a}{2013/06/27}{provide \cs{extraspolutonikogreek} also
% for Xe/LuaTeX.}
% \begin{macrocode}
\addto\extrasgreek{\let\l@greek=\bbl@monogreek}
@@ -482,7 +495,7 @@
% \end{macro}
%
%
-% \subsection{Language variants \label{sec:language-variants}}
+% \subsection{Language attributes}
%
% The Babel core provides the command |\bbl@declare@ttribute| for the
% declaration of language attributes in language definition files.
@@ -492,24 +505,35 @@
% If the language attribute is selected, the third argument is executed
% after reading the *.ldf file.
%
-% \subsubsection{\Lopt{polutoniko}}
+% \label{sec:language-variants}
+% \subsubsection{\Lopt{polutoniko}\label{sec:polutoniko}}
% The |polutoniko| language attribute selects the ``polytonic'' spelling.
+%
+% We use an auxiliary function for the setup part used with several
+% attributes.
% This code adds the expansion of |\extraspolutonikogreek| to
% |\extrasgreek| to set up support for multi-accented characters
% and hyphenation patterns for the polytonic orthography.
% \begin{macrocode}
-\bbl@declare@ttribute{greek}{polutoniko}{%
+\def\bbl@greek@setup@polytonic{%
\expandafter\addto\expandafter\extrasgreek
- \expandafter{\extraspolutonikogreek}%
+ \expandafter{\extraspolutonikogreek}%
% \end{macrocode}
% It also uses polytonic spelling for auto-strings
-% (captions and month names).
+% (captions and month names) and changes the expansion of the ~ character
+% from ``protected space'' to ``self-insert'' if the |\greekfontencoding|
+% is LGR (for use as perispomeni in the Latin transliteration).
% \begin{macrocode}
\let\captionsgreek\captionspolutonikogreek
\let\gr@month\gr@polutoniko@month
+ \def\bbl@tempa{LGR}
+ \ifx\greekfontencoding\bbl@tempa
+ \declare@shorthand{greek}{~}{\bbl@greek@tilde}
+ \fi
+}
% \end{macrocode}
-%
-% For backwards compatibility, ``polytonic'' spelling can also be
+% Now declare the option. For backwards compatibility,
+% modern Greek with ``polytonic'' spelling can also be
% selected via the dummy language \Lopt{polutonikogreek}.
% However, it is not possible to use both options,
% \Lopt{greek} and \Lopt{polutonikogreek} in one document.
@@ -519,6 +543,8 @@
% Added some code to make older documents work.}
% \changes{greek-1.3g}{2000/02/04}{\cs{noextraspolutonikogreek} was missing.}
% \begin{macrocode}
+\bbl@declare@ttribute{greek}{polutoniko}{%
+ \bbl@greek@setup@polytonic
\let\l@polutonikogreek\l@greek
\let\datepolutonikogreek\dategreek
\let\extraspolutonikogreek\extrasgreek
@@ -536,14 +562,11 @@
% variant in \pkg{polyglossia} and Babel |*.ini| files.
% \begin{macrocode}
\bbl@declare@ttribute{greek}{polytonic}{%
- \expandafter\addto\expandafter\extrasgreek
- \expandafter{\extraspolutonikogreek}%
- \let\captionsgreek\captionspolutonikogreek
- \let\gr@month\gr@polutoniko@month
+ \bbl@greek@setup@polytonic
}
% \end{macrocode}
%
-% \subsubsection{\Lopt{ancient}}
+% \subsubsection{\Lopt{ancient}\label{sec:ancient}}
%
% \changes{babel-greek-1.09}{2014/07/20}{Add support for ancient Greek.}
%
@@ -553,8 +576,7 @@
% multi-accented characters and ancient hyphenation patterns.
% \begin{macrocode}
\bbl@declare@ttribute{greek}{ancient}{%
- \expandafter\addto\expandafter\extrasgreek
- \expandafter{\extraspolutonikogreek}% multi-accented letters
+ \bbl@greek@setup@polytonic
\expandafter\addto\expandafter\extrasgreek
\expandafter{\extrasancientgreek}%
% \end{macrocode}
@@ -563,7 +585,6 @@
% sets of month names and no common calendar in ancient Greece).
% \begin{macrocode}
\let\captionsgreek\captionsancientgreek
- \let\gr@month\gr@polutoniko@month % (modern) polytonic month names
% \end{macrocode}
% Classicists tend to use the Q-like ``archaic'' koppa for the number 90.
% Thus, for classical Greek, we set the default to the ``archaic'' koppa
@@ -575,6 +596,32 @@
% \end{macrocode}
%
%
+% \subsubsection{\Lopt{keep-semicolon}\label{sec:keep-semicolon}}
+%
+% \changes{babel-greek-1.13}{2023/03/15}{
+% New language attribute \Lopt{keep-semicolon}.}
+% The LGR font encoding uses the Latin question mark as input for
+% the Greek question mark (\emph{erotimatiko}) and maps the semicolon
+% to a middle dot (\emph{ano teleia}).
+% As a result, Unicode-encoded texts that use the semicolon (;) as
+% \emph{erotimatiko} end up with an \emph{ano teleia} (·) in its place!
+%
+% With the \texttt{keep-semicolon} language attribute, 003B SEMICOLON is made
+% active and inserts an \emph{erotimatiko} also with LGR encoded fonts:
+% \begin{macrocode}
+\bbl@declare@ttribute{greek}{keep-semicolon}{%
+ \def\bbl@tempa{LGR}
+ \ifx\greekfontencoding\bbl@tempa
+ \ProvideTextCommandDefault{\textsemicolon}{;}
+ \ProvideTextCommand{\textsemicolon}{LGR}{\TextOrMath{\texterotimatiko}{;}}
+ \initiate@active@char{;}
+ \addto\extrasgreek{\bbl@activate{;}}
+ \addto\noextrasgreek{\bbl@deactivate{;}}
+ \declare@shorthand{greek}{;}{\textsemicolon}
+ \fi
+}
+% \end{macrocode}
+%
% \subsection{Font setup \label{sec:font-setup}}
%
% \subsubsection{Greek font encoding \label{sec:greekfontencoding}}
@@ -776,7 +823,7 @@
% encoding change local}
% \changes{greek-1.3k}{2003/03/19}{Added \cs{leavevmode} as was done
% with \cs{latintext}}
-% \changes{babel-greek-1.12}{2023/03/04}{^^A
+% \changes{babel-greek-1.12}{2023/03/04}{
% Simplified implementation using \cs{\DeclareTextFontCommand}.
% Name changed from \cs{textgreek} to \cs{lgrfont}.}
% \begin{macrocode}
@@ -1432,7 +1479,7 @@
% \changes{greek-1.1a}{1997/03/03}{
% removed two superfluous @'s which made \cs{@alph} undefined}
% \changes{babel-greek-1.12}{2023/03/04}{
-% Save/restore previous expansion of \cs{\@alph} and \cs{\@Alph}
+% Save/restore expansion of \cs{\@alph} and \cs{\@Alph}
% with every switch to/from Greek.}
% \begin{macrocode}
\addto\extrasgreek{%
@@ -1462,7 +1509,7 @@
% \changes{babel-greek-1.09d}{2015/07/06}{uc-/lccode corrections from xgreek
% are now in greek-euenc.def (the polyglossia version has bugs).}
% \changes{babel-greek-1.12}{2023/03/04}{%
-% Only change uc/lccodes if LGR is the \cs{greekfontencoding}.}
+% Only change uc/lccodes if \cs{greekfontencoding} is LGR.}
% \begin{macrocode}
\def\bbl@tempa{LGR}
\ifx\greekfontencoding\bbl@tempa
@@ -1562,7 +1609,7 @@
% \changes{greek-1.3j}{2001/02/03}{Don't use the double caret notation here,
% because other languages might make the caret active.}
% \changes{babel-greek-1.12}{2023/03/04}{
-% Don't change uccodes if LaTeX is from 2022/06/01 or newer.}
+% Only change uccodes if LaTeX is older than 2022/06/01.}
% \begin{macrocode}
% fallback for for LaTeX versions older than 2020-10-01
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
@@ -1599,8 +1646,8 @@
% \changes{greek-1.3j}{2001/02/03}{
% Use the tilde as an alias for character 159}
% \changes{babel-greek-1.12}{2023/03/04}{
-% Declare char 159 expansion similar to the way it is done
-% in \pkg{inputenc} to avoid ``inputenc error''.}
+% Declare char 159 expansion similar to
+% \pkg{inputenc} to avoid ``inputenc error''.}
% \begin{macrocode}
\bgroup
\uccode`\~159%
@@ -1612,13 +1659,13 @@
% Add composite commands, so that the dialytika is kept or put on the
% following character of a diphthong with |\MakeUppercase|
% (see lgrdef.enc from the the greek-fontenc package for details).
-% \changes{greek-1.4}{2013/05/17}{Add TextCompositeCommands for
-% ``uppercase diacritics''.}
+% \changes{greek-1.4}{2013/05/17}{
+% Add TextCompositeCommands for ``uppercase diacritics''.}
% \changes{greek-1.5}{2013/05/27}{Bugfix: @hiatus->LGR@hiatus}
% \changes{greek-1.5a}{2013/07/02}{Replaced non-printable literal character
-% with ^^-notation (thanks to Heiko Oberdiek for the hint).}
-% \changes{babel-greek-1.09}{2014/07/20}{The |^^|-notation seems to require
-% lower case letters. |^^9F| failed.}
+% with \textasciicircum-notation (tip by Heiko Oberdiek).}
+% \changes{babel-greek-1.09}{2014/07/20}{The \textasciicircum-notation seems
+% to require lower case letters.}
% \changes{babel-greek-1.09h}{2019/07/11}{Move breathing composite commands
% to textalpha.}
% \begin{macrocode}
@@ -1635,7 +1682,7 @@
}% end of the \IfFormatAtLeastTF else block
% \end{macrocode}
%
-% \begin{macro}{\greek@tilde}
+% \begin{macro}{\bbl@greek@tilde}
% By default, the tilde produces an unbreakable space in text mode.
% In polytonic and ancient Greek, we change its meaning to allow
% using |~| in the Latin transliteration of characters with perispomeni.
@@ -1651,15 +1698,10 @@
% active during the definition of \cs{greek@tilde}}
% \changes{greek-1.4}{2013/05/17}{Do not re-define the tilde accent macro:
% it works as expected with \file{lgrenc.def} from \pkg{greek-fontenc}.}
+% \changes{babel-greek-1.13}{2023/03/15}{Renamed from \cs{greek@tilde}.
+% Simplify definition.}
% \begin{macrocode}
- \begingroup
- \@ifundefined{active@char\string!}{}{\catcode`!=12\relax}
- \catcode`\~=12%
- \lccode`\!=`\~%
- \lowercase{\def\x{\endgroup
- \def\greek@tilde{!}}\x}
- \addto\extraspolutonikogreek{\languageshorthands{greek}}
- \declare@shorthand{greek}{~}{\greek@tilde}
+ \DeclareTextSymbol{\bbl@greek@tilde}{LGR}{126}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
index 067c3d11b1..8699cde837 100644
--- a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf b/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
index fa56892ffa..4f1fd57796 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/test-athnum.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-case-changing-minimal.tex b/macros/latex/contrib/babel-contrib/greek/test-case-changing-minimal.tex
new file mode 100644
index 0000000000..f90e2e1e24
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-case-changing-minimal.tex
@@ -0,0 +1,75 @@
+\documentclass[a4paper]{article}
+% \usepackage[greek,english]{babel} % babel-greek
+\usepackage[greek,english,provide=*]{babel} % Babel's Greek "ini"
+
+\usepackage{parskip}
+\newcommand{\langGreek}{\foreignlanguage{greek}}
+% \renewcommand{\langGreek}{} % check without language change
+
+
+\ifdefined \UnicodeEncodingName
+ \usepackage{fontspec}
+ \setmainfont{FreeSerif}
+ \newcommand*{\texengine}{Xe/LuaLaTeX}
+\else
+ \usepackage{lmodern}
+ \newcommand*{\texengine}{pdfLaTeX}
+\fi
+
+
+\begin{document}
+
+Greek question mark:
+\langGreek{; → \MakeUppercase{;}}
+
+Latin accents:
+\langGreek{ᾰ Ᾰ ῐ Ῐ ῠ ᾱ Ᾱ ῑ Ῑ ῡ → \MakeUppercase{ᾰ Ᾰ ῐ Ῐ ῠ ᾱ Ᾱ ῑ Ῑ ῡ}}
+
+hiatus:
+\newcommand*{\hiatest}{άι, άυ, έι, ἄι, ἄυ, ἔι, ἀυ}
+\langGreek{\hiatest{} → \MakeUppercase{\hiatest{}}}
+
+\langGreek{ἀυπνία → \MakeUppercase{ἀυπνία}}
+
+Spacing prosgegrammeni:
+\langGreek{ι → \MakeUppercase{ι}}
+
+Spacing accents:
+\langGreek{῀ ` ´ ῾ ᾽ ᾿ \quad ῍ ῎ ῝ ῞ ῟ ῏ ῭ ΅ ῁ →
+ \MakeUppercase{῀ ` ´ ῾ ᾽ ᾿ \quad ῍ ῎ ῝ ῞ ῟ ῏ ῭ ΅ ῁}}
+
+Eta with tonos:
+\langGreek{ή, Ή → \MakeUppercase{ή, Ή}}.
+
+\end{document}
+
+Upcasing/downcasing literal chars of the "Greek and Coptic" and "Greek
+Extended" Unicode block now works without errors.
+
+Problems (in order of urgence):
+
+* Uppercase of character 0x37E GREEK QUESTION MARK is 0x3B SEMICOLON which is
+ mapped to a middle dot (0x387 GREEK ANO TELEIA) by LGR:
+
+* The “educational”/“Latin” accents *macron* and *breve* (*vrachy*) should
+ be kept (they stay above capital letters similar to the dialytika,
+ they are kept by Apostolos Syropoulos' “xgreek” package and in babel-greek
+ “since ages”):
+
+* Auto-Hiatus also required after
+ 0x1F00 GREEK SMALL LETTER ALPHA WITH PSILI + iota or upsilon.
+
+* Spacing prosgegrammeni turned to capital Iota (kept as prosgegrammeni with
+ old MakeUppercase).
+
+* Spacing 0x1FEF GREEK VARIA becomes 0x2018 LEFT SINGLE QUOTATION MARK
+ (visible difference with XeTeX and DejaVu),
+
+* Non-uniform handling of spacing diacritics: Single diacritics are kept,
+ combining diacritics are mapped to single diacritics.
+ (The old implementation handled spacing diacritics similar to
+ diacritics in accented letters.)
+
+* How to treat MakeUppercase of a single captial GREEK CAPITAL LETTER ETA
+ WITH TONOS? Currently, it is treated differently from the small
+ equivalent.
diff --git a/macros/latex/contrib/babel-contrib/greek/test-case-changing-varia-tu.tex b/macros/latex/contrib/babel-contrib/greek/test-case-changing-varia-tu.tex
new file mode 100644
index 0000000000..a70e127ffa
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-case-changing-varia-tu.tex
@@ -0,0 +1,41 @@
+\documentclass[a4paper]{article}
+\usepackage[greek,english,provide=*]{babel} % Babel's Greek "ini"
+\newcommand{\langGreek}{\foreignlanguage{greek}}
+
+\usepackage{fontspec}
+\setmainfont{FreeSerif}
+% \setmainfont{DejaVu Serif}
+% \setmainfont{Droid Sans}
+% \setmainfont{Linux Libertine O}
+% \setmainfont{Liberation Serif}
+% \setmainfont{cmunrm.otf}
+
+\begin{document}
+
+
+U+1FEF GREEK VARIA and U+1FFD GREEK OXIA
+
+English: ` ´ → \MakeUppercase{` ´}
+
+Greek: \langGreek{` ´ → \MakeUppercase{` ´}}
+
+
+U+0060 GRAVE ACCENT and U+00B4 ACUTE ACCENT
+
+English: ` ´ → \MakeUppercase{` ´}
+
+Greek: \langGreek{` ´ → \MakeUppercase{` ´}}
+
+
+\end{document}
+
+
+* Spacing U+1FEF GREEK VARIA becomes U+2018 LEFT SINGLE QUOTATION MARK
+ (visible difference with XeTeX and DejaVu),
+
+With old MakeUppercase: Spacing accents: ῀ ` ´ ῾ ᾽ ᾿ → ῀ ` ´ ῾ ᾽ ᾿
+
+With new MakeUppercase: Spacing accents: ῀ ` ´ ῾ ᾽ ᾿ → ῀ ‘ ´ ῾ ᾽ ᾿
+
+U+0060 GRAVE ACCENT and U+00B4 ACUTE ACCENT
+English: ‘ ´ → ‘ ´
diff --git a/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex b/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
index c2b61596ad..053cfb7330 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-case-changing.tex
@@ -9,7 +9,7 @@
\ifdefined \UnicodeEncodingName
\usepackage{fontspec}
- \setmainfont[Scale=0.92]{DejaVu Serif}
+ \setmainfont{FreeSerif}
\newcommand*{\texengine}{Xe/LuaLaTeX}
\else
\usepackage{lmodern}
@@ -47,6 +47,16 @@
\fi
}
+% test effect of new implementations on compilation time:
+%
+% pdflatex from TL22 is about 7 times slower than the version from TL21
+% (7s vs. 1s for this document with 13 pages).
+% With the dummy definitons,
+% \renewcommand{\MakeUppercase}{}
+% \renewcommand{\MakeLowercase}{}
+% pdflatex from TL22 is a bit faster than before
+% (0.7s vs. 1s for this document),
+
% -----------------------------------------------------------------------
\begin{document}
@@ -79,7 +89,8 @@ Characters from the Greek and Coptic Unicode block that are supported by
ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο \\
π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ ␣ \\
ϐ ϑ ␣ ␣ ␣ ϕ ϖ ␣ Ϙ ϙ Ϛ ϛ Ϝ ϝ Ϟ ϟ \\
- Ϡ ϡ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣
+ Ϡ ϡ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ϰ ϱ ϴ ϵ ␣ \\
+
}
\begin{quote}
\selectlanguage{greek}
@@ -923,18 +934,20 @@ MakeLowercase:
Every second line is input as Latin transliteration:
+\let\:\textvisiblespace
+
\renewcommand{\GreekAndCoptic}{%
ͺ ; ␣ ␣ ΄ ΅ Ά · Έ Ή Ί ␣ Ό ␣ Ύ Ώ \\
- \lgrfont{ | ? ␣ ␣ ' "' 'A ; 'E 'H 'I ␣ 'O ␣ 'U 'W} \\
+ \lgrfont{ | ? \: \: ' "' 'A ; 'E 'H 'I \:'O \:'U 'W} \\
ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο \\
\lgrfont{'"i A B G D E Z H J I K L M N X O} \\
Π Ρ ␣ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί \\
- \lgrfont{ P R ␣ S T U F Q Y W "I "U 'a 'e 'h 'i} \\
+ \lgrfont{ P R \: S T U F Q Y W "I "U 'a 'e 'h 'i} \\
ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο \\
\lgrfont{'"u a b g d e z h j i k l m n x o} \\
π ρ ς σ τ υ φ χ ψ ω ϊ ϋ ό ύ ώ ␣ \\
\lgrfont{ p r s s\textcompwordmark{}
- t u f q y w "i "u 'o 'u 'w ␣}
+ t u f q y w "i "u 'o 'u 'w \:}
}
\begin{quote}
@@ -979,15 +992,15 @@ variant is \emph\GreekLanguageVariant.
ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
\lgrfont{>a <a >`a <`a >'a <'a >~a <~a >A <A >`A <`A >'A <'A >~A <~A } \\
ἐ ἑ ἒ ἓ ἔ ἕ ␣ ␣ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
- \lgrfont{>e <e >`e <`e >'e <'e ␣ ␣ >E <E >`E <`E >'E <'E } \\
+ \lgrfont{>e <e >`e <`e >'e <'e \: \: >E <E >`E <`E >'E <'E } \\
ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
\lgrfont{>h <h >`h <`h >'h <'h >~h <~h >H <H >`H <`H >'H <'H >~H <~H } \\
ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
\lgrfont{>i <i >`i <`i >'i <'i >~i <~i >I <I >`I <`I >'I <'I >~I <~I } \\
ὀ ὁ ὂ ὃ ὄ ὅ ␣ ␣ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
- \lgrfont{>o <o >`o <`o >'o <'o ␣ ␣ >O <O >`O <`O >'O <'O } \\
+ \lgrfont{>o <o >`o <`o >'o <'o \: \: >O <O >`O <`O >'O <'O } \\
ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ ␣ Ὑ ␣ Ὓ ␣ Ὕ ␣ Ὗ \\
- \lgrfont{>u <u >`u <`u >'u <'u >~u <~u ␣ <U ␣ <`U ␣ <'U ␣ <~U } \\
+ \lgrfont{>u <u >`u <`u >'u <'u >~u <~u \: <U \: <`U \: <'U \: <~U } \\
ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
\lgrfont{>w <w >`w <`w >'w <'w >~w <~w >W <W >`W <`W >'W <'W >~W <~W } \\
ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
@@ -999,15 +1012,15 @@ variant is \emph\GreekLanguageVariant.
ᾠ ᾡ ᾢ ᾣ ᾤ ᾦ ᾧ ᾥ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
\lgrfont{>w| <w| >`w| <`w| >'w| <'w| >~w| <~w| >W| <W| >`W| <`W| >'W| <'W| >~W| <~W|} \\
ᾰ ᾱ ᾲ ᾳ ᾴ ␣ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
-\lgrfont{\u{a} \=a `a| a| 'a| ␣ ~a ~a| \u{A} \=A `A 'A A| > | > } \\
+\lgrfont{\u{a} \=a `a| a| 'a| \: ~a ~a| \u{A} \=A `A 'A A| > | > } \\
῀ ῁ ῂ ῃ ῄ ␣ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
- \lgrfont{~ "~ `h| h| 'h| ␣ ~h ~h| `E 'E `H 'H H| >` >' ~> } \\
+ \lgrfont{~ "~ `h| h| 'h| \: ~h ~h| `E 'E `H 'H H| >` >' ~> } \\
ῐ ῑ ῒ ΐ ␣ ␣ ῖ ῗ Ῐ Ῑ Ὶ Ί ␣ ῝ ῞ ῟ \\
-\lgrfont{\u{i} \=i `"i '"i ␣ ␣ ~i ~"i \u{I} \=I `I 'I ␣ <` <' ~< } \\
+\lgrfont{\u{i} \=i `"i '"i \: \: ~i ~"i \u{I} \=I `I 'I \: <` <' ~< } \\
ῠ ῡ ῢ ΰ ␣ ␣ ῤ ῥ ῦ ῧ Ὺ Ύ Ῥ ῭ ΅ ` \\
-\lgrfont{\u{u} \=u `"u '"u ␣ ␣ >r <r ~u ~"u `U 'U <R `" '" ` } \\
+\lgrfont{\u{u} \=u `"u '"u \: \: >r <r ~u ~"u `U 'U <R `" '" ` } \\
␣ ␣ ῲ ῳ ῴ ␣ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ \\
- \lgrfont{ ␣ ␣ `w| w| 'w| ␣ ~w ~w| `O 'O `W 'W W| ' < } \\
+ \lgrfont{ \: \: `w| w| 'w| \: ~w ~w| `O 'O `W 'W W| ' < }
}
\begin{quote}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex b/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex
index f6fe1e15be..244ee3e345 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek-ini.tex
@@ -43,7 +43,7 @@
\newcommand{\SETUPDOC}{%
This test uses Babel's built-in Greek support (``ini'' file,
cf. \href{https://latex3.github.io/babel/guides/locale-greek.html}
-{Babel guides ``Greek''}).
+{Babel>Locales>Greek}).
The following problems can be easily fixed by loading the \emph{textalpha}
package.
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
index 2abc4e024d..2f1b83bc17 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
index 8c72c355a6..a2c59ed48e 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
@@ -1,5 +1,5 @@
% Test document for Babel-Greek
-% © 2013, 2022 Günter Milde
+% © 2013, 2023 Günter Milde
% Configuration constants (see test-greek-8bit-luatex.tex for a use case)
@@ -33,29 +33,32 @@
% Load and configure Babel:
- % Default: modern monotonic Greek
\usepackage[greek,% comment out "greek" to test the "basic support"
% greek.local-LGR-fixes,
english]{babel}
% Uncomment the desired language variant
+ % Default: modern monotonic Greek
+ %
\languageattribute{greek}{polutoniko} % "modern" polytonic Greek
+ % \languageattribute{greek}{polytonic} % alias for polutoniko
% \languageattribute{greek}{ancient} % ancient Greek
-
- % The "polytonic" language attribute is an alias for "polutoniko" matching
- % the spelling in polyglossia and Babel *.ini files.
- % \languageattribute{greek}{polytonic}
-
+ %
% Support for the pseudo-language "polutonikogreek", used instead of "greek",
% is kept for backwards compatibility:
% \usepackage[polutonikogreek,english]{babel}
-
+ %
% For backwards compatibility, you can also use
% \selectlanguage{polutonikogreek} instead of \selectlanguage{greek} etc.
% if the "polutoniko" Greek language variant is selected.
-}
-\providecommand{\SETUPDOC}{}
+ % Make ; active to prevent mapping to a middle dot:
+ \languageattribute{greek}{keep-semicolon}
+}
+\providecommand{\SETUPDOC}{
+ Test the support for the Greek language as defined in the file
+ \file{greek.ldf} (source \file{greek.dtx}).
+}
\documentclass[a4paper]{article}
@@ -115,9 +118,6 @@
\date{\today}
\maketitle
-Test support for the Greek language as defined in the file
-\file{greek.ldf} (source \file{greek.dtx}).
-
\SETUPDOC % print additional setup information.
\tableofcontents
@@ -134,6 +134,18 @@ The declaration \verb|\selectlanguage| switches between languages.
ἐρῶν άπῆλθες εὐθύς;
\end{quote}
+\textbf{Warning: With 8-bit TeX, Latin letters and some symbols in the input
+are mapped to Greek equivalents!}.
+Without precautions, quotes copied from external sources (like this Wikpedia
+entry about the question mark) may come out simply wrong:
+\begin{quote}
+ \selectlanguage{greek}
+ Το \textbf{ερωτηματικό} (ελλ. \textbf{;} , λατ. \textbf{?}) είναι το
+ σημείο στίξης το οποίο τοποθετείται στο τέλος κάθε ευθείας ερωτηματικής
+ πρότασης σε πολλές γλώσσες.
+\end{quote}
+See section~\ref{Latin transliteration} for remedies.
+
The command \verb|\foreignlanguage| sets its second argument in the language
specified as first argument. This is intended for short text parts or
single words like \foreignlanguage{greek}{Βιβλιοθήκη}.
@@ -147,13 +159,13 @@ There should be no inserted space before or after the language switch (this
may happen if there are unescaped linebreaks in the font or language
definitions):
\begin{quotation}
- Change script with \verb|ensuregreek|: |\ensuregreek{δοῦλος}|.
+ Change script with \cs{ensuregreek}: |\ensuregreek{δοῦλος}|.
- Change
- language with \verb|\foreignlanguage|: |\foreignlanguage{greek}{δοῦλος}|.
+ Change language with \cs{foreignlanguage}:
+ |\foreignlanguage{greek}{δοῦλος}|.
- Change language with \verb|\selectlanguage|:
- |\selectlanguage{greek}δοῦλος\selectlanguage{english}|.
+ Change language with \cs{selectlanguage}:
+ |\selectlanguage{greek}δοῦλος\selectlanguage{english}|.
\end{quotation}
@@ -286,8 +298,9 @@ English paragraph with Greek script (\verb|\ensuregreek|): no hypenation
\verb|\Greeknumeral| for the conversion of Arabic numbers from 1 to 999\,999
into their Greek counterparts (\greeknumeral{1}, \greeknumeral{2},
\greeknumeral{3}, \ldots, \greeknumeral{999999}).
-See \file{babel-greek.pdf} for the formation rules and configuration
-options and \file{test-greeknum.pdf} for samples.
+See \href{babel-greek-doc.html#greek-numerals}{babel-greek-doc}
+for the formation rules and configuration options
+and \file{test-greeknum.pdf} for samples.
Examples:
@@ -383,7 +396,8 @@ If it is TU, \emph{babel-greek} loads Greek LICR definitions from the file
\fi
-\subsection{LGR's \emph{Latin transliteration}}
+\subsection{LGR's \emph{Latin transliteration}%
+ \label{Latin transliteration}}
LGR has Greek characters in the slots reserved for Latin characters and
other symbols in a TeX \emph{standard text font encoding}.
@@ -438,6 +452,44 @@ The Latin transliteration works in LGR but not TU:
\end{quote}
\fi
+\subsubsection{The \texttt{keep-semicolon} attribute}
+
+The LGR font encoding uses the Latin question mark as input for the
+\emph{erotimatiko} and maps the semicolon to a middle dot (\emph{ano
+teleia}). As a result, Unicode-encoded texts that use the semicolon as
+\emph{erotimatiko} end up with an \emph{ano teleia} in its place:
+
+The character 037E GREEK QUESTION MARK works with both, Xe/LuaTeX and 8-bit
+TeX. However it is deprecated and Unicode normalizes it to 003B SEMICOLON.
+This means that even texts wich use the GREEK QUESTION MARK may and up with
+SEMICOLON after drag-and-drop or other processing and with a middle dot in
+the final output.
+
+With the \texttt{keep-semicolon} language attribute, 003B SEMICOLON is made
+active and inserts an \emph{erotimatiko} also with LGR encoded fonts, if the
+text language is set to Greek:
+
+\begin{tabular}{lcccl}
+ Input & \latinencoding{} & \greekfontencoding & Greek \\
+ 003F QUESTION MARK & ? & \ensuregreek{?}
+ & \foreignlanguage{greek}{?} \\
+ \\
+ 037E GREEK QUESTION MARK & ␣ & \ensuregreek{;}
+ & \foreignlanguage{greek}{;}
+ & not defined for T1 \\
+ 003B SEMICOLON & ; & \ensuregreek{;}
+ & \foreignlanguage{greek}{;} \\
+ 00B7 MIDDLE DOT & · & \ensuregreek{·}
+ & \foreignlanguage{greek}{·} \\
+\end{tabular}
+
+This attribute is ignored with Unicode fonts (where the SEMICOLON literal
+always prints a semicolon character).
+
+Test in math mode:
+\newcommand{\semicolontest}{ab; $a b; a\;b, (\mathrm{a;}\textrm{a;}2)$}
+English: \semicolontest, Greek: \foreignlanguage{greek}{\semicolontest}.
+
\subsubsection{LGR-proofed macros}
\emph{Babel-greek} provides LGR-local variants for some
@@ -464,6 +516,7 @@ LGR fonts have a middle dot glyph at the place of the ampersand. The new
% \lgrfont{|\textcopyright|\textregistered|\texttrademark|
% A\textampersand W.}
+
\ifdefined\lgrfont% babel-greek and LGR font encoding loaded
\subsection{LGR re-definitions \label{sec:LGR-redefinitions}}
@@ -481,7 +534,7 @@ LGR fonts have a middle dot glyph at the place of the ampersand. The new
\makeatletter
\newcommand{\RomanNumeralTest}{\f@encoding:
\romannumeral 1, \romannumeral 2, \romannumeral 3,
- \romannumeral 4, \ldots, \romannumeral 1975}
+ \romannumeral 4, \ldots, \romannumeral 1975}
\makeatother
\begin{quote}
\RomanNumeralTest\\
@@ -605,8 +658,7 @@ With the pre-2022/06 \cs{MakeUppercase}, automatic upcasing of words with
letters as macro or via the Latin transliteration.
With the current (2023/02/10) \cs{MakeUppercase}, it works for literal
-Unicode input and named accents. The definitions in \texttt{*enc.def} files,
-\texttt{uccode}s and the \texttt{@uclclist} are ignored.
+Unicode input and named accents. The \cs{uccode} changes are ignored.
\subsection{Changed uccode/lccode values for LGR}
@@ -619,13 +671,13 @@ To minimise side-effects (see below), uc/lccodes are only changed:
\begin{itemize}
\item if \cs{greekfontencoding} is a ``short macro'' expanding to LGR,%
\footnote{i.e. not in documents using Unicode fonts unless
- \cs{greekfontencoding} is explicitly set to \texttt{LGR} before
- loading \emph{babel-greek}}
- \item if the LaTeX version is older than 2022/06, as uccodes are ignored
- by the \cs{MakeUppercase} implementation introduced in this version
+ \cs{greekfontencoding} is explicitly set to \texttt{LGR} before
+ loading \emph{babel-greek}}
+ \item if the LaTeX version is older than 2022/06, as \cs{uccode}s are ignored
+ by the \cs{MakeUppercase} implementation introduced in this version,
\item for accents that are actually required in the selcected language
variant (i.e. only for the \emph{tonos}, if the language variant
- is the default ``monotonic''.
+ is the default ``monotonic''.
\end{itemize}
With \cs{greekfontencoding} \greekfontencoding, LaTeX version \fmtversion,
@@ -671,10 +723,11 @@ With babel-greek versions up to 1.11, using the tilde for the
{LaTeX News 28}}
Version 1.12 fixes the issue so that all three input variants work again
(with LaTeX versions up to 2022/06)%
-\footnote{There are new issues with the implementation of \cs{MakeUppercase}
+\footnote{The implementation of \cs{MakeUppercase}
introduced in the 2022/06 LaTeX release, cf.\
\href{https://www.latex-project.org/news/latex2e-news/ltnews35.pdf}%
- {LaTeX News 35}}
+ {LaTeX News 35}, works (almost) fine with literal input but currently
+ fails with the Latin transliteration and standard accent macros.}
\begin{quote}
\selectlanguage{greek}
\greektext
diff --git a/macros/latex/contrib/babel-contrib/greek/test-tildeshorthand.tex b/macros/latex/contrib/babel-contrib/greek/test-tildeshorthand.tex
new file mode 100644
index 0000000000..47bc628236
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-tildeshorthand.tex
@@ -0,0 +1,106 @@
+% Backrolling does not work for \MakeUppercase (cf. LaTeX News 35)
+% \RequirePackage{latexbug}
+%\RequirePackage[2022-05-01]{latexrelease}
+
+\documentclass[a4paper]{article}
+
+\usepackage[LGR,T1]{fontenc}
+\usepackage{lmodern}
+
+\ifdefined \UnicodeEncodingName
+ \usepackage{fontspec}
+ \setmainfont{FreeSerif}
+ \newcommand*{\texengine}{Xe/LuaLaTeX}
+\else
+ \usepackage{lmodern}
+ \newcommand*{\texengine}{pdfLaTeX}
+\fi
+
+% Load encoding definitions
+\usepackage[normalize-symbols]{textalpha} % "Greek script everywhere"
+
+% With TL22, the special handling of Greek UPPERCASE is only triggered
+% if the text language is set to "greek" with Babel:
+%
+\usepackage[greek,english]{babel} % babel-greek
+% \usepackage[greek,english,provide=*]{babel} % Babel's Greek "ini"
+\languageattribute{greek}{polutoniko} % "modern" polytonic Greek
+
+
+\usepackage[unicode,colorlinks,linkcolor=blue]{hyperref}
+\usepackage{bookmark}
+
+% Auxiliary commands
+
+\newcommand{\langGreek}{\foreignlanguage{greek}}
+
+% print the selected language variant
+\newcommand{\GreekLanguageVariant}{%
+ \ifx\captionsgreek\captionspolutonikogreek
+ \ifx\captionsgreek\captionsancientgreek
+ ancient%
+ \else
+ polutoniko%
+ \fi
+ \else
+ monotoniko%
+ \fi
+}
+
+% test effect of new implementations on compilation time:
+%
+% pdflatex from TL22 is about 7 times slower than the version from TL21
+% (7s vs. 1s for this document with 13 pages).
+% With the dummy definitons,
+% \renewcommand{\MakeUppercase}{}
+% \renewcommand{\MakeLowercase}{}
+% pdflatex from TL22 is a bit faster than before
+% (0.7s vs. 1s for this document),
+
+% -----------------------------------------------------------------------
+
+\begin{document}
+
+ \selectlanguage{greek}
+
+
+\raggedright
+ % ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
+ % \lgrfont{>a <a >`a <`a >'a <'a >~a <~a >A <A >`A <`A >'A <'A >~A <~A } \\
+ % ἐ ἑ ἒ ἓ ἔ ἕ ␣ ␣ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
+ % \lgrfont{>e <e >`e <`e >'e <'e \: \: >E <E >`E <`E >'E <'E } \\
+ % ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
+ % \lgrfont{>h <h >`h <`h >'h <'h >~h <~h >H <H >`H <`H >'H <'H >~H <~H } \\
+ % ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
+ % \lgrfont{>i <i >`i <`i >'i <'i >~i <~i >I <I >`I <`I >'I <'I >~I <~I } \\
+ % ὀ ὁ ὂ ὃ ὄ ὅ ␣ ␣ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
+ % \lgrfont{>o <o >`o <`o >'o <'o \: \: >O <O >`O <`O >'O <'O } \\
+ % ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ ␣ Ὑ ␣ Ὓ ␣ Ὕ ␣ Ὗ \\
+ % \lgrfont{>u <u >`u <`u >'u <'u >~u <~u \: <U \: <`U \: <'U \: <~U } \\
+ % ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
+ % \lgrfont{>w <w >`w <`w >'w <'w >~w <~w >W <W >`W <`W >'W <'W >~W <~W } \\
+ % ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
+ % \lgrfont{`a 'a `e 'e `h 'h `i 'i `o 'o `u 'u `w 'w } \\
+ % ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
+ % \lgrfont{>a| <a| >`a| <`a| >'a| <'a| >~a| <~a| >A| <A| >`A| <`A| >'A| <'A| >~A| <~A|} \\
+ % ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
+ % \lgrfont{>h| <h| >`h| <`h| >'h| <'h| >~h| <~h| >H| <H| >`H| <`H| >'H| <'H| >~H| <~H|} \\
+ % ᾠ ᾡ ᾢ ᾣ ᾤ ᾦ ᾧ ᾥ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
+ % \lgrfont{>w| <w| >`w| <`w| >'w| <'w| >~w| <~w| >W| <W| >`W| <`W| >'W| <'W| >~W| <~W|} \\
+ % ᾰ ᾱ ᾲ ᾳ ᾴ ␣ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
+% \lgrfont{\u{a} \=a `a| a| 'a| \: ~a ~a| \u{A} \=A `A 'A A| > | > } \\
+ % ῀ ῁ ῂ ῃ ῄ ␣ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
+\lgrfont{~ "~ `h| h| 'h|
+ % \: ~h ~h| `E
+ % 'E `H 'H H| >` >' ~>
+ } \\
+ % ῐ ῑ ῒ ΐ ␣ ␣ ῖ ῗ Ῐ Ῑ Ὶ Ί ␣ ῝ ῞ ῟ \\
+% \lgrfont{\u{i} \=i `"i '"i \: \: ~i ~"i \u{I} \=I `I 'I \: <` <' ~< } \\
+ % ῠ ῡ ῢ ΰ ␣ ␣ ῤ ῥ ῦ ῧ Ὺ Ύ Ῥ ῭ ΅ ` \\
+% \lgrfont{\u{u} \=u `"u '"u \: \: >r <r ~u ~"u `U 'U <R `" '" ` } \\
+ % ␣ ␣ ῲ ῳ ῴ ␣ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ \\
+ % \lgrfont{ \: \: `w| w| 'w| \: ~w ~w| `O 'O `W 'W W| ' < }
+
+
+
+\end{document}
diff --git a/macros/latex/contrib/babel-contrib/greek/unicode-examples.pdf b/macros/latex/contrib/babel-contrib/greek/unicode-examples.pdf
new file mode 100644
index 0000000000..d9be7bf69e
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/unicode-examples.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/unicode-examples.tex b/macros/latex/contrib/babel-contrib/greek/unicode-examples.tex
new file mode 100644
index 0000000000..6a466c05dc
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/unicode-examples.tex
@@ -0,0 +1,57 @@
+\documentclass{article}
+
+\ifdefined \UnicodeEncodingName
+ \usepackage{fontspec}
+ \setmainfont[Scale=0.92]{DejaVu Serif}
+\fi
+
+% Babel is required for hyphenation and the post-2022/06 \MakeUppercase
+% \usepackage[greek]{babel}
+
+\usepackage{xgreek}
+
+\newcommand*\uppercasetest[1]{\noindent#1 →\par\MakeUppercase{#1}\par}
+
+\begin{document}
+
+% examples from https://icu.unicode.org/design/case/greek-upper
+% See there for the expected output
+\uppercasetest{άδικος, κείμενο, ίριδα}
+\uppercasetest{Πατάτα}
+\uppercasetest{Αέρας, Μυστήριο, Ωραίο}
+\uppercasetest{Μαΐου, Πόρος, Ρύθμιση}
+\uppercasetest{ΰ, Τηρώ, Μάιος}
+\uppercasetest{άυλος}
+\uppercasetest{ΑΫΛΟΣ}
+\uppercasetest{Άκλιτα ρήματα ή άκλιτες μετοχές}
+\uppercasetest{Επειδή η αναγνώριση της αξιοπρέπειας}
+\uppercasetest{νομικού ή διεθνούς}
+\uppercasetest{Ἐπειδὴ ἡ ἀναγνώριση}
+\uppercasetest{νομικοῦ ἢ διεθνοῦς} % I need to look at this one
+\uppercasetest{Νέο, Δημιουργία}
+\uppercasetest{Ελάτε να φάτε τα καλύτερα παϊδάκια!}
+\uppercasetest{Μαΐου, τρόλεϊ}
+\uppercasetest{Το ένα ή το άλλο.}
+\uppercasetest{ρωμέικα}
+
+\end{document}
+
+% from http://www.polytoniko.org/kano.php?newlang=en
+% Words with rough breathing
+αἷμα, Αἷμος, αἵρεση,
+εἱρμός, εὑρετήριο
+υἱός
+
+ρολόι → ΡΟΛΟΪ
+
+If a capitalized word begins with a diphthong, the breathing mark is still
+over the second vowel (Αἰτέω). If the word begins with two vowels that do
+not form a diphthong, the breathing mark stands in front of the capital (
+᾽Ιησοῦς).
+
+
+
+
+If placed over a DIPHTHONG, a breathing mark is always above the SECOND
+vowel (e.g. οἱ, εἰ, and Εὐρώπη).
+<https://pressbooks.pub/ancientgreek/chapter/3/>
diff --git a/macros/latex/contrib/babel-contrib/greek/usage.pdf b/macros/latex/contrib/babel-contrib/greek/usage.pdf
index 884321bacf..b05188b9d6 100644
--- a/macros/latex/contrib/babel-contrib/greek/usage.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/usage.pdf
Binary files differ