summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-11-11 03:02:51 +0000
committerNorbert Preining <norbert@preining.info>2020-11-11 03:02:51 +0000
commite29975e266b9584a510953e24a4e8c7efee76e9e (patch)
tree44db7ce2080329d6f919669ceb70657fabbd5c3f /macros/latex/contrib
parent9a05879c627e3f960a2d0645b07dfb25eca005d8 (diff)
CTAN sync 202011110302
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/babel-contrib/greek/Makefile30
-rw-r--r--macros/latex/contrib/babel-contrib/greek/README84
-rw-r--r--macros/latex/contrib/babel-contrib/greek/README.html205
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek.dtx383
-rw-r--r--macros/latex/contrib/babel-contrib/greek/babel-greek.pdfbin254869 -> 255669 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-8bit-greek.pdfbin0 -> 188008 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-8bit-greek.tex422
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek-lgr.pdfbin0 -> 153395 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek-tu.pdfbin0 -> 51599 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.pdfbin233964 -> 0 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greek.tex393
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greeknumeral.pdfbin0 -> 44372 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-greeknumeral.tex236
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-tu-lgr.pdfbin0 -> 43239 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-tu-lgr.tex (renamed from macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.tex)24
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdfbin42751 -> 0 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-unicode-greek.tex259
-rw-r--r--macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdfbin43607 -> 0 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/usage.pdfbin175483 -> 176463 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/greek/usage.tex29
-rw-r--r--macros/latex/contrib/swfigure/#README.txt#46
-rw-r--r--macros/latex/contrib/swfigure/DFscreenshot.pdfbin0 -> 625542 bytes
-rw-r--r--macros/latex/contrib/swfigure/DFscreenshotA3.pngbin0 -> 187574 bytes
-rw-r--r--macros/latex/contrib/swfigure/FSfakeA3.pdfbin0 -> 18201 bytes
-rw-r--r--macros/latex/contrib/swfigure/FSfakeA3margins.pdfbin0 -> 18419 bytes
-rw-r--r--macros/latex/contrib/swfigure/README.txt25
-rw-r--r--macros/latex/contrib/swfigure/swfigure-examples.pdfbin593358 -> 562764 bytes
-rw-r--r--macros/latex/contrib/swfigure/swfigure-examples.tex175
-rw-r--r--macros/latex/contrib/swfigure/swfigure.dtx671
-rw-r--r--macros/latex/contrib/swfigure/swfigure.pdfbin456490 -> 1132412 bytes
-rw-r--r--macros/latex/contrib/vdmlisting/README2
-rw-r--r--macros/latex/contrib/vdmlisting/vdmlisting.pdfbin75045 -> 67324 bytes
-rw-r--r--macros/latex/contrib/vdmlisting/vdmlisting.sty61
-rw-r--r--macros/latex/contrib/vdmlisting/vdmlisting.tex15
34 files changed, 1978 insertions, 1082 deletions
diff --git a/macros/latex/contrib/babel-contrib/greek/Makefile b/macros/latex/contrib/babel-contrib/greek/Makefile
index af860da050..5cfd53df74 100644
--- a/macros/latex/contrib/babel-contrib/greek/Makefile
+++ b/macros/latex/contrib/babel-contrib/greek/Makefile
@@ -22,7 +22,7 @@ SH = sh
# programs
PYLIT = pylit # text <-> source converter for literal programming
RST2HTML = rst2html5 # text -> HTML converter, see docutils.sf.net
-RUBBER = rubber -f # wrapper around `latex`, run until references resolved
+RUBBER = rubber -f --pdf # wrapper around `latex`, run until references resolved
LATEX = pdflatex -interaction batchmode # suppress logging to terminal
# LaTeX source files
@@ -55,28 +55,32 @@ README.html: README
pdf: babel-greek.pdf athnum.pdf grmath.pdf usage.pdf\
- test-greek.pdf test-unicode-greek.pdf test-unicode-lgr.pdf
+ test-greek-lgr.pdf test-greek-tu.pdf test-8bit-greek.pdf \
+ test-tu-lgr.pdf
babel-greek.pdf: babel-greek.dtx
- $(RUBBER) --pdf babel-greek.dtx
+ $(RUBBER) -m hyperref babel-greek.dtx
athnum.pdf: athnum.dtx
- $(RUBBER) --pdf athnum.dtx
+ $(RUBBER) athnum.dtx
grmath.pdf: grmath.dtx
- $(RUBBER) --pdf grmath.dtx
+ $(RUBBER) grmath.dtx
usage.pdf: usage.tex greek.ldf
- $(RUBBER) --pdf usage.tex
+ $(RUBBER) usage.tex
-test-greek.pdf: test-greek.tex greek.ldf
- $(RUBBER) --pdf test-greek.tex
+test-greek-lgr.pdf: test-greek.tex greek.ldf
+ $(RUBBER) --jobname=test-greek-lgr test-greek.tex
-test-unicode-greek.pdf: test-unicode-greek.tex greek.ldf
- $(RUBBER) -m xelatex test-unicode-greek.tex
+test-greek-tu.pdf: test-greek.tex greek.ldf
+ $(RUBBER) -m xelatex --jobname=test-greek-tu test-greek.tex
-test-unicode-lgr.pdf: test-unicode-lgr.tex greek.ldf
- $(RUBBER) -m xelatex test-unicode-lgr.tex
+test-8bit-greek.pdf: test-8bit-greek.tex greek.ldf
+ $(RUBBER) -m hyperref test-8bit-greek.tex
+
+test-tu-lgr.pdf: test-tu-lgr.tex greek.ldf
+ $(RUBBER) -m hyperref -m xelatex test-tu-lgr.tex
# Installation
@@ -101,4 +105,4 @@ install-doc: doc
.PHONY: clean
clean:
- rm -f *.aux *.log *.toc *~
+ rm -f *.aux *.log *.toc *.out *~
diff --git a/macros/latex/contrib/babel-contrib/greek/README b/macros/latex/contrib/babel-contrib/greek/README
index d1f2f3eb1c..45ecf8f1d1 100644
--- a/macros/latex/contrib/babel-contrib/greek/README
+++ b/macros/latex/contrib/babel-contrib/greek/README
@@ -3,8 +3,8 @@ babel-greek
Babel support for the Greek language and script
===============================================
-:Copyright: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
- © 2013 Günter Milde
+:Copyright: © 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
+ © 2013 -- 2020 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.
@@ -54,17 +54,23 @@ News
1.9d 2015-09-04 Remove `grsymb` (macros for Greek symbols).
This package is outdated and obsoleted by greek-fontenc_
(reported by Claudio Beccari).
-.. Unicode uc/lc corrections now in greek-fontenc
- (polyglossia's ``xgreek-fixes.def`` has bugs).
+.. Unicode uc/lc corrections now in greek-fontenc.
1.9e 2015-11-27 Fix bug in lccode-setting loop (patch by Enrico Gregorio).
-1.9f 2016-02-04 Support for standard Unicode text font encoding "TU"
- (new in fontspec v2.5a).
+1.9f 2016-02-04 Support for new standard Unicode text font encoding "TU".
1.9g 2016-09-07 Babel 3.9i deprecated ``\textlatin``
and fixed ``\latinencoding``.
1.9h 2019-07-11 Move breathing composite commands to textalpha_.
1.9i 2020-02-28 Update test for Unicode fonts.
Fix accent in ``\seename`` and ``\alsoname``.
-1.9j 2020/03/17 Fix ampersand in math.
+1.9j 2020-03-17 Fix ampersand in math mode.
+1.10 2020-11-10 Use ``TU`` as ``\greekfontencoding`` for Xe/LuaTeX
+ (set by LaTeX as `default font encoding for Unicode
+ engines`_ since 2017/01/01).
+.. Use zig-zagy ``\textkoppa`` for ``\greeknumeral{90}``.
+.. PDF-string secure implementation of ``\greeknumeral``
+ from hyperref_.
+.. Load ``puenc-greek.def`` (from greek-fontenc_)
+ if used with hyperref (polytonic Greek in PDF-strings).
===== ============ ============================================================
@@ -75,24 +81,24 @@ News
Files
-----
-`<babel-greek.ins>`_; `<babel-greek.pdf>`_
+`<babel-greek.dtx>`_; `<babel-greek.pdf>`_
Source of the language definition file ``greek.ldf`` for use with Babel_.
`<athnum.dtx>`_; `<athnum.pdf>`_
Athenian Numerals.
`<grmath.dtx>`_; `<grmath.pdf>`_
Greek log-like Operators.
-`<test-greek.pdf>`_; `<test-greek.tex>`_
- Tests and Examples for 8-bit TeX.
-`<test-unicode-greek.pdf>`_; `<test-unicode-greek.tex>`_
- Tests and Examples for XeTeX/LuaTeX.
-`<test-unicode-lgr.pdf>`_; `<test-unicode-lgr.tex>`_
+`<babel-greek.ins>`_
+ DocStrip_ batch file.
+`<test-greek.tex>`_ `<test-greek-lgr.pdf>`_ `<test-greek-tu.pdf>`_
+ Test Babel-Greek features.
+`<test-8bit-greek.tex>`_ `<test-8bit-greek.pdf>`_
+ Additional tests and examples for 8-bit TeX.
+`<test-tu-lgr.tex>`_ `<test-tu-lgr.pdf>`_
Tests and Examples for XeTeX/LuaTeX with LGR 8-bit fonts.
-
-`<usage.pdf>`_; `<usage.tex>`_
+`<usage.tex>`_ `<usage.pdf>`_
Description of the `LGR Latin transliteration`_.
-
Requirements
------------
@@ -154,19 +160,6 @@ variant.
For details see `<babel-greek.pdf>`_ and the babel_ documentation.
-With XeTeX/LuaTeX, load fontspec_ before babel_, so that babel-greek can
-set up the Unicode font encoding for use with Greek, e.g. ::
-
- \usepackage{fontspec}
- \setmainfont{Linux Libertine O}
- \setsansfont{Linux Biolinum O}
- \usepackage[greek,english]{babel}
-
-Note, that the default font used with XeTeX/LuaTeX (Latin Modern) misses most
-Greek letters. Warnings about missing charcters are only written to the log
-file, not the console output!
-
-
Input of Greek characters is possible as literal characters (with the
greek-inputenc_ package or with XeTeX or LuaTeX) or the `LGR Latin
transliteration`_. See `<usage.pdf>`_ and the example files provided with
@@ -179,8 +172,11 @@ A list of Greek text fonts for use with LaTeX is available at the CTAN
http://www.ctan.org/topic/font-greek
With the XeTeX or LuaTeX engines, the user should ensure that the chosen
-font contains the required glyphs (the default Latin Modern fonts miss
-them). Examples for suitable fonts are the CM-unicode_ or the `Linux
+font contains the required glyphs: the default Latin Modern fonts miss
+them. Warnings about missing charcters are only written to the log
+file, not the console output! Select a suitable font with fontspec_.
+
+Examples for suitable fonts are the CM-unicode_ or the `Linux
Libertine`_ OpenType fonts as well as any system-wide installed OTF fonts
that support Greek (e.g. `Deja Vu`_).
@@ -203,21 +199,23 @@ The following ASCII characters are converted to Greek symbols:
= = = = = = = = = = = = = = = = = = = = = = = = =
A B G D E Z H J I K L M N X O P R S T U F Q Y W
Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω
+- - - - - - - - - - - - - - - - - - - - - - - - -
+- - - - - - - - - - - - - - - - - - - - - - - - -
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 ``'`` ά semicolon ``;`` ·
-varia \` ὰ question mark ``?`` ;
-perispomeni ``~`` ᾶ left apostrophe \` \` ‘
-dasia ``<`` ἁ right apostrophe ``''`` ’
-psili ``>`` ἀ left quotation mark ``((`` «
-ypogegrammeni ``|`` ᾳ right quotation mark ``))`` »
-dialytika ``"`` ϊ zero width non-joiner v
-================= ===== == ====================== ======== ====
+================= ====== == ====================== ======== ====
+tonos ``'a`` ά semicolon ``;`` ·
+varia \`a ὰ question mark ``?`` ;
+perispomeni ``~a`` ᾶ left apostrophe \` \` ‘
+dasia ``<a`` ἁ right apostrophe ``''`` ’
+psili ``>a`` ἀ left quotation mark ``((`` «
+ypogegrammeni ``a|`` ᾳ right quotation mark ``))`` »
+dialytika ``"i`` ϊ zero width non-joiner v
+================= ====== == ====================== ======== ====
A major drawback of the LGR transliteration is that you cannot access Latin
letters and some symbols if LGR is the active font encoding (e.g. in
@@ -233,13 +231,15 @@ Unicode (with XeTeX or LuaTeX).
.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
.. _babel: http://www.ctan.org/pkg/babel
.. _docstrip: http://www.ctan.org/pkg/docstrip
-.. _font encoding: http://mirror.ctan.org/macros/latex/doc/encguide.pdf
+.. _font encoding: http://mirror.ctan.org/macros/latex/base/encguide.pdf
.. _fontspec: http://www.ctan.org/pkg/fontspec
+.. _fontenc: http://www.ctan.org/pkg/fontenc
.. _CB Fonts: http://www.ctan.org/pkg/cbgreek-complete
.. _CM-unicode: http://www.ctan.org/pkg/cm-unicode
.. _Deja Vu: http://dejavu-fonts.org
.. _e-TeX: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=etex
.. _grtimes: http://www.ctan.org/pkg/grtimes
+.. _hyperref: http://www.ctan.org/pkg/hyperref
.. _textalpha:
.. _greek-fontenc: http://www.ctan.org/pkg/greek-fontenc
.. _greek-inputenc: http://www.ctan.org/pkg/greek-inputenc
@@ -249,3 +249,5 @@ Unicode (with XeTeX or LuaTeX).
.. _polyglossia: http://www.ctan.org/pkg/polyglossia
.. _substitutefont: http://www.ctan.org/pkg/substitutefont
.. _texdoc: http://www.ctan.org/pkg/texdoc
+.. _default font encoding for Unicode engines:
+ https://www.latex-project.org/news/latex2e-news/ltnews26.pdf
diff --git a/macros/latex/contrib/babel-contrib/greek/README.html b/macros/latex/contrib/babel-contrib/greek/README.html
index bcc2df90d5..5b098647b3 100644
--- a/macros/latex/contrib/babel-contrib/greek/README.html
+++ b/macros/latex/contrib/babel-contrib/greek/README.html
@@ -4,8 +4,8 @@
<meta charset="utf-8"/>
<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>babel-greek</title>
-<meta name="dcterms.rights" content="© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms, © 2013 Günter Milde" />
-<link rel="schema.dcterms" href="http://purl.org/dc/terms/">
+<meta name="dcterms.rights" content="© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms, © 2013 – 2020 Günter Milde." />
+<link rel="schema.dcterms" href="http://purl.org/dc/terms/"/>
<style type="text/css">
/* Minimal style sheet for the HTML output of Docutils. */
@@ -50,33 +50,31 @@ p.system-message-title {
font-weight: bold;
}
h1 + p.subtitle,
-h1 + p.section-subtitle {
+h2 + p.section-subtitle {
font-size: 1.6em;
}
-h2 + p.section-subtitle { font-size: 1.28em; }
+h3 + p.section-subtitle {
+ font-size: 1.28em;
+}
p.subtitle,
p.section-subtitle,
p.sidebar-subtitle {
font-weight: bold;
margin-top: -0.5em;
}
-p.sidebar-title,
+p.sidebar-title {
+ font-size: larger;
+}
p.rubric {
font-size: larger;
+ color: maroon;
}
-p.rubric { color: maroon; }
a.toc-backref {
color: black;
text-decoration: none; }
/* Warnings, Errors */
-div.caution p.admonition-title,
-div.attention p.admonition-title,
-div.danger p.admonition-title,
-div.error p.admonition-title,
-div.warning p.admonition-title,
-div.system-messages h1,
-div.error,
+div.system-messages h2,
span.problematic,
p.system-message-title {
color: red;
@@ -213,8 +211,6 @@ object.align-right,
table.align-right {
margin-left: auto;
}
-.figure.align-center, .figure.align-right,
-figure.align-center, figure.align-right,
img.align-center, img.align-right,
object.align-center, object.align-right {
display: block;
@@ -226,18 +222,6 @@ table.align-left, table.align-center, table.align-right {
text-align: inherit;
}
-/* Admonitions and System Messages */
-div.admonition,
-div.system-message,
-aside.sidebar {
- margin: 1em 1.5em;
- border: medium outset;
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- padding-right: 1em;
- padding-left: 1em;
-}
-
/* Sidebar */
aside.sidebar {
width: 30%;
@@ -249,6 +233,8 @@ aside.sidebar {
/* Text Blocks */
blockquote,
div.topic,
+div.admonition,
+div.system-message,
pre.literal-block,
pre.doctest-block,
pre.math,
@@ -322,11 +308,11 @@ body {
div.document,
main {
line-height:1.3;
- counter-reset: table;
- /* counter-reset: figure; */
+ counter-reset: table figure;
/* avoid long lines --> better reading */
+ /* optimum is 45…75 characters/line <http://webtypography.net/2.1.2> */
/* OTOH: lines should not be too short because of missing hyphenation, */
- max-width: 50em;
+ max-width: 50em;
padding: 1px 2%; /* 1px on top avoids grey bar above title (mozilla) */
margin: auto;
background-color: white;
@@ -514,7 +500,35 @@ object.align-right {
margin-left: 1em;
}
/* Stop floating sidebars, images and figures at section level 1,2,3 */
-h1, h2, h3 { clear: both; }
+h1, h2, h3, h4 { clear: both; }
+
+/* Numbered figures */
+figure.numbered > figcaption > p:before {
+ counter-increment: figure;
+ content: "Figure " counter(figure) ": ";
+ font-weight: bold;
+}
+
+
+/* Admonitions and System Messages */
+
+div.admonition,
+div.system-message,
+aside.sidebar {
+ border: medium outset;
+ margin: 1em 1.5em;
+ padding: 0.5em 1em;
+}
+
+div.caution p.admonition-title,
+div.attention p.admonition-title,
+div.danger p.admonition-title,
+div.error p.admonition-title,
+div.warning p.admonition-title,
+div.error {
+ color: red;
+}
+
/* Sidebar */
@@ -598,8 +612,8 @@ a { text-decoration: none; }
<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">
<dt class="copyright">Copyright</dt>
-<dd class="copyright">© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
-© 2013 Günter Milde</dd>
+<dd class="copyright">© 1997 Apostolos Syropoulos, Claudio Beccari, Johannes Brahms,
+© 2013 – 2020 Günter Milde.</dd>
<dt class="licence">Licence</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
@@ -617,7 +631,7 @@ orthography of the Greek language.</p>
engines (XeTeX/LuaTeX).</p>
</div>
<section id="news">
-<h1>News</h1>
+<h2>News</h2>
<table class="borderless">
<colgroup>
<col style="width: 6%" />
@@ -726,8 +740,7 @@ This package is outdated and obsoleted by <a class="reference external" href="ht
<tr><td><!-- -->
</td>
<td></td>
-<td><p>Unicode uc/lc corrections now in greek-fontenc
-(polyglossia’s <span class="docutils literal"><span class="pre">xgreek-fixes.def</span></span> has bugs).</p></td>
+<td><p>Unicode uc/lc corrections now in greek-fontenc.</p></td>
</tr>
<tr><td><p>1.9e</p></td>
<td><p>2015-11-27</p></td>
@@ -735,8 +748,7 @@ This package is outdated and obsoleted by <a class="reference external" href="ht
</tr>
<tr><td><p>1.9f</p></td>
<td><p>2016-02-04</p></td>
-<td><p>Support for standard Unicode text font encoding “TU”
-(new in fontspec v2.5a).</p></td>
+<td><p>Support for new standard Unicode text font encoding “TU”.</p></td>
</tr>
<tr><td><p>1.9g</p></td>
<td><p>2016-09-07</p></td>
@@ -753,16 +765,39 @@ and fixed <span class="docutils literal">\latinencoding</span>.</p></td>
Fix accent in <span class="docutils literal">\seename</span> and <span class="docutils literal">\alsoname</span>.</p></td>
</tr>
<tr><td><p>1.9j</p></td>
-<td><p>2020/03/17</p></td>
-<td><p>Fix ampersand in math.</p></td>
+<td><p>2020-03-17</p></td>
+<td><p>Fix ampersand in math mode.</p></td>
+</tr>
+<tr><td><p>1.10</p></td>
+<td><p>2020-11-10</p></td>
+<td><p>Use <span class="docutils literal">TU</span> as <span class="docutils literal">\greekfontencoding</span> for Xe/LuaTeX
+(set by LaTeX as <a class="reference external" href="https://www.latex-project.org/news/latex2e-news/ltnews26.pdf">default font encoding for Unicode
+engines</a> since 2017/01/01).</p></td>
+</tr>
+<tr><td><!-- -->
+</td>
+<td></td>
+<td><p>Use zig-zagy <span class="docutils literal">\textkoppa</span> for <span class="docutils literal">\greeknumeral{90}</span>.</p></td>
+</tr>
+<tr><td><!-- -->
+</td>
+<td></td>
+<td><p>PDF-string secure implementation of <span class="docutils literal">\greeknumeral</span>
+from <a class="reference external" href="http://www.ctan.org/pkg/hyperref">hyperref</a>.</p></td>
+</tr>
+<tr><td><!-- -->
+</td>
+<td></td>
+<td><p>Load <span class="docutils literal"><span class="pre">puenc-greek.def</span></span> (from <a class="reference external" href="http://www.ctan.org/pkg/greek-fontenc">greek-fontenc</a>)
+if used with hyperref (polytonic Greek in PDF-strings).</p></td>
</tr>
</tbody>
</table>
</section>
<section id="files">
-<h1>Files</h1>
+<h2>Files</h2>
<dl class="simple">
-<dt><a class="reference external" href="babel-greek.ins">babel-greek.ins</a>; <a class="reference external" href="babel-greek.pdf">babel-greek.pdf</a></dt>
+<dt><a class="reference external" href="babel-greek.dtx">babel-greek.dtx</a>; <a class="reference external" href="babel-greek.pdf">babel-greek.pdf</a></dt>
<dd><p>Source of the language definition file <span class="docutils literal">greek.ldf</span> for use with <a class="reference external" href="http://www.ctan.org/pkg/babel">Babel</a>.</p>
</dd>
<dt><a class="reference external" href="athnum.dtx">athnum.dtx</a>; <a class="reference external" href="athnum.pdf">athnum.pdf</a></dt>
@@ -771,22 +806,25 @@ Fix accent in <span class="docutils literal">\seename</span> and <span class="do
<dt><a class="reference external" href="grmath.dtx">grmath.dtx</a>; <a class="reference external" href="grmath.pdf">grmath.pdf</a></dt>
<dd><p>Greek log-like Operators.</p>
</dd>
-<dt><a class="reference external" href="test-greek.pdf">test-greek.pdf</a>; <a class="reference external" href="test-greek.tex">test-greek.tex</a></dt>
-<dd><p>Tests and Examples for 8-bit TeX.</p>
+<dt><a class="reference external" href="babel-greek.ins">babel-greek.ins</a></dt>
+<dd><p><a class="reference external" href="http://www.ctan.org/pkg/docstrip">DocStrip</a> batch file.</p>
+</dd>
+<dt><a class="reference external" href="test-greek.tex">test-greek.tex</a> <a class="reference external" href="test-greek-lgr.pdf">test-greek-lgr.pdf</a> <a class="reference external" href="test-greek-tu.pdf">test-greek-tu.pdf</a></dt>
+<dd><p>Test Babel-Greek features.</p>
</dd>
-<dt><a class="reference external" href="test-unicode-greek.pdf">test-unicode-greek.pdf</a>; <a class="reference external" href="test-unicode-greek.tex">test-unicode-greek.tex</a></dt>
-<dd><p>Tests and Examples for XeTeX/LuaTeX.</p>
+<dt><a class="reference external" href="test-8bit-greek.tex">test-8bit-greek.tex</a> <a class="reference external" href="test-8bit-greek.pdf">test-8bit-greek.pdf</a></dt>
+<dd><p>Additional tests and examples for 8-bit TeX.</p>
</dd>
-<dt><a class="reference external" href="test-unicode-lgr.pdf">test-unicode-lgr.pdf</a>; <a class="reference external" href="test-unicode-lgr.tex">test-unicode-lgr.tex</a></dt>
+<dt><a class="reference external" href="test-tu-lgr.tex">test-tu-lgr.tex</a> <a class="reference external" href="test-tu-lgr.pdf">test-tu-lgr.pdf</a></dt>
<dd><p>Tests and Examples for XeTeX/LuaTeX with LGR 8-bit fonts.</p>
</dd>
-<dt><a class="reference external" href="usage.pdf">usage.pdf</a>; <a class="reference external" href="usage.tex">usage.tex</a></dt>
+<dt><a class="reference external" href="usage.tex">usage.tex</a> <a class="reference external" href="usage.pdf">usage.pdf</a></dt>
<dd><p>Description of the <a class="reference internal" href="#lgr-latin-transliteration">LGR Latin transliteration</a>.</p>
</dd>
</dl>
</section>
<section id="requirements">
-<h1>Requirements</h1>
+<h2>Requirements</h2>
<p>The “babel-greek” package requires the <a class="reference external" href="http://www.ctan.org/pkg/babel">babel</a> base package and font
definition files from the <a class="reference external" href="http://www.ctan.org/pkg/greek-fontenc">greek-fontenc</a> package. The <a class="reference external" href="http://www.ctan.org/pkg/greek-inputenc">greek-inputenc</a>
package is recommended when using 8-bit TeX engines.</p>
@@ -794,7 +832,7 @@ package is recommended when using 8-bit TeX engines.</p>
<p>Plain TeX is currently not supported. Patches are welcome.</p>
</section>
<section id="installation">
-<h1>Installation</h1>
+<h2>Installation</h2>
<p>If possible, get this package from your distribution using its installation
manager.</p>
<p>Otherwise, make sure LaTeX can find the required files:</p>
@@ -820,7 +858,7 @@ of these files you want to keep.</p>
</dl>
</section>
<section id="usage">
-<h1>Usage</h1>
+<h2>Usage</h2>
<p>Use the “greek” document option or pass the “greek” option to babel:</p>
<pre class="literal-block">\usepackage[greek]{babel}</pre>
<p>For polytonic Greek, set the language attribute “polutoniko”:</p>
@@ -831,37 +869,30 @@ of these files you want to keep.</p>
<p>Similarly, the attribute “ancient” selects the ancient Greek language
variant.</p>
<p>For details see <a class="reference external" href="babel-greek.pdf">babel-greek.pdf</a> and the <a class="reference external" href="http://www.ctan.org/pkg/babel">babel</a> documentation.</p>
-<p>With XeTeX/LuaTeX, load <a class="reference external" href="http://www.ctan.org/pkg/fontspec">fontspec</a> before <a class="reference external" href="http://www.ctan.org/pkg/babel">babel</a>, so that babel-greek can
-set up the Unicode font encoding for use with Greek, e.g.</p>
-<pre class="literal-block">\usepackage{fontspec}
-\setmainfont{Linux Libertine O}
-\setsansfont{Linux Biolinum O}
-\usepackage[greek,english]{babel}</pre>
-<p>Note, that the default font used with XeTeX/LuaTeX (Latin Modern) misses most
-Greek letters. Warnings about missing charcters are only written to the log
-file, not the console output!</p>
<p>Input of Greek characters is possible as literal characters (with the
<a class="reference external" href="http://www.ctan.org/pkg/greek-inputenc">greek-inputenc</a> package or with XeTeX or LuaTeX) or the <a class="reference internal" href="#lgr-latin-transliteration">LGR Latin
transliteration</a>. See <a class="reference external" href="usage.pdf">usage.pdf</a> and the example files provided with
<a class="reference external" href="http://www.ctan.org/pkg/greek-fontenc">greek-fontenc</a>.</p>
</section>
<section id="greek-text-fonts">
-<h1>Greek text fonts</h1>
+<h2>Greek text fonts</h2>
<p>A list of Greek text fonts for use with LaTeX is available at the CTAN
<a class="reference external" href="http://www.ctan.org/topic/font-greek">http://www.ctan.org/topic/font-greek</a></p>
<p>With the XeTeX or LuaTeX engines, the user should ensure that the chosen
-font contains the required glyphs (the default Latin Modern fonts miss
-them). Examples for suitable fonts are the <a class="reference external" href="http://www.ctan.org/pkg/cm-unicode">CM-unicode</a> or the <a class="reference external" href="http://www.ctan.org/pkg/libertine">Linux
+font contains the required glyphs: the default Latin Modern fonts miss
+them. Warnings about missing charcters are only written to the log
+file, not the console output! Select a suitable font with <a class="reference external" href="http://www.ctan.org/pkg/fontspec">fontspec</a>.</p>
+<p>Examples for suitable fonts are the <a class="reference external" href="http://www.ctan.org/pkg/cm-unicode">CM-unicode</a> or the <a class="reference external" href="http://www.ctan.org/pkg/libertine">Linux
Libertine</a> OpenType fonts as well as any system-wide installed OTF fonts
that support Greek (e.g. <a class="reference external" href="http://dejavu-fonts.org">Deja Vu</a>).</p>
-<p>The LGR <a class="reference external" href="http://mirror.ctan.org/macros/latex/doc/encguide.pdf">font encoding</a> is the de-facto standard for typesetting Greek with
+<p>The LGR <a class="reference external" href="http://mirror.ctan.org/macros/latex/base/encguide.pdf">font encoding</a> is the de-facto standard for typesetting Greek with
8-bit LaTeX. Fonts in this encoding include the <a class="reference external" href="http://www.ctan.org/pkg/cbgreek-complete">CB fonts</a> (matching CM),
<a class="reference external" href="http://www.ctan.org/pkg/grtimes">grtimes</a> (Greek Times), <a class="reference external" href="http://www.ctan.org/pkg/kerkis">Kerkis</a> (matching URW Bookman), and the <a class="reference external" href="http://www.ctan.org/pkg/gfs">GFS font
collection</a>. Setup of these fonts as Greek variant to matching Latin fonts
is facilitated by the <a class="reference external" href="http://www.ctan.org/pkg/substitutefont">substitutefont</a> package.</p>
</section>
<section id="lgr-latin-transliteration">
-<h1>LGR Latin Transliteration</h1>
+<h2>LGR Latin Transliteration</h2>
<p>The LGR font encoding allows input of Greek characters via an ASCII
transliteration. This enables simple input with a Latin keyboard. Characters
with diacritics may be selected with accent macros (cf. <a class="reference external" href="http://www.ctan.org/pkg/greek-fontenc">greek-fontenc</a>) or
@@ -948,6 +979,32 @@ via the ligature definitions in the font (see <a class="reference external" href
<td><p>Ψ</p></td>
<td><p>Ω</p></td>
</tr>
+<tr><td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
<tr><td><p>a</p></td>
<td><p>b</p></td>
<td><p>g</p></td>
@@ -1006,57 +1063,57 @@ via the ligature definitions in the font (see <a class="reference external" href
<table>
<colgroup>
<col style="width: 29%" />
-<col style="width: 9%" />
+<col style="width: 10%" />
<col style="width: 3%" />
-<col style="width: 38%" />
+<col style="width: 37%" />
<col style="width: 14%" />
<col style="width: 7%" />
</colgroup>
<tbody>
<tr><td><p>tonos</p></td>
-<td><p><span class="docutils literal">'</span></p></td>
+<td><p><span class="docutils literal">'a</span></p></td>
<td><p>ά</p></td>
<td><p>semicolon</p></td>
<td><p><span class="docutils literal">;</span></p></td>
<td><p>·</p></td>
</tr>
<tr><td><p>varia</p></td>
-<td><p>`</p></td>
+<td><p>`a</p></td>
<td><p>ὰ</p></td>
<td><p>question mark</p></td>
<td><p><span class="docutils literal">?</span></p></td>
<td><p>;</p></td>
</tr>
<tr><td><p>perispomeni</p></td>
-<td><p><span class="docutils literal">~</span></p></td>
+<td><p><span class="docutils literal">~a</span></p></td>
<td><p>ᾶ</p></td>
<td><p>left apostrophe</p></td>
<td><p>` `</p></td>
<td><p>‘</p></td>
</tr>
<tr><td><p>dasia</p></td>
-<td><p><span class="docutils literal">&lt;</span></p></td>
+<td><p><span class="docutils literal">&lt;a</span></p></td>
<td><p>ἁ</p></td>
<td><p>right apostrophe</p></td>
<td><p><span class="docutils literal">''</span></p></td>
<td><p>’</p></td>
</tr>
<tr><td><p>psili</p></td>
-<td><p><span class="docutils literal">&gt;</span></p></td>
+<td><p><span class="docutils literal">&gt;a</span></p></td>
<td><p>ἀ</p></td>
<td><p>left quotation mark</p></td>
<td><p><span class="docutils literal">((</span></p></td>
<td><p>«</p></td>
</tr>
<tr><td><p>ypogegrammeni</p></td>
-<td><p><span class="docutils literal">|</span></p></td>
+<td><p><span class="docutils literal">a|</span></p></td>
<td><p>ᾳ</p></td>
<td><p>right quotation mark</p></td>
<td><p><span class="docutils literal">))</span></p></td>
<td><p>»</p></td>
</tr>
<tr><td><p>dialytika</p></td>
-<td><p><span class="docutils literal">&quot;</span></p></td>
+<td><p><span class="docutils literal">&quot;i</span></p></td>
<td><p>ϊ</p></td>
<td><p>zero width non-joiner</p></td>
<td><p>v</p></td>
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx b/macros/latex/contrib/babel-contrib/greek/babel-greek.dtx
index 0949097961..9224df9769 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{1550}
+% \CheckSum{1547}
%
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
@@ -37,7 +37,7 @@
%<code>\ProvidesLanguage{greek}
%\fi
%\ProvidesFile{babel-greek.dtx}
- [2020/03/17 v1.9j Greek support for the babel system]
+ [2020/11/10 v1.10 Greek support for the babel system]
%\iffalse
%% File `babel-greek.dtx'
%% Greek language Definition File
@@ -56,7 +56,7 @@
\documentclass{ltxdoc}
% \usepackage{lmodern}
\usepackage[utf8]{inputenc}
-\usepackage{hyperref,bookmark}
+\usepackage{hyperref}
\hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=black}
\newcommand*{\babel}{\textsf{babel}}
\newcommand*{\note}[1]{}
@@ -127,7 +127,15 @@
% to textalpha.}
% \changes{babel-greek-1.9i}{2020/02/28}{Update test for Unicode fonts.
% Fix accent in seename and alsoname.}
-% \changes{babel-greek-1.9j}{2020/03/17}{Fix ampersand in math.}
+% \changes{babel-greek-1.9j}{2020/03/17}{Fix ampersand in math mode.}
+% \changes{babel-greek-1.10}{2020/11/10}{Use TU as \cs{greekfontencoding}
+% for Xe/LuaTeX. TU is the default font encoding there since 2017/01/01.
+% PDF-string secure implementation of \cs{greeknumeral}
+% (taken from ``hyperref'').
+% Use zig-zagy \cs{textkoppa} for \cs{greeknumeral{90}}.
+% This is what it looked originally and what it looks
+% in current (not classical or medieval) Greek typography.
+% Load ``puenc-greek.def`` (from greek-fontenc_) if used with hyperref.}
%
% \title{Babel support for the Greek language}
% \author{Apostolos Syropoulos, Günter Milde}
@@ -170,8 +178,8 @@
%
% The \href{http://ctan.org/pkg/lm}{Latin Modern} OpenType font that is the
% default font for XeTeX/LuaTeX does not support the Greek script. The user
-% needs to set up an alternative font like Linux Libertine or DejaVu with
-% \pkg{\href{http://www.ctan.org/pkg/fontspec}{fontspec}}.
+% needs to set up an alternative font like CM Unicode, Linux Libertine or
+% DejaVu with \pkg{\href{http://www.ctan.org/pkg/fontspec}{fontspec}}.
%
% \section{Usage}
%
@@ -204,11 +212,11 @@
% \usepackage[greek.ancient,english]{babel}
% \end{verbatim}
%
-% Version 1.9 fixes the activation of hyphenation patterns: By default,
+% By default,
% \pkg{babel-greek} activates the modern Greek monotonic hyphenation;
% the attribute/modifier |polutoniko| activates the modern Greek
% polytonic hyphenation and the attribute/modifier |ancient| activates
-% the ancient Greek hyphenation. 8-bit TeX and XeTeX requires the
+% the ancient Greek hyphenation. 8-bit TeX and XeTeX require the
% hyphenation patterns to be pre-loaded in the format file.
% This is a limitation by TeX, common to all languages.
% The LuaTeX engine loads hyphenation patterns on demand.
@@ -217,9 +225,10 @@
% \DescribeMacro\foreignlanguage
% The Babel core provides two commands to switch the active language:
% The declaration |\selectlanguage{greek}| switches to the Greek language.
-% The macro \verb|\foreignlanguage{greek}{<some text>}| sets its second argument
-% in the Greek language. This is intended for short text parts.
-% For details see the \href{http://www.ctan.org/pkg/babel}{Babel} documentation.
+% The macro \verb|\foreignlanguage{greek}{<some text>}| sets its second
+% argument in the Greek language. This is intended for short text parts.
+% For details see the \href{http://www.ctan.org/pkg/babel}{Babel}
+% documentation.
%
% For backwards compatibility, ``polytonic'' spelling can also be
% selected via the dummy language \Lopt{polutonikogreek}. In this
@@ -467,16 +476,19 @@
% instead of engine}
% \changes{babel-greek-1.9f}{2016/02/04}{Check also for TU font encoding.}
% \changes{babel-greek-1.9i}{2020/02/27}{Update check for Unicode fonts.}
+% \changes{babel-greek-1.10}{2020/11/10}{Use TU with Xe/LuaTeX.}
%
% \DescribeMacro\greekfontencoding
% We test for available font encodings and set |\greekfontencoding|
% and the internal macro |\bbl@greek@fontencdef| with the name of the
-% font definition file with Greek LICR macros. The fallback is LGR.
+% font definition file with Greek LICR macros.
+% The default is LGR for 8-bit TeX engines and TU for Xe/LuaTeX.
+% (TODO: The font encoding definition file was renamed to tuenc-greek.def
+% in \emph{greek-fontenc} 0.14 (2020-02-28).)
% \begin{macrocode}
-\ifdefined \UTFencname % set by "fontspec.sty"
- \providecommand*{\greekfontencoding}{\UTFencname} % TU, EU1, or EU2
- \providecommand*{\bbl@greek@fontencdef}{greek-euenc}
- \renewcommand*{\LastDeclaredEncoding}{\UTFencname}
+\ifdefined \UnicodeEncodingName % set by LaTeX for Unicode-aware engines
+ \providecommand*{\greekfontencoding}{\UnicodeEncodingName}
+ \providecommand*{\bbl@greek@fontencdef}{tuenc-greek}
\else
\providecommand*{\greekfontencoding}{LGR}
\providecommand*{\bbl@greek@fontencdef}{lgrenc}
@@ -484,15 +496,16 @@
% \end{macrocode}
% Ensure that the Greek LICR macros are available:
% \begin{macrocode}
-\@ifl@aded{def}{\bbl@greek@fontencdef}{}{
- \InputIfFileExists{\bbl@greek@fontencdef .def}{}{
- \errhelp{I can't find the \bbl@greek@fontencdef .def file
- for the Greek fonts}%
- \errmessage{Font support for the Greek script missing.^^J
- babel-greek can't typeset Greek.^^J
- Install the "greek-fontenc" package^^J
- or use XeTeX/LuaTeX with polyglossia.}%
- \@@end
+\@ifl@aded{def}{\bbl@greek@fontencdef}{}
+{% else
+ \InputIfFileExists{\bbl@greek@fontencdef .def}{}{% else
+ \bbl@error{Font support for the Greek script missing.\\
+ babel-greek can't typeset Greek.\\
+ Install the "greek-fontenc" package\\
+ or use XeTeX/LuaTeX with polyglossia.}
+ {I can't find the \bbl@greek@fontencdef .def file
+ for the Greek fonts (encoding \greekfontencoding)}
+ \@@end
}
}
% \end{macrocode}
@@ -501,8 +514,7 @@
% encoding to |\greekfontencoding| if the current font encoding does not
% provide a (typically empty) local variant.
% \changes{greek-1.8.1}{2013/12/03}{Set `encodingdefault' in `greekscript'
-% to fix Greek in footnotes etc. with document language Greek.
-% TODO: This is from `greektext' but are there side effects?}
+% to fix Greek in titles, footnotes, etc. with document language Greek.}
% \begin{macrocode}
\ProvideTextCommandDefault{\greekscript}{%
\fontencoding{\greekfontencoding}\selectfont
@@ -519,6 +531,21 @@
% \end{macrocode}
% \end{macro}
%
+% The package hyperref defines the PU font encoding which supports
+% monotonic Greek. Load support for polytonic greek, archaic symbols,
+% and the |\greekscript| and |\ensuregreek| TextCommands:
+% \begin{macrocode}
+\AtBeginDocument{
+ \@ifl@aded{def}{puenc}{
+ \makeatletter % required inside \AtBeginDocument
+ \InputIfFileExists{puenc-greek.def}{}{% else
+ \bbl@warning{I can't find the file puenc-greek.def from "greek-fontenc".}
+ }
+ \makeatother
+ }{}
+}
+% \end{macrocode}
+%
% \subsection{Fixes for the LGR font encoding}
%
% \begin{macrocode}
@@ -886,100 +913,185 @@
% \begin{macrocode}
\addto\extrasgreek{\greekscript}
\addto\noextrasgreek{\latintext}
-% \addto\noextrasgreek{\RestoreFontEncoding} % TODO define \RestoreFontEncoding
% \end{macrocode}
+% TODO restore previous font encoding.
%
-% \begin{macro}{\gr@ill@value}
-% When the argument of |\greeknumeral| has a value outside of the
-% acceptable bounds ($0 < x < 999999$) a warning will be issued
-% (and nothing will be printed).
+% \begin{macro}{\greeknumeral}
+% The command |\greeknumeral| needs to be \emph{fully} expandable
+% in order to get the right information in auxiliary
+% files. It should also be usable in PDF-strings.
+% Therefore we use the implementation from the \cs{HyPsd@GreekPatch}
+% in \href{https://ctan.org/pkg/hyperref}{hyperref}
+% (version 7.00e 2020-05-15).
+% \changes{babel-greek-1.10}{2020/11/10}{PDF-string secure implementation
+% taken from ``hyperref'' (collaboration with Ulrike Fischer).}
% \begin{macrocode}
-\def\gr@ill@value#1{%
- \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}}
+\def\greeknumeral#1{%
+ {\greekscript
+ \bbl@greek@GreekNum\@firstoftwo{#1}}%
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\anw@true}
-% \begin{macro}{\anw@false}
-% \begin{macro}{\anw@print}
-% When a a large number with three \emph{trailing} zero's is to be
-% printed those zeros \emph{and} the numeric mark need to be
-% discarded. As each `digit' is processed by a separate macro
-% \emph{and} because the processing needs to be expandable we need
-% some helper macros that help remember to \emph{not} print the
-% numeric mark (|\anwtonos|).
-%
-% The command |\anw@false| switches the printing of the numeric
-% mark off by making |\anw@print| expand to nothing. The command
-% |\anw@true| (re)enables the printing of the numeric marc. These
-% macro's need to be robust in order to prevent improper expansion
-% during writing to files or during |\uppercase|.
+% \begin{macro}{\Greeknumeral}
+% The command |\Greeknumeral| prints uppercase greek numerals.
% \begin{macrocode}
-\DeclareRobustCommand\anw@false{%
- \DeclareRobustCommand\anw@print{}}
-\DeclareRobustCommand\anw@true{%
- \DeclareRobustCommand\anw@print{\textdexiakeraia}} % \anwtonos
-\anw@true
+\def\Greeknumeral#1{%
+ {\greekscript
+ \bbl@greek@GreekNum\@secondoftwo{#1}}%
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\greeknumeral}
-% The command |\greeknumeral| needs to be \emph{fully} expandable
-% in order to get the right information in auxiliary
-% files. Therefore we use a big |\if|-construction to check the
-% value of the argument and start the parsing at the right level.
+% \begin{macro}{\bbl@greek@ill@value}
+% When the argument of |\greeknumeral| has a value outside of the
+% acceptable bounds ($0 < x < 999999$) a warning will be issued
+% (and the argument be printed).
% \begin{macrocode}
-\def\greeknumeral#1{%
+\def\bbl@greek@ill@value#1{%
+ \PackageWarningNoLine{babel}{Illegal value (#1) for greeknumeral}%
+ \@arabic{#1}%
+}
% \end{macrocode}
-% If the value is negative or zero nothing is printed and a warning
-% is issued.
-% \changes{greek-1.3b}{1999/04/03}{Added \cs{expandafter} and
-% \cs{number} (PR3000) in order to make a counter an acceptable
-% argument}
+% \end{macro}
+% \begin{macro}{\bbl@greek@GreekNum}
+% \begin{macro}{\bbl@greek@@GreekNum}
+% \begin{macro}{\bbl@greek@GreekNumI}
+% \begin{macro}{\bbl@greek@GreekNumII}
+% \begin{macro}{\bbl@greek@GreekNumIII}
+% \begin{macro}{\bbl@greek@GreekNumIV}
+% \begin{macro}{\bbl@greek@GreekNumV}
+% \begin{macro}{\bbl@greek@GreekNumVI}
+% The auxiliary macros provide the actual conversion.
+% They are taken from hyperref as well.
% \begin{macrocode}
- \ifnum#1<\@ne\space\gr@ill@value{#1}%
+\def\bbl@greek@GreekNum#1#2{%
+ \ifnum#2<\@ne
+ \bbl@greek@ill@value{#2}%
+ \else
+ \ifnum#2<1000000 %
+ \bbl@greek@@GreekNum#1{#2}%
+ \else
+ \bbl@greek@ill@value{#2}%
+ \fi
+ \fi
+}
+\def\bbl@greek@@GreekNum#1#2{%
+ \ifnum#2<\@m
+ \ifnum#2<10 %
+ \expandafter\bbl@greek@GreekNumI
+ \expandafter\@gobble\expandafter#1\number#2%
+ \else
+ \ifnum#2<100 %
+ \expandafter\bbl@greek@GreekNumII
+ \expandafter\@gobble\expandafter#1\number#2%
+ \else
+ \expandafter\bbl@greek@GreekNumIII
+ \expandafter\@gobble\expandafter#1\number#2%
+ \fi
+ \fi
+ \ifnum#2>\z@
+ \textnumeralsigngreek
+ \fi
\else
- \ifnum#1<10\expandafter\gr@num@i\number#1%
+ \ifnum#2<\@M
+ \expandafter\bbl@greek@GreekNumIV\expandafter#1\number#2%
\else
- \ifnum#1<100\expandafter\gr@num@ii\number#1%
+ \ifnum#2<100000 %
+ \expandafter\bbl@greek@GreekNumV\expandafter#1\number#2%
\else
-% \end{macrocode}
-% We use the available shorthands for 1.000 (|\@m|) and 10.000
-% (|\@M|) to save a few tokens.
-% \begin{macrocode}
- \ifnum#1<\@m\expandafter\gr@num@iii\number#1%
- \else
- \ifnum#1<\@M\expandafter\gr@num@iv\number#1%
- \else
- \ifnum#1<100000\expandafter\gr@num@v\number#1%
- \else
- \ifnum#1<1000000\expandafter\gr@num@vi\number#1%
- \else
-% \end{macrocode}
-% If the value is too large, nothing is printed and a warning
-% is issued.
-% \begin{macrocode}
- \space\gr@ill@value{#1}%
- \fi
- \fi
- \fi
- \fi
+ \expandafter\bbl@greek@GreekNumVI\expandafter#1\number#2%
\fi
\fi
\fi
}
+\def\bbl@greek@GreekNumI#1#2#3{%
+ #1{%
+ \ifnum#3>\z@
+ \textnumeralsignlowergreek
+ \fi
+ }%
+ \expandafter#2%
+ \ifcase#3 %
+ {}{}%
+ \or\textalpha\textAlpha
+ \or\textbeta\textBeta
+ \or\textgamma\textGamma
+ \or\textdelta\textDelta
+ \or\textepsilon\textEpsilon
+ \or\textstigmagreek\textStigmagreek
+ \or\textzeta\textZeta
+ \or\texteta\textEta
+ \or\texttheta\textTheta
+ \else
+ {}{}%
+ \fi
+}
+\def\bbl@greek@GreekNumII#1#2#3#4{%
+ #1{%
+ \ifnum#3>\z@
+ \textnumeralsignlowergreek
+ \fi
+ }%
+ \expandafter#2%
+ \ifcase#3 %
+ {}{}%
+ \or\textiota\textIota
+ \or\textkappa\textKappa
+ \or\textlambda\textLambda
+ \or\textmugreek\textMu
+ \or\textnu\textNu
+ \or\textxi\textXi
+ \or\textomicron\textOmicron
+ \or\textpi\textPi
+ \or\textkoppa\textKoppa
+ \else
+ {}{}%
+ \fi
+ \bbl@greek@GreekNumI#1#2#4%
+}
+\def\bbl@greek@GreekNumIII#1#2#3#4#5{%
+ #1{%
+ \ifnum#3>\z@
+ \textnumeralsignlowergreek
+ \fi
+ }%
+ \expandafter#2%
+ \ifcase#3 %
+ {}{}%
+ \or\textrho\textRho
+ \or\textsigma\textSigma
+ \or\texttau\textTau
+ \or\textupsilon\textUpsilon
+ \or\textphi\textPhi
+ \or\textchi\textChi
+ \or\textpsi\textPsi
+ \or\textomega\textOmega
+ \or\textsampigreek\textSampigreek
+ \else
+ {}{}%
+ \fi
+ \bbl@greek@GreekNumII#1#2#4#5%
+}
+\def\bbl@greek@GreekNumIV#1#2#3#4#5{%
+ \bbl@greek@GreekNumI\@firstofone#1#2%
+ \bbl@greek@@GreekNum#1{#3#4#5}%
+}
+\def\bbl@greek@GreekNumV#1#2#3#4#5#6{%
+ \bbl@greek@GreekNumII\@firstofone#1#2#3%
+ \bbl@greek@@GreekNum#1{#4#5#6}%
+}
+\def\bbl@greek@GreekNumVI#1#2#3#4#5#6#7{%
+ \bbl@greek@GreekNumIII\@firstofone#1#2#3#4%
+ \bbl@greek@@GreekNum#1{#5#6#7}%
+}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\Greeknumeral}
-% The command |\Greeknumeral| prints uppercase greek numerals.
-% The parsing is performed by the macro |\greeknumeral|.
-% \begin{macrocode}
-\def\Greeknumeral#1{%
- \expandafter\MakeUppercase\expandafter{\greeknumeral{#1}}}
-% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \begin{macro}{\greek@alph}
@@ -1018,62 +1130,6 @@
% \end{macro}
% \end{macro}
%
-% What is left now is the definition of a set of macros to produce
-% the various digits.
-% \begin{macro}{\gr@num@i}
-% \begin{macro}{\gr@num@ii}
-% \begin{macro}{\gr@num@iii}
-% \changes{greek-1.2b}{1997/11/13}{No longer use \cs{\let} in the
-% expansion of the \cs{gr@num@x} macros as they ned to be
-% expandable}
-% As there is no representation for $0$ in this system the zeros
-% are simply discarded. When we have a large number with three
-% \emph{trailing} zero's also the numeric mark is discarded.
-% Therefore these macros need to pass the information to each other
-% about the (non-)translation of a zero.
-% \begin{macrocode}
-\def\gr@num@i#1{%
- \ifcase#1\or \textalpha\or \textbeta\or \textgamma\or \textdelta\or
- \textepsilon\or \textstigma\or \textzeta\or \texteta\or \texttheta\fi
- \ifnum#1=\z@\else\anw@true\fi\anw@print}
-\def\gr@num@ii#1{%
- \ifcase#1\or \textiota\or \textkappa\or \textlambda\or \textmu\or
- \textnu\or \textxi\or \textomicron\or \textpi\or \textqoppa\fi
- \ifnum#1=\z@\else\anw@true\fi\gr@num@i}
-\def\gr@num@iii#1{%
- \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or
- \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi
- \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\gr@num@iv}
-% \begin{macro}{\gr@num@v}
-% \begin{macro}{\gr@num@vi}
-% The first three `digits' always have the numeric mark, except
-% when one is discarded because it's value is zero.
-% \begin{macrocode}
-\def\gr@num@iv#1{%
- \ifnum#1=\z@\else\textaristerikeraia\fi
- \ifcase#1\or \textalpha\or \textbeta\or \textgamma\or \textdelta\or
- \textepsilon\or \stigma\or \textzeta\or \texteta\or \texttheta\fi
- \gr@num@iii}
-\def\gr@num@v#1{%
- \ifnum#1=\z@\else\textaristerikeraia\fi
- \ifcase#1\or \textiota\or \textkappa\or \textlambda\or \textmu\or
- \textnu\or \textxi\or \textomicron\or \textpi\or \textqoppa\fi
- \gr@num@iv}
-\def\gr@num@vi#1{%
- \textaristerikeraia
- \ifcase#1\or \textrho\or \textsigma\or \texttau\or \textupsilon\or
- \textphi\or \textchi\or \textpsi\or \textomega\or \textsampi\fi
- \gr@num@v}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \section{Character codes}
%
@@ -1278,10 +1334,15 @@
% because the CB fonts v2.0 do not inlcude certain symbols and so
% the remaining symbol definitions have been moved here}
% \changes{greek-1.5}{2013/06/11}{change symbol macros to aliases}
+% \changes{greek-1.10}{2020/11/10}{Fix: \cs{qoppa} is the legacy name of
+% \cs{textkoppa} not \cs{textqoppa}!
+% Provide fallbacks for makros required for greek numerals
+% (added in greek-fontenc 1.0 2020-09-25).}
% \begin{macrocode}
\providecommand*{\anwtonos}{\textdexiakeraia}
\providecommand*{\katwtonos}{\textaristerikeraia}
-\providecommand*{\qoppa}{\textqoppa}
+\providecommand*{\qoppa}{\textkoppa}
+\providecommand*{\varqoppa}{\textqoppa}
\providecommand*{\stigma}{\textstigma}
\providecommand*{\sampi}{\textsampi}
\providecommand*{\Digamma}{\textDigamma}
@@ -1290,6 +1351,14 @@
\providecommand*{\euro}{\texteuro}
\providecommand*{\permill}{\textperthousand}
% \end{macrocode}
+% TODO remove the following lines once greek-fontenc 1.0 is in common use.
+% \begin{macrocode}
+\@ifl@aded{def}{lgrenc}{%
+ \ProvideTextCommand{\textKoppa}{LGR}{\textkoppa}
+ \ProvideTextCommand{\textmugreek}{LGR}{\textmu}
+}{}
+\ProvideTextCommand{\textmugreek}{\greekfontencoding}{\textmu}
+% \end{macrocode}
%
% \changes{greek-1.3l}{2004/02/19}{Commented these lines out as this
% change has made it into \LaTeX{} itself.}
diff --git a/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf b/macros/latex/contrib/babel-contrib/greek/babel-greek.pdf
index e0e0e741cd..be0ffa0243 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-8bit-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-8bit-greek.pdf
new file mode 100644
index 0000000000..7fcbc9a0f5
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-8bit-greek.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-8bit-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-8bit-greek.tex
new file mode 100644
index 0000000000..ea8812b5b3
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-8bit-greek.tex
@@ -0,0 +1,422 @@
+\documentclass[a4paper]{article}
+
+\usepackage[LGR,T1]{fontenc}
+\usepackage[utf8]{luainputenc}
+% XeTeX in 8-bit compatibility mode fails :(
+% LuaTeX in 8-bit compatibility mode:
+% hyphenation in Greek text parts fails!
+% (would require the 8-bit, a loader fix for luatex).
+
+% \usepackage{textalpha}
+\usepackage{textcomp}
+\usepackage[unicode]{hyperref}
+% \usepackage{bookmark}
+\usepackage{parskip}
+\usepackage{booktabs}
+
+\usepackage{lmodern}
+% \usepackage{kerkis}
+% \usepackage{gfsdidot}
+% \usepackage{dejavu}
+
+% Load the Babel package with Greek and English language definitions:
+%
+% Uncomment the desired language variant
+
+% Default: modern monotonic Greek
+\usepackage[greek,english]{babel}
+% Obsolete: used instead of `greek', kept for backwards compatibility:
+% \usepackage[polutonikogreek,english]{babel}
+
+% For backwards compatibility, you can also use
+% \selectlanguage{polutonikogreek} instead of \selectlanguage{greek} etc.
+% if the (modern) polytonic Greek language variant is selected.
+
+% uncomment for modern polytonic Greek
+% \languageattribute{greek}{polutoniko}
+
+% uncomment for ancient Greek
+\languageattribute{greek}{ancient}
+
+% \message{Latin encoding is \latinencoding}
+
+\begin{document}
+
+\title{Test the Greek support for Babel}
+\author{Günter Milde}
+\date{2020/11/10}
+\maketitle
+
+The babel option ``greek'' activates the support for the Greek language
+defined in the file \texttt{greek.ldf} (source \texttt{greek.dtx}).
+
+\section{Language Switch}
+
+The declaration \verb|\selectlanguage| switches between languages.
+
+\begin{quote}
+ \selectlanguage{greek}
+ Τί φήις; Ἱδὼν ἐνθέδε παῖδ’ ἐλευθέραν
+ τὰς πλησίον Νύμφας στεφανοῦσαν, Σώστρατε,
+ ἐρῶν άπῆλθες εὐθύς;
+\end{quote}
+
+The macro \verb|\foreignlanguage| sets its second argument in the specified
+language. This is intended for short text parts or single words like
+\foreignlanguage{greek}{Βιβλιοθήκη}.
+
+There should be no inserted space before or after the language switch (may
+happen if there are unescaped linebreaks in the font or language definitions):
+
+\begin{quote}
+ Change script with \verb|ensuregreek|: |\ensuregreek{do\~ulos}|. Change
+ language with \verb|\foreignlanguage|: |\foreignlanguage{greek}{do\~ulos}|.
+\end{quote}
+
+\section{Font Encoding}
+
+In Greek text parts, the font encoding is automatically set to LGR if an
+8-bit TeX engine is used. (See \url{test-unicode-greek.tex} for usage of
+babel-greek with XeTeX or LuaTeX.)
+
+LGR has Greek characters in the slots reserved in a TeX \emph{standard text
+font encoding}. This means you need an explicit font encoding change for
+every Latin letter and some other symbols if the current font encoding is
+LGR.
+
+Babel defines the declaration \verb|\latintext| and the command
+\verb|\textlatin| to switch to the T1 or OT1 font encoding or typeset the
+argument using this encoding.
+
+Switching to a font encoding supporting the Greek script is possible without
+switching the Babel language using the declarations \verb|\greekscript| (no
+switch if the current encoding supports Greek script (e.g. the Unicode font
+encoding TU)) or \verb|\greektext| (always switch to LGR) and the
+corresponding macros \verb|\ensuregreek| or \verb|\textgreek|. These
+commands do not start a new paragraph:
+
+\greekscript Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) --
+\latintext Friends (\ensuregreek{F\'ilwn}) of TeX.
+
+\texttt{greek.ldf} has some workarounds, so that macros relying on Latin
+characters in standard positions keep working. We test, that these
+definitions do not overwrite the selection of pre-composed characters for
+``copyright'' and ``registered trade mark'' by \emph{textcomp} (try copy and
+paste from the PDF output):
+
+Latin: A \& O, © ® ™ \\
+Greek (LGR): \ensuregreek{Α \& Ω, © ® ™}
+or input as macro \ensuregreek{\textAlpha{} \textampersand{} \textOmega{},
+\textcopyright{} \textregistered{} \texttrademark{}}.
+
+The ampersand should also work in mathematical mode: $ 1 \& 2 $
+
+To prevent Roman numerals being typeset in Greek letters we need to adopt
+the internal LaTeX commands. Note that this may cause errors when roman
+numerals are used in a situation where the macros need to be expanded:
+
+\makeatletter
+Latin:
+\@roman{1}, \@roman{2}, \@roman{3}, \@roman{4}, \ldots, \@roman{1975}
+\@Roman{1}, \@Roman{2}, \@Roman{3}, \@Roman{4}, \ldots, \@Roman{1975}
+
+Greek: \ensuregreek{
+\@roman{1}, \@roman{2}, \@roman{3}, \@roman{4}, \ldots, \@roman{1975}
+\@Roman{1}, \@Roman{2}, \@Roman{3}, \@Roman{4}, \ldots, \@Roman{1975}
+}
+\makeatother
+
+\section{MakeUppercase, MakeLowercase}
+
+Capital Greek letters have diacritics (except the dialytika and sub-iota) to
+the left (instead of above) and drop them in uppercase, e.g.
+\ensuregreek{μαΐστρος $\mapsto$ \MakeUppercase{μαΐστρος}}.
+
+Upcased letters with diacritics keep the dialytika. This is implemented for
+all input variants of diacritics with dialytika. (\texttt{greek.ldf} has
+\emph{composite command} definitions to ensure this also works for accent
+characters "upcased" to the charcter No 159.)
+
+\foreignlanguage{greek}{\"i \"'i \"`i \"~i \'"i \`"i \~"i
+ \"u \"\'u \"\`u \"\~u
+ ϊ ΐ ῒ ῗ ΐ ῒ ῗ ϋ ΰ ῢ ῧ
+ $\mapsto$ \MakeUppercase{\"i \"'i \"`i \"~i \'"i \`"i \~"i
+ \"u \"\'u \"\`u \"\~u
+ ϊ ΐ ῒ ῗ ΐ ῒ ῗ ϋ ΰ ῢ ῧ
+ }
+}
+
+
+Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if
+placed on the first vowel of a diphthong
+(\ensuregreek{\'ai, \'au, \'ei, \'>ai, \'>au, \'>ei}).
+A dialytika must be placed on the second vowel if they are dropped:
+(\ensuregreek{\MakeUppercase{\'ai, \'au, \'ei, \'>ai, \'>au, \'>ei}}).
+
+\selectlanguage{greek}
+% from teubner: άυλος/ΑΫΛΟΣ
+\'aulos $\mapsto$ \MakeUppercase{\'aulos},
+\'>aulos $\mapsto$ \MakeUppercase{\'>aulos},
+% from http://diacritics.typo.cz/index.php?id=69 μάινα -> ΜΑΪΝΑ
+m\'aina $\mapsto$ \MakeUppercase{m\'aina},
+% from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema
+% κέικ, ἀυπνία/αϋπνία
+k\'eik, $\mapsto$ \MakeUppercase{k\'eik}
+\accpsili{a}upn\'ia $\mapsto$ \MakeUppercase{\accpsili{a}upn\'ia}
+\selectlanguage{english}
+
+There are several alternative styles for the capitalized sub-iota.
+
+In order to let the Up/Downcasing work also with the Latin transcription
+defined by the LGR font encoding, ``babel-greek'' also defines lc/uccodes
+for non-standard assignments:
+
+\selectlanguage{greek}
+', ", `, >, <, | $\mapsto$ \MakeUppercase{', ", `, >, <, |}
+\selectlanguage{english}
+
+The uppercase of the zero-width space at the place of ``v'' is kept to point
+to the glyph at the position of ``V'', the Dasia-Oxia accent
+(\ensuregreek{\MakeUppercase{v}}):
+
+\begin{quotation}
+ greek-1.3i 2000/10/02: uc code of `v' is switched to V
+ so that mixed text appears correctly in headers.
+\end{quotation}
+
+Use \verb+\textcompwordmark+:
+not \foreignlanguage{greek}{avu $\mapsto$ \MakeUppercase{avu}} but
+\foreignlanguage{greek}{a\textcompwordmark u
+$\mapsto$ \MakeUppercase{a\textcompwordmark u}}
+
+The following subsections test MakeUppercase and MakeLowercase with all
+characters defined in lgrenc.dfu:
+
+\subsection{Greek and Coptic}
+
+\newcommand{\GreekAndCoptic}{\ensuregreek{
+ʹ͵ͺ; ΄ ΅Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϘϚϜϠ}}
+\newcommand{\greekandcoptic}{\ensuregreek{
+άέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϙϛϝϟϡ}}
+
+Characters of the Greek and Coptic Unicode Block:
+
+\begin{quote}
+ \GreekAndCoptic\\
+ \greekandcoptic
+\end{quote}
+
+MakeUppercase:
+
+\begin{quote}
+ \MakeUppercase{\GreekAndCoptic}\\
+ \MakeUppercase{\greekandcoptic}
+\end{quote}
+\end{document}
+
+Letters and sub-iota upcased, other diacritics except dialytika dropped.
+
+There is no capital Koppa in LGR, therefore \ensuregreek{ϟ} is left
+unchanged with MakeUppercase.
+
+
+MakeLowercase:
+
+\begin{quote}
+ \MakeLowercase{\GreekAndCoptic}\\
+ \MakeLowercase{\greekandcoptic}
+\end{quote}
+
+The lowercase of \ensuregreek{Σ} is the «auto-sigma» (\verb+\textautosigma+):
+\ensuregreek{ΣΣ $\mapsto$ \MakeLowercase{ΣΣ}}. Add a ZWNJ or use the
+\verb+\noboundary+ macro to prevent conversion to final sigma:
+\ensuregreek{\MakeLowercase{ΣΣ‌}}. The lowercase of GREEK LETTER STIGMA
+\ensuregreek{Ϛ} is \ensuregreek{\MakeLowercase{Ϛ}} not \verb|\textvarstigma|
+(\ensuregreek\textvarstigma).
+
+% \newpage
+
+\subsection{Greek extended}
+
+Characters of the Greek extended Unicode block:
+
+\selectlanguage{greek}
+ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
+ἐ ἑ ἒ ἓ ἔ ἕ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
+ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
+ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
+ὀ ὁ ὂ ὃ ὄ ὅ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
+ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ Ὑ Ὓ Ὕ Ὗ \\
+ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
+ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
+ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
+ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
+ᾠ ᾡ ᾢ ᾣ ᾤ ᾥ ᾦ ᾧ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
+ᾰ ᾱ ᾲ ᾳ ᾴ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
+῀ ῁ ῂ ῃ ῄ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
+ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝ ῞ ῟ \\
+ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` \\
+ ῲ ῳ ῴ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾
+\selectlanguage{english}
+
+MakeUppercase:
+
+\selectlanguage{greek}
+
+\MakeUppercase{ ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ }\\
+\MakeUppercase{ ἐ ἑ ἒ ἓ ἔ ἕ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ }\\
+\MakeUppercase{ ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ }\\
+\MakeUppercase{ ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ }\\
+\MakeUppercase{ ὀ ὁ ὂ ὃ ὄ ὅ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ }\\
+\MakeUppercase{ ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ Ὑ Ὓ Ὕ Ὗ }\\
+\MakeUppercase{ ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ }\\
+\MakeUppercase{ ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ }\\
+\MakeUppercase{ ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ }\\
+\MakeUppercase{ ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ }\\
+\MakeUppercase{ ᾠ ᾡ ᾢ ᾣ ᾤ ᾥ ᾦ ᾧ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ }\\
+\MakeUppercase{ ᾰ ᾱ ᾲ ᾳ ᾴ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ }\\
+\MakeUppercase{ ῀ ῁ ῂ ῃ ῄ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ }\\
+\MakeUppercase{ ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝ ῞ ῟ }\\
+\MakeUppercase{ ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` }\\
+\MakeUppercase{ ῲ ῳ ῴ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ }
+\selectlanguage{english}
+
+MakeLowercase:
+
+\selectlanguage{greek}
+\MakeLowercase{ ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ }\\
+\MakeLowercase{ ἐ ἑ ἒ ἓ ἔ ἕ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ }\\
+\MakeLowercase{ ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ }\\
+\MakeLowercase{ ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ }\\
+\MakeLowercase{ ὀ ὁ ὂ ὃ ὄ ὅ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ }\\
+\MakeLowercase{ ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ Ὑ Ὓ Ὕ Ὗ }\\
+\MakeLowercase{ ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ }\\
+\MakeLowercase{ ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ }\\
+\MakeLowercase{ ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ }\\
+\MakeLowercase{ ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ }\\
+\MakeLowercase{ ᾠ ᾡ ᾢ ᾣ ᾤ ᾥ ᾦ ᾧ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ }\\
+\MakeLowercase{ ᾰ ᾱ ᾲ ᾳ ᾴ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ }\\
+\MakeLowercase{ ῀ ῁ ῂ ῃ ῄ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ }\\
+\MakeLowercase{ ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝ ῞ ῟ }\\
+\MakeLowercase{ ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` }\\
+\MakeLowercase{ ῲ ῳ ῴ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ }
+\selectlanguage{english}
+
+\section{Babel Strings}
+
+Babel defines macros for several autogenerated strings so that they may
+appear in the choosen language. babel-greek uses LICRs in order to let the
+string macros work independent of the font encoding, in both 8-bit and
+Unicode-aware TeX.
+
+\subsection{Captions}
+
+\selectlanguage{greek}
+\prefacename,
+\refname,
+\abstractname,
+\bibname,
+\chaptername,
+\appendixname,
+\contentsname,
+\listfigurename ,
+\listtablename,
+\indexname,
+\figurename,
+\tablename,
+\partname,
+\enclname,
+\ccname,
+\headtoname,
+\pagename,
+\seename,
+\alsoname,
+\proofname,
+\glossaryname,
+\selectlanguage{english}
+
+
+\subsection{Months}
+
+\selectlanguage{greek}
+\newcounter{foo}
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\stepcounter{foo} \month=\value{foo} \today \\
+\selectlanguage{english}
+
+\section{Greek Numerals}
+
+See greek.pdf for the formation rules of Greek numerals.
+Some examples:
+
+\selectlanguage{greek}
+
+\greeknumeral{1},
+\greeknumeral{2},
+\greeknumeral{3},
+\greeknumeral{4},
+\greeknumeral{5},
+\greeknumeral{6},
+\greeknumeral{7},
+\greeknumeral{8},
+\greeknumeral{9},
+\greeknumeral{10},
+\greeknumeral{11},
+\greeknumeral{12},
+\greeknumeral{20},
+\greeknumeral{345},
+\greeknumeral{500},
+\greeknumeral{1997},
+\greeknumeral{2013},
+
+\Greeknumeral{1},
+\Greeknumeral{2},
+\Greeknumeral{3},
+\Greeknumeral{4},
+\Greeknumeral{5},
+\Greeknumeral{6},
+\Greeknumeral{7},
+\Greeknumeral{8},
+\Greeknumeral{9},
+\Greeknumeral{10},
+\Greeknumeral{11},
+\Greeknumeral{12},
+\Greeknumeral{20},
+\Greeknumeral{345},
+\Greeknumeral{500},
+\Greeknumeral{1997},
+\Greeknumeral{2013},
+
+\selectlanguage{english}
+
+Enumerated lists use Greek numerals in the second and fourth level:
+
+\selectlanguage{greek}
+\begin{enumerate}
+ \item \textlatin{Item} 1
+ \begin{enumerate}
+ \item \textlatin{Item} 1.1
+ \begin{enumerate}
+ \item \textlatin{Item} 1.1.1
+ \begin{enumerate}
+ \item \textlatin{Item} 1.1.1.1
+ \item \textlatin{Item} 1.1.1.2
+ \end{enumerate}
+ \item \textlatin{Item} 1.1.2
+ \end{enumerate}
+ \end{enumerate}
+\end{enumerate}
+\selectlanguage{english}
+
+
+\end{document}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek-lgr.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek-lgr.pdf
new file mode 100644
index 0000000000..c1e973315c
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek-lgr.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek-tu.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek-tu.pdf
new file mode 100644
index 0000000000..c022976fbe
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek-tu.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
deleted file mode 100644
index c4526611d8..0000000000
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.pdf
+++ /dev/null
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 4e5618cf87..03dd9db4e3 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-greek.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-greek.tex
@@ -1,64 +1,30 @@
\documentclass[a4paper]{article}
-\usepackage[LGR,T1]{fontenc}
-
-% Xe/LuaTeX in 8-bit compatibility mode:
-% hyphenation in Greek text parts fails!
-% (would require the 8-bit, LGR-encoded patterns in the XeTeX ini and a
-% loader fix for luatex).
-
-% TODO: why does XeTeXinputencoding "bytes" no longer work with inputenc's
-% utf8 option?
-\ifdefined \XeTeXrevision
- \XeTeXinputencoding "bytes"
-\fi
-
-\ifdefined\luatexversion
- \usepackage[utf8]{luainputenc}
-\else
- \usepackage[utf8]{inputenc}
-\fi
-% \usepackage{textalpha}
-\usepackage{textcomp}
-\usepackage{hyperref,bookmark}
+\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{parskip}
-\usepackage{booktabs}
-
-\usepackage{lmodern}
-% \usepackage{kerkis}
-% \usepackage{gfsdidot}
-% Load the Babel package with Greek and English language definitions:
-%
-% Uncomment the desired language variant
-
-% Default: modern monotonic Greek
\usepackage[greek,english]{babel}
-% Obsolete: used instead of `greek', kept for backwards compatibility:
-% \usepackage[polutonikogreek,english]{babel}
-
-% For backwards compatibility, you can also use
-% \selectlanguage{polutonikogreek} instead of \selectlanguage{greek} etc.
-% if the (modern) polytonic Greek language variant is selected.
-
-% uncomment for modern polytonic Greek
% \languageattribute{greek}{polutoniko}
+% \languageattribute{greek}{ancient}
-% uncomment for ancient Greek
-\languageattribute{greek}{ancient}
-
-% \message{Latin encoding is \latinencoding}
-
-\DeclareTextCommandDefault{\ensuregreek}{\textgreek}
+\ifdefined \UnicodeEncodingName
+ \usepackage{fontspec}
+ \setmainfont{DejaVu Serif}
+\fi
\begin{document}
-\title{Test the Greek support for Babel}
+\title{Greek support for Babel}
\author{Günter Milde}
-\date{2014/09/02}
+\date{2020/11/10}
\maketitle
-The babel option ``greek'' activates the support for the Greek language
-defined in the file \texttt{greek.ldf} (source \texttt{greek.dtx}).
+The babel option «greek» activates the support for the Greek language
+defined in the file «greek.ldf» (source «greek.dtx»).
+
+Typesetting Greek texts requires a font containing Greek letters. With the
+XeTeX or LuaTeX engines, the user must ensure that the selected font
+contains the required glyphs (the default Latin Modern fonts miss most of
+them).
\section{Language Switch}
@@ -71,255 +37,84 @@ The declaration \verb|\selectlanguage| switches between languages.
ἐρῶν άπῆλθες εὐθύς;
\end{quote}
-The macro \verb|\foreignlanguage| sets its second argument in the specified
-language. This is intended for short text parts or single words like
+The command \verb|\foreignlanguage| sets its second argument in the language
+specified as first argument. This is intended for short text parts like
\foreignlanguage{greek}{Βιβλιοθήκη}.
-There should be no inserted space before or after the language switch (may
-happen if there are unescaped linebreaks in the font or language definitions):
-
-\begin{quote}
- Change script with \verb|ensuregreek|: |\ensuregreek{do\~ulos}|. Change
- language with \verb|\foreignlanguage|: |\foreignlanguage{greek}{do\~ulos}|.
-\end{quote}
-
\section{Font Encoding}
-In Greek text parts, the font encoding is automatically set to LGR if an
-8-bit TeX engine is used. (See \url{test-unicode-greek.tex} for usage of
-babel-greek with XeTeX or LuaTeX.)
-
-LGR has Greek characters in the slots reserved in a TeX \emph{standard text
-font encoding}. This means you need an explicit font encoding change for
-every Latin letter and some other symbols if the current font encoding is
-LGR.
-
-The Babel core defines the declaration \verb|\latintext| and the command
-\verb|\textlatin| to switch to the T1 or OT1 font encoding or typeset the
-argument using this encoding.
-
-Switching to a font encoding supporting the Greek script is possible without
-switching the Babel language using the declarations \verb|\greekscript| (no
-switch if the current encoding supports Greek script (e.g. the Unicode font
-encoding TU)) or \verb|\greektext| (always switch to LGR) and the
-corresponding macros \verb|\ensuregreek| or \verb|\textgreek|. These
-commands do not start a new paragraph:
-
-\greekscript Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) --
-\latintext Friends (\ensuregreek{F\'ilwn}) of TeX.
-
-\texttt{greek.ldf} has some workarounds, so that macros relying on Latin
-characters in standard positions keep working. We test, that these
-definitions do not overwrite the selection of pre-composed characters for
-``copyright'' and ``registered trade mark'' by \emph{textcomp} (try copy and
-paste from the PDF output):
-
-Latin: A \& O, © ® ™ \\
-Greek (LGR): \ensuregreek{Α \textampersand{} Ω,
-\textcopyright{} \textregistered{} \texttrademark{}, \& © ® ™ }.
-
-The ampersand should also work in mathematical mode: $ 1 \& 2 $
-
-To prevent Roman numerals being typeset in Greek letters we need to adopt
-the internal LaTeX commands. Note that this may cause errors when roman
-numerals are used in a situation where the macros need to be expanded:
-
-\makeatletter
-Latin:
-\@roman{1}, \@roman{2}, \@roman{3}, \@roman{4}, \ldots, \@roman{1975}
-\@Roman{1}, \@Roman{2}, \@Roman{3}, \@Roman{4}, \ldots, \@Roman{1975}
-
-Greek: \ensuregreek{
-\@roman{1}, \@roman{2}, \@roman{3}, \@roman{4}, \ldots, \@roman{1975}
-\@Roman{1}, \@Roman{2}, \@Roman{3}, \@Roman{4}, \ldots, \@Roman{1975}
-}
-\makeatother
-
-\section{MakeUppercase, MakeLowercase}
-
-Capital Greek letters have diacritics (except the dialytika and sub-iota) to
-the left (instead of above) and drop them in uppercase, e.g.
-\ensuregreek{μαΐστρος $\mapsto$ \MakeUppercase{μαΐστρος}}.
-
-Upcased letters with diacritics keep the dialytika. This is implemented for
-all input variants of diacritics with dialytika. (\texttt{greek.ldf} has
-\emph{composite command} definitions to ensure this also works for accent
-characters "upcased" to the charcter No 159.)
-
-\foreignlanguage{greek}{\"i \"'i \"`i \"~i \'"i \`"i \~"i
- \"u \"\'u \"\`u \"\~u
- ϊ ΐ ῒ ῗ ΐ ῒ ῗ ϋ ΰ ῢ ῧ
- $\mapsto$ \MakeUppercase{\"i \"'i \"`i \"~i \'"i \`"i \~"i
- \"u \"\'u \"\`u \"\~u
- ϊ ΐ ῒ ῗ ΐ ῒ ῗ ϋ ΰ ῢ ῧ
- }
-}
-
-
-Tonos and dasia mark a \emph{hiatus} (break-up of a diphtong) if
-placed on the first vowel of a diphtong
-(\ensuregreek{\'ai, \'au, \'ei, \'>ai, \'>au, \'>ei}).
-A dialytika must be placed on the second vowel if they are dropped:
-(\ensuregreek{\MakeUppercase{\'ai, \'au, \'ei, \'>ai, \'>au, \'>ei}}).
-
-\selectlanguage{greek}
-% from teubner: άυλος/ΑΫΛΟΣ
-\'aulos $\mapsto$ \MakeUppercase{\'aulos},
-\'>aulos $\mapsto$ \MakeUppercase{\'>aulos},
-% from http://diacritics.typo.cz/index.php?id=69 μάινα -> ΜΑΪΝΑ
-m\'aina $\mapsto$ \MakeUppercase{m\'aina},
-% from http://de.wikipedia.org/wiki/Neugriechische_Orthographie#Das_Trema
-% κέικ, ἀυπνία/αϋπνία
-k\'eik, $\mapsto$ \MakeUppercase{k\'eik}
-\accpsili{a}upn\'ia $\mapsto$ \MakeUppercase{\accpsili{a}upn\'ia}
-\selectlanguage{english}
-
-There are several alternative styles for the capitalized sub-iota.
-
-In order to let the Up/Downcasing work also with the Latin transcription
-defined by the LGR font encoding, ``babel-greek'' also defines lc/uccodes
-for non-standard assignments:
-
-\selectlanguage{greek}
-', ", `, >, <, | $\mapsto$ \MakeUppercase{', ", `, >, <, |}
-\selectlanguage{english}
-
-The uppercase of the zero-width space at the place of ``v'' is kept to point
-to the glyph at the position of ``V'', the Dasia-Oxia accent
-(\ensuregreek{\MakeUppercase{v}}):
-
-\begin{quotation}
- greek-1.3i 2000/10/02: uc code of `v' is switched to V
- so that mixed text appears correctly in headers.
-\end{quotation}
-
-Use \verb+\textcompwordmark+:
-not \foreignlanguage{greek}{avu $\mapsto$ \MakeUppercase{avu}} but
-\foreignlanguage{greek}{a\textcompwordmark u
-$\mapsto$ \MakeUppercase{a\textcompwordmark u}}
-
-The following subsections test MakeUppercase and MakeLowercase with all
-characters defined in lgrenc.dfu:
-
-\subsection{Greek and Coptic}
-
-\newcommand{\GreekAndCoptic}{\ensuregreek{
-ʹ͵ͺ; ΄ ΅Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϘϚϜϠ}}
-\newcommand{\greekandcoptic}{\ensuregreek{
-άέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϙϛϝϟϡ}}
-
-Characters of the Greek and Coptic Unicode Block:
-
-\begin{quote}
- \GreekAndCoptic\\
- \greekandcoptic
-\end{quote}
-
-MakeUppercase:
-
-\begin{quote}
- \MakeUppercase{\GreekAndCoptic}\\
- \MakeUppercase{\greekandcoptic}
-\end{quote}
+Every language switch to \texttt{greek} calls the \verb|\extrasgreek|
+command which in turn calls \verb|\greekscript| to ensure a Greek-supporting
+font encoding (LGR or TU). At this point, the «greekfontencoding»
+is \texttt{\greekfontencoding}.
-Letters and sub-iota upcased, other diacritics except dialytika dropped.
-There is no capital Koppa in LGR, therefore \ensuregreek{ϟ} is left
-unchanged with MakeUppercase.
+LGR has Greek characters in the slots reserved in a TeX \emph{standard text
+font encoding}. Therefore, the Babel core defines the declaration
+\verb|\latintext| and the command \verb|\textlatin| to switch to the TU, T1
+or OT1 font encoding or typeset the argument using this encoding. At this
+point, the «latinencoding» is \texttt{\latinencoding}.
+With the Unicode font encoding \texttt{TU},
+Latin characters can be used in Greek text parts and
+input via the «LGR Latin transcription» is not possible.
-MakeLowercase:
+The following quote mixes Latin transcription and Greek literal characters:
\begin{quote}
- \MakeLowercase{\GreekAndCoptic}\\
- \MakeLowercase{\greekandcoptic}
+ \greekscript Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) --
+ \latintext Friends (\ensuregreek{F\'ilwn}) of TeX.%
\end{quote}
-The lowercase of \ensuregreek{Σ} is the «auto-sigma» (\verb+\textautosigma+):
-\ensuregreek{ΣΣ $\mapsto$ \MakeLowercase{ΣΣ}}. Add a ZWNJ or use the
-\verb+\noboundary+ macro to prevent conversion to final sigma:
-\ensuregreek{\MakeLowercase{ΣΣ‌}}. The lowercase of GREEK LETTER STIGMA
-\ensuregreek{Ϛ} is \ensuregreek{\MakeLowercase{Ϛ}} not \verb|\textvarstigma|
-(\ensuregreek\textvarstigma).
-
-% \newpage
-
-\subsection{Greek extended}
-
-Characters of the Greek extended Unicode block:
-
-\selectlanguage{greek}
-ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ \\
-ἐ ἑ ἒ ἓ ἔ ἕ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ \\
-ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ \\
-ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ \\
-ὀ ὁ ὂ ὃ ὄ ὅ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ \\
-ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ Ὑ Ὓ Ὕ Ὗ \\
-ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ \\
-ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ \\
-ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ \\
-ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ \\
-ᾠ ᾡ ᾢ ᾣ ᾤ ᾥ ᾦ ᾧ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ \\
-ᾰ ᾱ ᾲ ᾳ ᾴ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ \\
-῀ ῁ ῂ ῃ ῄ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ \\
-ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝ ῞ ῟ \\
-ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` \\
- ῲ ῳ ῴ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾
-\selectlanguage{english}
-
-MakeUppercase:
-
-\selectlanguage{greek}
+\section{LICR Macros}
-\MakeUppercase{ ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ }\\
-\MakeUppercase{ ἐ ἑ ἒ ἓ ἔ ἕ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ }\\
-\MakeUppercase{ ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ }\\
-\MakeUppercase{ ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ }\\
-\MakeUppercase{ ὀ ὁ ὂ ὃ ὄ ὅ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ }\\
-\MakeUppercase{ ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ Ὑ Ὓ Ὕ Ὗ }\\
-\MakeUppercase{ ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ }\\
-\MakeUppercase{ ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ }\\
-\MakeUppercase{ ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ }\\
-\MakeUppercase{ ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ }\\
-\MakeUppercase{ ᾠ ᾡ ᾢ ᾣ ᾤ ᾥ ᾦ ᾧ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ }\\
-\MakeUppercase{ ᾰ ᾱ ᾲ ᾳ ᾴ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ }\\
-\MakeUppercase{ ῀ ῁ ῂ ῃ ῄ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ }\\
-\MakeUppercase{ ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝ ῞ ῟ }\\
-\MakeUppercase{ ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` }\\
-\MakeUppercase{ ῲ ῳ ῴ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ }
-\selectlanguage{english}
+Babel defines macros for several autogenerated strings so that they may
+appear in the choosen language. \emph{babel-greek} uses LICR%
+\footnote{LaTeX internal character representation} macros in
+order to let the string macros work independent of the font encoding.
+
+If \verb|\greekfontencoding| is TU, \emph{babel-greek} loads Greek LICR
+definitions from the file \texttt{tuenc-greek.def} provided by
+\href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc}
+since version~0.14 (2020-02-28).
+
+With this setup, it is also possible to use accent macros instead of
+pre-composed Unicode characters for letters with diacritics%
+\ifdefined \UnicodeEncodingName
+ : Τ\'ι φ\'ηις;, \`<ορα = \accdasiavaria{ο}ρα
+\fi
+.
-MakeLowercase:
+\subsection{Captions}
\selectlanguage{greek}
-\MakeLowercase{ ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ }\\
-\MakeLowercase{ ἐ ἑ ἒ ἓ ἔ ἕ Ἐ Ἑ Ἒ Ἓ Ἔ Ἕ }\\
-\MakeLowercase{ ἠ ἡ ἢ ἣ ἤ ἥ ἦ ἧ Ἠ Ἡ Ἢ Ἣ Ἤ Ἥ Ἦ Ἧ }\\
-\MakeLowercase{ ἰ ἱ ἲ ἳ ἴ ἵ ἶ ἷ Ἰ Ἱ Ἲ Ἳ Ἴ Ἵ Ἶ Ἷ }\\
-\MakeLowercase{ ὀ ὁ ὂ ὃ ὄ ὅ Ὀ Ὁ Ὂ Ὃ Ὄ Ὅ }\\
-\MakeLowercase{ ὐ ὑ ὒ ὓ ὔ ὕ ὖ ὗ Ὑ Ὓ Ὕ Ὗ }\\
-\MakeLowercase{ ὠ ὡ ὢ ὣ ὤ ὥ ὦ ὧ Ὠ Ὡ Ὢ Ὣ Ὤ Ὥ Ὦ Ὧ }\\
-\MakeLowercase{ ὰ ά ὲ έ ὴ ή ὶ ί ὸ ό ὺ ύ ὼ ώ }\\
-\MakeLowercase{ ᾀ ᾁ ᾂ ᾃ ᾄ ᾅ ᾆ ᾇ ᾈ ᾉ ᾊ ᾋ ᾌ ᾍ ᾎ ᾏ }\\
-\MakeLowercase{ ᾐ ᾑ ᾒ ᾓ ᾔ ᾕ ᾖ ᾗ ᾘ ᾙ ᾚ ᾛ ᾜ ᾝ ᾞ ᾟ }\\
-\MakeLowercase{ ᾠ ᾡ ᾢ ᾣ ᾤ ᾥ ᾦ ᾧ ᾨ ᾩ ᾪ ᾫ ᾬ ᾭ ᾮ ᾯ }\\
-\MakeLowercase{ ᾰ ᾱ ᾲ ᾳ ᾴ ᾶ ᾷ Ᾰ Ᾱ Ὰ Ά ᾼ ᾽ ι ᾿ }\\
-\MakeLowercase{ ῀ ῁ ῂ ῃ ῄ ῆ ῇ Ὲ Έ Ὴ Ή ῌ ῍ ῎ ῏ }\\
-\MakeLowercase{ ῐ ῑ ῒ ΐ ῖ ῗ Ῐ Ῑ Ὶ Ί ῝ ῞ ῟ }\\
-\MakeLowercase{ ῠ ῡ ῢ ΰ ῤ ῥ ῦ ῧ Ῠ Ῡ Ὺ Ύ Ῥ ῭ ΅ ` }\\
-\MakeLowercase{ ῲ ῳ ῴ ῶ ῷ Ὸ Ό Ὼ Ώ ῼ ´ ῾ }
+\prefacename,
+\refname,
+\abstractname,
+\bibname,
+\chaptername,
+\appendixname,
+\contentsname,
+\listfigurename ,
+\listtablename,
+\indexname,
+\figurename,
+\tablename,
+\partname,
+\enclname,
+\ccname,
+\headtoname,
+\pagename,
+\seename,
+\alsoname,
+\proofname,
+\glossaryname
\selectlanguage{english}
-\section{Babel Strings}
-
-Babel defines macros for several autogenerated strings so that they may
-appear in the choosen language. babel-greek uses LICRs in order to let the
-string macros work independent of the font encoding, in both 8-bit and
-Unicode-aware TeX.
-
-\subsection{Captions}
+Test correct upcasing (dropping of accents):
\selectlanguage{greek}
+\MakeUppercase{
\prefacename,
\refname,
\abstractname,
@@ -327,7 +122,7 @@ Unicode-aware TeX.
\chaptername,
\appendixname,
\contentsname,
-\listfigurename ,
+\listfigurename,
\listtablename,
\indexname,
\figurename,
@@ -340,7 +135,8 @@ Unicode-aware TeX.
\seename,
\alsoname,
\proofname,
-\glossaryname,
+\glossaryname
+}
\selectlanguage{english}
@@ -362,7 +158,7 @@ Unicode-aware TeX.
\stepcounter{foo} \month=\value{foo} \today \\
\selectlanguage{english}
-\section{Greek Numerals}
+\section{Greek Numerals (\greeknumeral{1} to \Greeknumeral{999999})}
See greek.pdf for the formation rules of Greek numerals.
Some examples:
@@ -385,7 +181,7 @@ Some examples:
\greeknumeral{345},
\greeknumeral{500},
\greeknumeral{1997},
-\greeknumeral{2013},
+\greeknumeral{2013}
\Greeknumeral{1},
\Greeknumeral{2},
@@ -403,28 +199,43 @@ Some examples:
\Greeknumeral{345},
\Greeknumeral{500},
\Greeknumeral{1997},
-\Greeknumeral{2013},
-
+\Greeknumeral{2013}
\selectlanguage{english}
-Enumerated lists use Greek numerals in the second and fourth level:
+
+Enumerated lists use Greek characters/numerals in the second and fourth level:
\selectlanguage{greek}
\begin{enumerate}
- \item \textlatin{Item} 1
+ \item item 1
\begin{enumerate}
- \item \textlatin{Item} 1.1
+ \item item 1.1
\begin{enumerate}
- \item \textlatin{Item} 1.1.1
+ \item item 1.1.1
\begin{enumerate}
- \item \textlatin{Item} 1.1.1.1
- \item \textlatin{Item} 1.1.1.2
+ \item item 1.1.1.1
+ \item item 1.1.1.2
\end{enumerate}
- \item \textlatin{Item} 1.1.2
+ \item item 1.1.2
\end{enumerate}
\end{enumerate}
\end{enumerate}
\selectlanguage{english}
+This may be problematic with fonts that only partially support Greek and
+miss the numeral signs (dexiakeraia and aristerikeraia).
+
+You may redefine the commands \verb+\textdexiakeraia+ and
+\verb+\textaristerikeraia+ to some substitute characters.
+Or, if you prefer the ``normal'' enumeration, write in the preamble after
+loading babel:
+
+\begin{verbatim}
+ \makeatletter
+ \addto\extrasgreek{\let\@alph\latin@alph
+ \let\@Alph\latin@Alph}
+ \makeatother
+\end{verbatim}
+
\end{document}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greeknumeral.pdf b/macros/latex/contrib/babel-contrib/greek/test-greeknumeral.pdf
new file mode 100644
index 0000000000..fafe3a1a08
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-greeknumeral.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-greeknumeral.tex b/macros/latex/contrib/babel-contrib/greek/test-greeknumeral.tex
new file mode 100644
index 0000000000..f60bcaff75
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-greeknumeral.tex
@@ -0,0 +1,236 @@
+\documentclass[a4paper]{scrartcl}
+
+% Load font packages depending on engine:
+\ifdefined\luatexversion
+ \usepackage{fontspec}
+\fi
+\ifdefined\XeTeXrevision
+ \usepackage{fontspec}
+\fi
+\ifdefined \UTFencname % set by "fontspec.sty"
+ % Latin Modern misses most Greek characters.
+ \setmainfont{DejaVu Serif}
+ \setsansfont{DejaVu Sans}
+\else
+ \usepackage[LGR,T1]{fontenc}
+ \usepackage[utf8]{inputenc}
+ \usepackage{lmodern}
+ % \usepackage{kerkis} % missing glyphs (Qoppa, in sans serif also koppa, Koppa)
+ % \usepackage{dejavu} missing glyphs (qoppa, Qoppa, Sampi)
+ % \usepackage{epigrafica} # many missing glyphs
+ % \usepackage{gentium} % missing glyphs (Qoppa, Sampi)
+ % \usepackage{gfsdidot} % sampi in place of qoppa, missing sampi Sampi
+ % \usepackage{gfsartemisia} % sampi in place of qoppa, missing sampi Sampi
+ % \usepackage{libertinegc}
+ % \usepackage{noto}
+ % \usepackage{OldStandard}
+ % \usepackage{roboto}
+\fi
+
+
+% Greek script support with textalpha (greek-fontec) or babel-greek:
+
+% \usepackage{textalpha}
+\usepackage[greek,english]{babel}
+
+% Save the unpatched version
+\let\origgreeknumeral\greeknumeral
+\let\origGreeknumeral\Greeknumeral
+
+% uncomment, if you prefer Qoppa for Koppa
+% \let\textKoppa\textQoppa
+% \let\textkoppa\textqoppa
+
+
+% Hyperref
+% default PDFstring encoding is PD1 without Greek support:
+% \usepackage[unicode]{hyperref}
+% With option unicode, there is partial Greek support (no polytonic)
+\usepackage[unicode]{hyperref}
+
+
+\DeclareTextCommand{\greekscript}{PU}{}
+\DeclareTextCommand{\ensuregreek}{PU}[1]{#1}
+% Greek LICR names from "greek-fontenc"
+\DeclareTextCommand{\textdexiakeraia}{PU}{\83\164}% U+0374
+\DeclareTextCommand{\textaristerikeraia}{PU}{\83\165}% U+0375
+\DeclareTextCommand{\textQoppa}{PU}{\83\330}% U+03D8
+\DeclareTextCommand{\textqoppa}{PU}{\83\331}% U+03D9
+\DeclareTextCommand{\textStigma}{PU}{\83\332}% U+03DA
+\DeclareTextCommand{\textstigma}{PU}{\83\333}% U+03DB
+\DeclareTextCommand{\textDigamma}{PU}{\83\334}% U+03DC
+\DeclareTextCommand{\textdigamma}{PU}{\83\335}% U+03DD
+\DeclareTextCommand{\textKoppa}{PU}{\83\336}% U+03DE
+\DeclareTextCommand{\textkoppa}{PU}{\83\337}% U+03DF
+\DeclareTextCommand{\textSampi}{PU}{\83\340}% U+03E0
+\DeclareTextCommand{\textsampi}{PU}{\83\341}% U+03E1
+% TODO: support polytonic Greek (Greek Extended Unicode block)
+
+
+
+\begin{document}
+
+% \textuppercase{Grüße}
+
+% \selectlanguage{greek}
+% \selectlanguage{english}
+
+
+\section{Test Hyperref-safe implementation of Greek numerals}
+
+Every number is set in 4 versions:
+
+1: lowercase Babel,
+2: lowercase Hyperref-patched,
+
+3: uppercase Babel,
+4: uppercase Hyperref-patched,
+
+
+\DeclareRobustCommand{\numeraltest}[1]{
+ \origgreeknumeral{#1}
+ \ensuregreek{\greeknumeral{#1}}\
+ \origGreeknumeral{#1}
+ \ensuregreek{\Greeknumeral{#1}}
+}
+
+
+\noindent single numerals
+
+1-5
+\numeraltest{1}
+\numeraltest{2}
+\numeraltest{3}
+\numeraltest{4}
+\numeraltest{5}
+
+6-9
+\numeraltest{6}
+\numeraltest{7}
+\numeraltest{8}
+\numeraltest{9}
+
+10-50
+\numeraltest{10}
+\numeraltest{20}
+\numeraltest{30}
+\numeraltest{40}
+\numeraltest{50}
+
+60-90
+\numeraltest{60}
+\numeraltest{70}
+\numeraltest{80}
+\numeraltest{90}
+
+100-500
+\numeraltest{100}
+\numeraltest{200}
+\numeraltest{300}
+\numeraltest{400}
+\numeraltest{500}
+
+600-900
+\numeraltest{600}
+\numeraltest{700}
+\numeraltest{800}
+\numeraltest{900}
+
+1000-5000
+\numeraltest{1000}
+\numeraltest{2000}
+\numeraltest{3000}
+\numeraltest{4000}
+\numeraltest{5000}
+
+6000-9000
+\numeraltest{6000}
+\numeraltest{7000}
+\numeraltest{8000}
+\numeraltest{9000}
+
+10 000 - 900 000
+\numeraltest{10000}
+\numeraltest{20000}
+\numeraltest{800000}
+\numeraltest{900000}
+
+\noindent compound numbers
+
+123-323
+\numeraltest{123}
+\numeraltest{223}
+\numeraltest{323}
+
+445-645
+\numeraltest{445}
+\numeraltest{545}
+\numeraltest{645}
+
+767-967
+\numeraltest{767}
+\numeraltest{867}
+\numeraltest{967}
+
+967021 \numeraltest{967021}
+
+\noindent outside of bounds
+
+Negative and zero
+\greeknumeral{-1}
+% \Greeknumeral{-1}
+\greeknumeral{0}
+%\Greeknumeral{0}
+
+Too large:
+\greeknumeral{1000000}
+% \Greeknumeral{1000000}
+
+\paragraph{Discussion}
+
+The new implementation gives identical results.
+
+\section{Greek numerals in PDF bookmarks}
+
+\section{
+ \numeraltest{1}
+ \numeraltest{90}
+ \numeraltest{200}
+}
+
+\section{
+ \numeraltest{1000}
+ \numeraltest{90000}
+ \numeraltest{200000}
+}
+\section{
+ \numeraltest{24}
+ \numeraltest{96}
+}
+
+\section{
+ \numeraltest{96}
+ \numeraltest{263}
+}
+
+\section{
+ \numeraltest{4695}
+}
+
+\section{Original numeral:
+ \greekscript{\origgreeknumeral{1293}}
+ % \greekscript{\origGreeknumeral{1293}}
+}
+
+Babels original lower case version works fine in text. However, use in a
+section heading results in spurious numeral marks (dexia keraia) in the
+PDF bookmark. and the warning
+\begin{verbatim}
+ Package hyperref Warning: Token not allowed in a PDF string (Unicode):
+ (hyperref) removing `\@ifnextchar' on input line 353.
+\end{verbatim}
+
+The upper case version fails because MakeUpercase is not defined for
+PDFstrings.
+
+\end{document},
diff --git a/macros/latex/contrib/babel-contrib/greek/test-tu-lgr.pdf b/macros/latex/contrib/babel-contrib/greek/test-tu-lgr.pdf
new file mode 100644
index 0000000000..c1ddae2a47
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/test-tu-lgr.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.tex b/macros/latex/contrib/babel-contrib/greek/test-tu-lgr.tex
index af3502c071..e1994f3136 100644
--- a/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.tex
+++ b/macros/latex/contrib/babel-contrib/greek/test-tu-lgr.tex
@@ -1,32 +1,33 @@
\documentclass[a4paper]{article}
% \usepackage{textcomp}
-\usepackage{hyperref,bookmark}
+\usepackage{hyperref}
+% \usepackage{bookmark}
\usepackage{parskip}
% Declare the font encoding and Greek LICR definitions:
\usepackage[LGR]{fontenc}
% Set up Latin Modern OpenType unicode font
-\usepackage[tuenc]{fontspec}
+\usepackage{fontspec}
\usepackage[greek,english]{babel}
% \languageattribute{greek}{polutoniko}
% \languageattribute{greek}{ancient}
% use LGR (8-bit CB-fonts) instead of Unicode fonts for Greek:
-% Alternatives:
-% \renewcommand*{\greekscript}{\fontencoding{LGR}\selectfont}
\addto{\extrasgreek}{\greektext}
+% Alternative:
+% \renewcommand*{\greekscript}{\fontencoding{LGR}\selectfont}
\begin{document}
\title{XeTeX/LuaTeX with LGR fonts}
\author{Günter Milde}
-\date{2014/09/02}
+\date{2020/11/10}
\maketitle
The babel option «greek» activates the support for the Greek language
-defined in the file «greek.ldf» (source «greek.dtx»).
+defined in «greek.ldf» (source «greek.dtx»).
Typesetting Greek texts requires a font containing Greek letters. With the
XeTeX or LuaTeX engines, the user must ensure that the selected font
@@ -41,8 +42,8 @@ for short Greek quotes or as a last ressort.
\section{Language Switch}
The declaration \verb|\selectlanguage| switches between languages. With
-XeTeX or LuaTeX and LGR, Unicode input is not possible. Instead, use the
-Latin transliteration or LICR macros:
+XeTeX or LuaTeX and LGR as \verb|\greekfontencoding|, Unicode input is not
+possible. Instead, use the Latin transliteration or LICR macros:
\begin{quote}
\selectlanguage{greek}
@@ -87,7 +88,7 @@ Capital Greek letters have diacritics (except the dialytika and sub-iota) to
the left (instead of above) and drop them in uppercase.
Tonos and dasia mark a \emph{hiatus} (break-up of a diphthong) if placed on
-the first vowel of a diphtong (\textgreek{\'ai, \'au, \'ei, \'>ai, \'>au,
+the first vowel of a diphthong (\textgreek{\'ai, \'au, \'ei, \'>ai, \'>au,
\'>ei}). A dialytika must be placed on the second vowel if they are dropped.
(\foreignlanguage{greek}{\MakeUppercase{\'ai, \'au, \'ei, \'>ai, \'>au,
\'>ei}}).
@@ -99,8 +100,8 @@ appear in the choosen language. \emph{babel-greek} uses LICR macros in
order to let the string macros work independent of the font encoding.
If \texttt{fontspec} is loaded before babel, babel-greek loads Greek LICR
-for EU1 or EU2 from the file \texttt{greek-euenc.def}
-provided with \emph{greek-fontenc} since version~0.10.
+for TU from the file \texttt{tuenc-greek.def} provided with
+\emph{greek-fontenc} since version~0.14 (2020-02-28).
\subsection{Hiatus}
@@ -178,7 +179,6 @@ Test correct upcasing (dropping of accents):
}
\selectlanguage{english}
-
\subsection{Months}
\selectlanguage{greek}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf b/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf
deleted file mode 100644
index 7033176e1a..0000000000
--- a/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.tex b/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.tex
deleted file mode 100644
index 77afdcb872..0000000000
--- a/macros/latex/contrib/babel-contrib/greek/test-unicode-greek.tex
+++ /dev/null
@@ -1,259 +0,0 @@
-\documentclass[a4paper]{article}
-% \usepackage{textcomp}
-\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
-\usepackage{bookmark}
-\usepackage{parskip}
-
-\usepackage[tuenc]{fontspec}
-\setmainfont{Linux Libertine O}
-\setsansfont{Linux Biolinum O}
-% \setmainfont{DejaVu Serif}
-% \setmainfont{Droid Serif} % only monotonic Greek (subset of Greek and Coptic)
-
-\usepackage[greek,english]{babel}
-% \languageattribute{greek}{polutoniko}
-\languageattribute{greek}{ancient}
-
-\message{greek-euenc ist}
-\makeatletter
-\@ifl@aded{def}{greek-fontenc}{\message{geladen}}{\message{nicht geladen}}
-\makeatother
-
-
-\begin{document}
-
-\title{Greek support for Babel with XeTeX/LuaTeX}
-\author{Günter Milde}
-\date{2016/09/07}
-\maketitle
-
-The babel option «greek» activates the support for the Greek language
-defined in the file «greek.ldf» (source «greek.dtx»).
-
-Typesetting Greek texts requires a font containing Greek letters. With the
-XeTeX or LuaTeX engines, the user must ensure that the selected font
-contains the required glyphs (the default Latin Modern fonts miss most of
-them). Examples for suitable fonts are the «Deja Vu», «Linux Libertine»,
-or «Free Serif» OpenType fonts.
-
-\section{Language Switch}
-
-The declaration \verb|\selectlanguage| switches between languages.
-
-\begin{quote}
- \selectlanguage{greek}
- Τί φήις; Ἱδὼν ἐνθέδε παῖδ’ ἐλευθέραν
- τὰς πλησίον Νύμφας στεφανοῦσαν, Σώστρατε,
- ἐρῶν άπῆλθες εὐθύς;
-\end{quote}
-
-The command \verb|\foreignlanguage| sets its second argument in the language
-specified as first argument. This is intended for short text parts like
-\foreignlanguage{greek}{Βιβλιοθήκη}.
-
-\section{Font Encoding}
-
-Every language switch to \texttt{greek} calls the \verb|\extrasgreek|
-command which in turn calls \verb|\greekscript| to ensure a Greek-supporting
-font encoding (LGR, TU, EU1, or EU2). Under Xe/LuaTeX the font encoding
-normally just remains Unicode (TU). For customization, you can add to or
-redefine the \verb|\extrasgreek| command.
-
-The LGR font encoding does not support Latin characters. Therefore, the
-Babel core defines the declaration \verb|\latintext| and the command
-\verb|\textlatin| to switch to the TU, EU1, EU2, T1 or OT1 font encoding or
-typeset the argument using this encoding. At this point, the «latinencoding»
-is \latinencoding.
-
-Every language switch from \texttt{greek} calls the \verb|\noextrasgreek|
-command which in turn calls \verb|\latintext|.\\
-For customization, you can
-add to or redefine the \verb|\noextrasgreek| command.
-
-With the Unicode font encoding TU, EU1, or EU2,
-Latin characters can be used in Greek text parts and
-input via the «LGR Latin transcription» is not possible.%
-\footnote{%
- The \emph{xunicode} package provides with the \texttt{tipa} emulation an
- example how this could be achieved also for Unicode fonts. Alternatively,
- LGR encoded fonts can be used (see test-unicode-lgr.tex).
-}
-
-\begin{quote}
- \greekscript Φίλων τοῦ \textlatin{TeX} (ΕΦΤ) --
- \latintext Friends (\ensuregreek{F\'ilwn}) of TeX.%
- \footnote{Compare the printout to the similar example in test-greek.pdf.}
-\end{quote}
-
-\section{LICR Macros}
-
-Babel defines macros for several autogenerated strings so that they may
-appear in the choosen language. \emph{babel-greek} uses LICR%
-\footnote{LaTeX internal character representation} macros in
-order to let the string macros work independent of the font encoding.
-
-If \emph{fontspec} is loaded, \emph{babel-greek} loads Greek LICR
-definitions for the Unicode font encoding (TU, EU1 or EU2) from the file
-\texttt{greek-euenc.def} provided with
-\href{http://www.ctan.org/pkg/greek-fontenc}{greek-fontenc} since
-version~0.10.
-
-With this setup, it is also possible to use accent macros instead of
-pre-composed Unicode characters for letters with diacritics:
-«Τ\'ι φ\'ηις;», «\`<ορα = \accdasiavaria{ο}ρα».
-
-
-\subsection{Captions}
-
-\selectlanguage{greek}
-\prefacename,
-\refname,
-\abstractname,
-\bibname,
-\chaptername,
-\appendixname,
-\contentsname,
-\listfigurename ,
-\listtablename,
-\indexname,
-\figurename,
-\tablename,
-\partname,
-\enclname,
-\ccname,
-\headtoname,
-\pagename,
-\seename,
-\alsoname,
-\proofname,
-\glossaryname
-\selectlanguage{english}
-
-Test correct upcasing (dropping of accents):
-
-\selectlanguage{greek}
-\MakeUppercase{
-\prefacename,
-\refname,
-\abstractname,
-\bibname,
-\chaptername,
-\appendixname,
-\contentsname,
-\listfigurename,
-\listtablename,
-\indexname,
-\figurename,
-\tablename,
-\partname,
-\enclname,
-\ccname,
-\headtoname,
-\pagename,
-\seename,
-\alsoname,
-\proofname,
-\glossaryname
-}
-\selectlanguage{english}
-
-
-\subsection{Months}
-
-\selectlanguage{greek}
-\newcounter{foo}
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\stepcounter{foo} \month=\value{foo} \today \\
-\selectlanguage{english}
-
-\section{Greek Numerals}
-
-See greek.pdf for the formation rules of Greek numerals.
-Some examples:
-
-\selectlanguage{greek}
-
-\greeknumeral{1},
-\greeknumeral{2},
-\greeknumeral{3},
-\greeknumeral{4},
-\greeknumeral{5},
-\greeknumeral{6},
-\greeknumeral{7},
-\greeknumeral{8},
-\greeknumeral{9},
-\greeknumeral{10},
-\greeknumeral{11},
-\greeknumeral{12},
-\greeknumeral{20},
-\greeknumeral{345},
-\greeknumeral{500},
-\greeknumeral{1997},
-\greeknumeral{2013},
-
-\Greeknumeral{1},
-\Greeknumeral{2},
-\Greeknumeral{3},
-\Greeknumeral{4},
-\Greeknumeral{5},
-\Greeknumeral{6},
-\Greeknumeral{7},
-\Greeknumeral{8},
-\Greeknumeral{9},
-\Greeknumeral{10},
-\Greeknumeral{11},
-\Greeknumeral{12},
-\Greeknumeral{20},
-\Greeknumeral{345},
-\Greeknumeral{500},
-\Greeknumeral{1997},
-\Greeknumeral{2013},
-
-
-Enumerated lists use Greek characters/numerals in the second and fourth level:
-
-\selectlanguage{greek}
-\begin{enumerate}
- \item item 1
- \begin{enumerate}
- \item item 1.1
- \begin{enumerate}
- \item item 1.1.1
- \begin{enumerate}
- \item item 1.1.1.1
- \item item 1.1.1.2
- \end{enumerate}
- \item item 1.1.2
- \end{enumerate}
- \end{enumerate}
-\end{enumerate}
-\selectlanguage{english}
-
-
-This may be problematic with fonts that only partially support Greek and
-miss the numeral signs (dexiakeraia and aristerikeraia).
-
-You may redefine the commands \verb+\textdexiakeraia+ and
-\verb+\textaristerikeraia+ to some substitute characters.
-Or, if you prefer the ``normal'' enumeration, write in the preamble after
-loading babel:
-
-\begin{verbatim}
- \makeatletter
- \addto\extrasgreek{\let\@alph\latin@alph
- \let\@Alph\latin@Alph}
- \makeatother
-\end{verbatim}
-
-
-\end{document}
diff --git a/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf b/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf
deleted file mode 100644
index 532e132c78..0000000000
--- a/macros/latex/contrib/babel-contrib/greek/test-unicode-lgr.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/usage.pdf b/macros/latex/contrib/babel-contrib/greek/usage.pdf
index 67c6fa3699..43a51a2053 100644
--- a/macros/latex/contrib/babel-contrib/greek/usage.pdf
+++ b/macros/latex/contrib/babel-contrib/greek/usage.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/greek/usage.tex b/macros/latex/contrib/babel-contrib/greek/usage.tex
index 50d76aae02..519b721e5f 100644
--- a/macros/latex/contrib/babel-contrib/greek/usage.tex
+++ b/macros/latex/contrib/babel-contrib/greek/usage.tex
@@ -206,9 +206,12 @@ provides the following commands:
\begin{center}
\begin{tabular}{cc}\hline
Command & Output\\ \hline
-\verb+\qoppa+ & \textgreek{\qoppa}\\
-\verb+\sampi+ & \textgreek{\sampi}\\
-\verb+\stigma+ & \textgreek{\stigma}\\
+\verb+\textkoppa+ & \textgreek{\textkoppa}\\
+\verb+\textsampi+ & \textgreek{\textsampi}\\
+\verb+\textstigma+ & \textgreek{\textstigma}\\
+\verb+\textKoppa+ & \textgreek{\textKoppa}\\
+\verb+\textSampi+ & \textgreek{\textSampi}\\
+\verb+\textStigma+ & \textgreek{\textStigma}\\
\hline
\end{tabular}
\end{center}
@@ -217,20 +220,16 @@ In traditional Greek typography the first paragraph after a header is
always indented, contrary to the habit of, say, American typography. This
effect can be achieved by using the package \verb+indentfirst+.
-Additional greek symbols are available:
+Additional symbols are available:
\begin{center}
\begin{tabular}{cc}\hline
Command & Output\\ \hline
-\verb+\Digamma+ & \sg\textgreek{\Digamma}\\
-\verb+\ddigamma+ & \sg\textgreek{\ddigamma}\\
-%\verb+\tao+ & \sg\textgreek{\tao}\\
-%\verb+\Qoppa+ & \sg\textgreek{\Qoppa}\\
-%\verb|\VarQoppa| & \sg\textgreek{\VarQoppa}\\
-%\verb+\varqoppa+ & \sg\textgreek{\varqoppa}\\
-%\verb+\Sampi+ & \sg\textgreek{\Sampi}\\
-%\verb|\Stigma| & \sg\textgreek{\Stigma}\\
-\verb|\euro| & \sg\textgreek{\euro}\\
-\verb|\permill| & \sg\textgreek{\permill}\\
+\verb+\textDigamma+ & \textgreek{\textDigamma}\\
+\verb+\textdigamma+ & \textgreek{\textdigamma}\\
+\verb+\VarQoppa+ & \textgreek{\textQoppa}\\
+\verb+\textqoppa+ & \textgreek{\textqoppa}\\
+\verb+\texteuro+ & \textgreek{\euro}\\
+\verb+\textperthousand+ & \textgreek{\permill}\\
\hline
\end{tabular}
\end{center}
@@ -240,7 +239,7 @@ one can produce the so called \textit{Athenian numerals}:
\begin{center}
\begin{tabular}{cc}\hline
Command & Output\\ \hline
-\verb|\athnum{1997}| & \sg\textgreek{\athnum{1997}}\\
+\verb|\athnum{1997}| & \textgreek{\athnum{1997}}\\
\hline
\end{tabular}
\end{center}
diff --git a/macros/latex/contrib/swfigure/#README.txt# b/macros/latex/contrib/swfigure/#README.txt#
new file mode 100644
index 0000000000..e6099686f9
--- /dev/null
+++ b/macros/latex/contrib/swfigure/#README.txt#
@@ -0,0 +1,46 @@
+q%%
+%% This is file `README.txt',
+%%
+%% Copyright (C) 2020 Claudio Beccari all rights reserved.
+%% License information appended
+%%
+
+File README.txt for package swfigure
+ [2020-11-10 v.0.9.14 Managing large and spread wide figures]
+This bundle contains the swfigure.dtx, swfigure-examples.tex,
+and README.txt files plus some fake figures with extension .jpg
+or .pdf and a couple of scrrenshots with extension .pdf.
+
+This file README.txt contains the licence, the status, and some
+general information. Save the README.txt and swfigure.dtx file
+in a .../source/latex/swfigure/ folder either in the main TeX
+system tree or in your personal tree.
+
+Save the swfigure-examples.tex, the derived swfigures-examples.pdf,
+and the various .jpg and .pdf files in folder .../doc/latex/swfigure/.
+
+Process the self extracting swfigure.dtx file with pdfLaTeX;
+repeat at least twice in order to get all references correct;
+you obtain the swfigure.pdf and the swfigure.sty files.
+After extraction move the .sty file to the .../tex/latex/swfigure/
+folder, and move the .pdf file to the .../doc/latex/swfigure/ folder.
+From the original folder .../source/latex/swfigure/ move to the bin
+all files except the .dtx and the .txt ones.
+
+The author disclaims any liability from every possible inconvenience
+deriving from the use of this software; you use it at your own risk.
+
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained"
+%%
+%% This work consists of files swfigure.dtx, swfigure-examples.tex
+%% and README.txt, and the derived files swfigure.sty and swfigure.pdf.
+%%
+%% The other .jpg and .pdf files contained in this bundle are just
+%% fake figures and screenshots that anybody can replicate, copy
+%% or modify at will.
+%%
diff --git a/macros/latex/contrib/swfigure/DFscreenshot.pdf b/macros/latex/contrib/swfigure/DFscreenshot.pdf
new file mode 100644
index 0000000000..54638be4ba
--- /dev/null
+++ b/macros/latex/contrib/swfigure/DFscreenshot.pdf
Binary files differ
diff --git a/macros/latex/contrib/swfigure/DFscreenshotA3.png b/macros/latex/contrib/swfigure/DFscreenshotA3.png
new file mode 100644
index 0000000000..9305553263
--- /dev/null
+++ b/macros/latex/contrib/swfigure/DFscreenshotA3.png
Binary files differ
diff --git a/macros/latex/contrib/swfigure/FSfakeA3.pdf b/macros/latex/contrib/swfigure/FSfakeA3.pdf
new file mode 100644
index 0000000000..b83e89a846
--- /dev/null
+++ b/macros/latex/contrib/swfigure/FSfakeA3.pdf
Binary files differ
diff --git a/macros/latex/contrib/swfigure/FSfakeA3margins.pdf b/macros/latex/contrib/swfigure/FSfakeA3margins.pdf
new file mode 100644
index 0000000000..7bfa9bf448
--- /dev/null
+++ b/macros/latex/contrib/swfigure/FSfakeA3margins.pdf
Binary files differ
diff --git a/macros/latex/contrib/swfigure/README.txt b/macros/latex/contrib/swfigure/README.txt
index 50131c97c3..4d89e39e9d 100644
--- a/macros/latex/contrib/swfigure/README.txt
+++ b/macros/latex/contrib/swfigure/README.txt
@@ -1,29 +1,30 @@
%%
%% This is file `README.txt',
-%% generated with the docstrip utility.
%%
%% Copyright (C) 2020 Claudio Beccari all rights reserved.
%% License information appended
%%
File README.txt for package swfigure
- [2020-10-18 v.0.9.11 Managing large and spread wide figures]
+ [2020-11-10 v.0.9.14 Managing large and spread wide figures]
This bundle contains the swfigure.dtx, swfigure-examples.tex,
-and README.txt files plus six fake figures with extension .jpg.
+and README.txt files plus some fake figures with extension .jpg
+or .pdf and a couple of scrrenshots with extension .pdf.
This file README.txt contains the licence, the status, and some
general information. Save the README.txt and swfigure.dtx file
-in a .../source/latex/swfigure folder either in the main TeX
+in a .../source/latex/swfigure/ folder either in the main TeX
system tree or in your personal tree.
+
Save the swfigure-examples.tex, the derived swfigures-examples.pdf,
-and the six .jpg files in folder .../doc/latex/swfigure.
+and the various .jpg and .pdf files in folder .../doc/latex/swfigure/.
Process the self extracting swfigure.dtx file with pdfLaTeX;
repeat at least twice in order to get all references correct;
you obtain the swfigure.pdf and the swfigure.sty files.
-After extraction move the .sty file to the .../tex/latex/swfigure
-folder, and move the .pdf file to the .../doc/latex/swfigure folder.
-From the original folder .../source/latex/swfigure move to the bin
+After extraction move the .sty file to the .../tex/latex/swfigure/
+folder, and move the .pdf file to the .../doc/latex/swfigure/ folder.
+From the original folder .../source/latex/swfigure/ move to the bin
all files except the .dtx and the .txt ones.
The author disclaims any liability from every possible inconvenience
@@ -36,6 +37,10 @@ deriving from the use of this software; you use it at your own risk.
%%
%% This work is "maintained"
%%
-%% This work consists of files swfigure.dtx and READEME.txt, and the
-%% derived files swfigure.sty and swfigure.pdf
+%% This work consists of files swfigure.dtx, swfigure-examples.tex
+%% and README.txt, and the derived files swfigure.sty and swfigure.pdf.
+%%
+%% The other .jpg and .pdf files contained in this bundle are just
+%% fake figures and screenshots that anybody can replicate, copy
+%% or modify at will.
%%
diff --git a/macros/latex/contrib/swfigure/swfigure-examples.pdf b/macros/latex/contrib/swfigure/swfigure-examples.pdf
index e20f001fd6..35a9f91f0d 100644
--- a/macros/latex/contrib/swfigure/swfigure-examples.pdf
+++ b/macros/latex/contrib/swfigure/swfigure-examples.pdf
Binary files differ
diff --git a/macros/latex/contrib/swfigure/swfigure-examples.tex b/macros/latex/contrib/swfigure/swfigure-examples.tex
index b37eea4bc9..66cba4ca73 100644
--- a/macros/latex/contrib/swfigure/swfigure-examples.tex
+++ b/macros/latex/contrib/swfigure/swfigure-examples.tex
@@ -1,6 +1,6 @@
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = pdflatex
-\documentclass[twoside,notitlepage]{report}\errorcontextlines=100
+\documentclass[a4paper]{book}\errorcontextlines=100
\usepackage[utf8]{inputenc}
\usepackage{lmodern,textcomp,multicol,enumitem,mflogo,xcolor,fancyvrb}
\usepackage{swfigure}
@@ -49,6 +49,12 @@
\makeatletter
+\renewcommand\listoffigures{%
+ \section*{\listfigurename}%
+ \markright{\MakeUppercase\listfigurename}%
+ \@starttoc{lof}%
+ }
+
\providecommand\GetFileInfo[1]{%
\def\filename{#1}%
\def\@tempb##1 v.##2 ##3\relax##4\relax{%
@@ -57,6 +63,9 @@
\def\fileinfo{##3}}%
\edef\@tempa{\csname ver@#1\endcsname}%
\expandafter\@tempb\@tempa\relax? ? \relax\relax}
+
+\newenvironment{abstract}{\centerline{\textbf{Abstract}}
+\begin{quotation}}{\end{quotation}}
\counterwithout{section}{chapter}
@@ -72,6 +81,8 @@ Managing large images is not that straightforward to do. Package \pack{swfigure}
This package works pretty well with two side printed documents with a symmetrical page design, i.e. with the same dimension for the inner margins and, respectively, the outer margins. The documented \TeX\ file that describes the software does not have a symmetrical design, therefore this second file is necessary in order to show some examples.
\end{abstract}
+\tableofcontents
+\listoffigures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
@@ -101,7 +112,7 @@ Other examples are shown in the following pages; the filling text is a generic t
The only user macro defined by this package has the following syntax:
\begin{ttsyntax}\setfontsize{9.5}%
\cs{DFimage}\oarg{display mode}\marg{image file name}\oarg{lof entry}\%
-\qquad\marg{caption}\oarg{label}\parg{height correction}\aarg{line correction}|\meta{width test}|
+\qquad\marg{caption}\oarg{label}\parg{height correction}\aarg{line correction}|\meta{width test}|!\meta{color}!
\end{ttsyntax}
The arguments are described in detail in the twin document \file{swfigure.pdf}. We shortly repeat their meanings.
\begin{description}[noitemsep]
@@ -121,12 +132,14 @@ The arguments are described in detail in the twin document \file{swfigure.pdf}.
\item[\meta{line correction}] This optional integer number may correct the number of lines of the indentation of the wrapping text around a tall and slim figure.
%
\item[\meta{width test}] is an optional fractional number smaller than~0.5 (default \texttt{0.25}) used to check that in Vertical Slim mode the width of the scaled image does not get too small so as to leave sufficient space for e decently typeset caption; the zero value implies no test. See in page~\pageref{fig:VSSmessage} the message that is output if this width becomes too small.
+%
+\item[\meta{color}] is an optional color specification delimited by exclamation points. It is used by the \texttt{FS} full spread display mode when the included image completely fills up the spread pages; the color (default: black) may be chosen in order to contrast the image background, since it overprints the image near to its right border.
\end{description}
We stress the first optional argument meaning, whose default value is \texttt{SW}. It specifies the \meta{display mode}.
\begin{description}[noitemsep]
%
-\item[\texttt{SW}] is the acronym that specifies the \meta{display mode} for a Spread Wide figure; it consists into a full spread, without any text, and with its caption typeset in the external margin of the odd numbered page typeset in vertical mode. Since this display mode needs to start on an even page, the user should carefully find the proper place where to insert the user macro \cs{DFimage} (named as “steering” macro, since it decides which large figure style to use), because it starts a new page and possibly inserts a blank page if the new one is odd numbered. The steering macro can be also inserted within a paragraph\footnote{remeber to leave a space before \cs{DFimage} and no space after the last argument.}, and after its complete expansion restores the vertical mode; nevertheless, even so, it may insert a blank page if the next page is odd numbered.
+\item[\texttt{SW}] is the acronym that specifies the \meta{display mode} for a Spread Wide figure; it consists into a full spread, without any text, and with its caption typeset in the external margin of the odd numbered page typeset in vertical mode. Since this display mode needs to start on an even page, the user should carefully find the proper place where to insert the user macro \cs{DFimage} (named as “steering” macro, since it decides which large figure style to use), because it starts a new page and possibly inserts a blank page if the new one is odd numbered. The steering macro can be also inserted within a paragraph, and after its complete expansion restores the vertical mode; nevertheless, even so, it may insert a blank page if the next page is odd numbered. Its caption is vertically typeset in the right margin at 1em distance from the image right border; it is possible to change this default value by means of the \cs{SWcaptionShift} declaration; it suffices the redefine with \cs{renewcommand} such declaration, possibly grouping it otherwise it applies to all such spread-wide figures.
%
\item[\texttt{HS}] refers to a Horizontal Slim image, that requires a spread wide display mode, such that the first of the facing pages is an even numbered one, and with some text beneath both half images; since the caption is below the right half, the space occupied by this part of the image would be higher than that in the facing page, it is necessary to equalise these vertical spaces, and the specific code takes care of this constraint. Also in this case the user should carefully chose the place where to insert the steering macro.
%
@@ -134,14 +147,15 @@ We stress the first optional argument meaning, whose default value is \texttt{SW
%
\item[\texttt{NF}] This display mode is the Normal Figure \LaTeX\ kernel mode; the floating figure is floated to a “floats only” page; since it contains a large image this is a reasonable solution; if the caption is pretty lengthy, the \meta{height correction} comes handy to fine tune the space necessary to the caption.
%
-\item[\texttt{RF}] This fifth display mode refers to the Rotated Figure obtainable by means of the \pack{lscape} package; here the package is not used, but a direct rotation is performed by the macro. Again the \meta{height correction} optional value may be useful in order to leave more or less space to the caption; if the latter is pretty wordy, a smaller value of the preset 0.8 value may be chosen, while for single line captions a slightly higher value may be convenient.
+\item[\texttt{RF}] This display mode refers to the Rotated Figure obtainable by means of the \pack{lscape} package; here the package is not used, but a direct rotation is performed by the macro. Again the \meta{height correction} optional value may be useful in order to leave more or less space to the caption; if the latter is pretty wordy, a smaller value of the preset 0.8 value may be chosen, while for single line captions a slightly higher value may be convenient.
%
+\item[\texttt{FS}] This display mode refers to the Full Spread image covering the whole surface of two facing pages; ideally it would contain a full A3 image over two A4 facing pages without the need to shrink or expand the image; without any margin the caption is vertically typeset over the image at a certain distance from its right border. If the image has textual or colored details close to such border, a caption color may be chosen so as to contrast the image background. The distance from the right border by default is 2em, but it can be modified by redefining with \cs{renewcommand} the \cs{FScaptionShift} declaration; pay attention to group this redefinition, otherwise it applies to all such full spread figures.
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{A \texttt{HS} example}
+\section{Examples}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-On pages~\pageref{fig:HSfake} and the preceding one there is an example of a horizontal slim image.
+On page~\pageref{fig:HSfake} and the preceding one there is an example of a horizontal slim image.
As any dedicated reader can clearly see, the Ideal of
practical reason is a representation of, as far as I know, the things
@@ -150,7 +164,44 @@ used as a canon for our understanding. The paralogisms of practical
reason are what first give rise to the architectonic of practical
reason.
-\DFimage[HS]{HSfakeimage}{A Horizontal Slim fake image}[fig:HSfake]
+As will easily be shown in the next section, reason would
+thereby be made to contradict, in view of these considerations, the
+Ideal of practical reason, yet the manifold depends on the phenomena.
+Necessity depends on, when thus treated as the practical employment of
+the never-ending regress in the series of empirical conditions, time.
+Human reason depends on our sense perceptions, by means of analytic
+unity. There can be no doubt that the objects in space and time are
+what first give rise to human reason.
+
+Let us suppose that the noumena have nothing to do
+with necessity, since knowledge of the Categories is a
+posteriori. Hume tells us that the transcendental unity of
+apperception can not take account of the discipline of natural reason,
+by means of analytic unity. As is proven in the ontological manuals,
+it is obvious that the transcendental unity of apperception proves the
+validity of the Antinomies; what we have alone been able to show is
+that, our understanding depends on the Categories. It remains a
+mystery why the Ideal stands in need of reason. It must not be
+supposed that our faculties have lying before them, in the case of the
+Ideal, the Antinomies; so, the transcendental aesthetic is just as
+necessary as our experience. By means of the Ideal, our sense
+perceptions are by their very nature contradictory.
+
+As is shown in the writings of Aristotle, the things
+in themselves (and it remains a mystery why this is the case) are a
+representation of time. Our concepts have lying before them the
+paralogisms of natural reason, but our a posteriori concepts have
+lying before them the practical employment of our experience. Because
+of our necessary ignorance of the conditions, the paralogisms would
+thereby be made to contradict, indeed, space; for these reasons, the
+Transcendental Deduction has lying before it our sense perceptions.
+(Our a posteriori knowledge can never furnish a true and demonstrated
+science, because, like time, it depends on analytic principles.) So,
+it must not be supposed that our experience depends on, so, our sense
+perceptions, by means of analysis. Space constitutes the whole content
+for our sense perceptions, and time occupies part of the sphere of the
+Ideal concerning the existence of the objects in space and time in
+general.
As will easily be shown in the next section, reason would
thereby be made to contradict, in view of these considerations, the
@@ -191,14 +242,39 @@ for our sense perceptions, and time occupies part of the sphere of the
Ideal concerning the existence of the objects in space and time in
general.
+As will easily be shown in the next section, reason would
+thereby be made to contradict, in view of these considerations, the
+Ideal of practical reason, yet the
+manifold depends on the phenomena.
+Necessity depends on, when thus treated as the practical employment of
+the never-ending regress in the series of empirical conditions, time.
+Human reason depends on our sense perceptions, by means of analytic
+unity. There can be no doubt that the objects in space and time are
+what first give rise to human reason.
+
+Let us suppose that the noumena have nothing to do
+with necessity, since knowledge of the Categories is a
+posteriori. Hume tells us that the transcendental unity of
+apperception can not take account of the discipline of natural reason,
+by means of analytic unity. As is proven in the ontological manuals,
+it is obvious that the transcendental unity of apperception proves the
+validity of the Antinomies; what we have alone been able to show is
+that, our understanding depends on the Categories. It remains a
+mystery why the Ideal stands in need of reason. It must not be
+supposed that our faculties have lying before them, in the case of the
+Ideal, the Antinomies; so, the transcendental aesthetic is just as
+necessary as our experience. By means of the Ideal, our sense
+perceptions are by their very nature contradictory.
+
+\begin{DFimage}[VS]{VSfakeimage}{A Vertical Slim fake image}[fig:VSfake](0.75)<3>
As we have already seen, what we have alone been able
to show is that the objects in space and time would be falsified; what
we have alone been able to show is that, our judgements are what first
give rise to metaphysics. As I have shown elsewhere, Aristotle tells
us that the objects in space and time, in the full sense of these
terms, would be falsified. Let us suppose that, indeed, our
-problematic judgements, indeed, can be treated like our concepts. As
-any dedicated reader can clearly see, our knowledge can be treated
+problematic judgements, indeed, can be treated like our concepts.
+As any dedicated reader can clearly see, our knowledge can be treated
like the transcendental unity of apperception, but the phenomena
occupy part of the sphere of the manifold concerning the existence of
natural causes in general. Whence comes the architectonic of natural
@@ -234,7 +310,32 @@ misapprehension, it is necessary to explain that our understanding
rise to the architectonic of pure reason, as is evident upon close
examination.
-\DFimage[VS]{VSfakeimage}{A Vertical Slim fake image}[fig:VSfake](0.7)<2>
+Therefore, we can deduce that the objects in space and
+time (and I assert, however, that this is the case) have lying before
+them the objects in space and time. Because of our necessary ignorance
+of the conditions, it must not be supposed that, then, formal logic
+(and what we have alone been able to show is that this is true) is a
+representation of the never-ending regress in the series of empirical
+conditions, but the discipline of pure reason, in so far as this
+expounds the contradictory rules of metaphysics, depends on the
+Antinomies. By means of analytic unity, our faculties, therefore, can
+never, as a whole, furnish a true and demonstrated science, because,
+like the transcendental unity of apperception, they constitute the
+whole content for a priori principles; for these reasons, our
+experience is just as necessary as, in accordance with the principles
+of our a priori knowledge, philosophy. The objects in space and time
+abstract from all content of knowledge. Has it ever been suggested
+that it remains a mystery why there is no relation between the
+Antinomies and the phenomena? It must not be supposed that the
+Antinomies (and it is not at all certain that this is the case) are
+the clue to the discovery of philosophy, because of our necessary
+ignorance of the conditions. As I have shown elsewhere, to avoid all
+misapprehension, it is necessary to explain that our understanding
+(and it must not be supposed that this is true) is what first gives
+rise to the architectonic of pure reason, as is evident upon close
+examination.
+\end{DFimage}
+
The things in themselves are what first give rise to
reason, as is proven in the ontological manuals. By virtue of natural
reason, let us suppose that the transcendental unity of apperception
@@ -251,20 +352,19 @@ treated like metaphysics. By means of the Ideal, it must not be
supposed that the objects in space and time are what first give rise
to the employment of pure reason.
-\DFimage[NF]{NFfakeimage}{A large Normal Figure fake image}[fig:NFfake]
-
As is evident upon close examination, to avoid all
misapprehension, it is necessary to explain that, on the contrary, the
never-ending regress in the series of empirical conditions is a
representation of our inductive judgements, yet the things in
-themselves prove the validity of, on the contrary, the Categories. It
+themselves prove the validity of, on the contrary, the Categories. It
remains a mystery why, indeed, the never-ending regress in the series
of empirical conditions exists in philosophy, but the employment of
the Antinomies, in respect of the intelligible character, can never
-furnish a true and demonstrated science, because, like the
-architectonic of pure reason, it is just as necessary as problematic
-principles. The practical employment of the objects in space and time
-is by its very nature contradictory, and the thing in itself would
+furnish a true and demonstrated
+\begin{DFimage}[HS]{HSfakeimage}{A Horizontal Slim fake image}[fig:HSfake]
+science, because, like the
+architectonic of pure reason, it is just as necessary as
+problematic principles. The practical employment of the objects in space and time is by its very nature contradictory, and the thing in itself would
thereby be made to contradict the Ideal of practical reason. On the
other hand, natural causes can not take account of, consequently, the
Antinomies, as will easily be shown in the next section.
@@ -276,8 +376,6 @@ suppose that this is the case) are the clue to the discovery of
necessity. But the proof of this is a task from which we can here be
absolved.
-\DFimage[RF]{RFfakeimage}{A large Rotated Figure fake image}[fig:RFfake]
-
As any dedicated reader can clearly see, the Ideal of
practical reason is a representation of, as far as I know, the things
in themselves; as I have shown elsewhere, the phenomena should only be
@@ -339,8 +437,11 @@ this is the case) constitute the whole content for the paralogisms.
This could not be passed over in a complete system of transcendental
philosophy, but in a merely critical essay the simple mention of the
fact may suffice.
+\end{DFimage}
+
\DFimage[VS]{VSSfake}{A tall very slim image}[fig:VSSfake](0.65)<2>\label{fig:VSSmessage}
+
Therefore, we can deduce that the objects in space and
time (and I assert, however, that this is the case) have lying before
them the objects in space and time. Because of our necessary ignorance
@@ -366,6 +467,8 @@ misapprehension, it is necessary to explain that our understanding
rise to the architectonic of pure reason, as is evident upon close
examination.
+\DFimage[Vs]{VSfakeimage}{Wrong display mode}
+
The things in themselves are what first give rise to
reason, as is proven in the ontological manuals. By virtue of natural
reason, let us suppose that the transcendental unity of apperception
@@ -405,6 +508,16 @@ suppose that this is the case) are the clue to the discovery of
necessity. But the proof of this is a task from which we can here be
absolved.
+\DFimage[NF]{NFfakeimage}{A large Normal Figure fake image}[fig:NFfake]
+
+\DFimage[RF]{RFfakeimage}{A large Rotated Figure fake image}[fig:RFfake]
+
+As is evident upon close examination, to avoid all
+misapprehension, it is necessary to explain that, on the contrary, the
+never-ending regress in the series of empirical conditions is a
+representation of our inductive judgements, yet the things in
+themselves prove the validity of, on the contrary, the Categories.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Used commands}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -418,12 +531,12 @@ The various large fake images have been inserted with the following commands:
%
\item figure~\ref{fig:HSfake}
\begin{Verbatim}[fontsize=\setfontsize{9}]
-\DFimage[HS]{HSfakeimage}{A Horizonta Slim fake image}[fig:HSfake]
+\DFimage[HS]{HSfakeimage}{A Horizontal Slim fake image}[fig:HSfake]
\end{Verbatim}
%
\item figure~\ref{fig:VSfake}
\begin{Verbatim}[fontsize=\setfontsize{8}]
-\DFimage[VS]{VSfakeimage}{A Vertical Slim fake image}[fig:VSfake](0.7)<2>
+\DFimage[VS]{VSfakeimage}{A Vertical Slim fake image}[fig:VSfake](0.525)<1>
\end{Verbatim}
%
\item figure~\ref{fig:NFfake}
@@ -437,8 +550,26 @@ The various large fake images have been inserted with the following commands:
\DFimage[RF]{RFfakeimage}{A large Rotated Figure fake image}%
[fig:RFfake]
\end{Verbatim}
+%
+\item figure~\ref{fig:FSfakeA3}
+\begin{Verbatim}
+\DFimage[FS]{FSfakeA3}{Full Spread image}[fig:FSfakeA3]!red!
+\end{Verbatim}
+%
+\item figure~\ref{fig:FSfakeA3margins}
+\begin{Verbatim}
+\DFimage[FS]{FSfakeA3margins}{Full Spread uncropped image}%
+ [fig:FSfakeA3margins]
+\end{Verbatim}
+%
\end{itemize}
%
-\listoffigures
+%{\pagestyle{empty}
+\begin{DFimage}[FS]{FSfakeA3}{Full Spread image}[fig:FSfakeA3]!\color{red}!
+\end{DFimage}
+
+
+\DFimage[FS]{FSfakeA3margins}{Full Spread of an image with margins. the margins may be larger or smaller, therefore the caption is set with a one-line gap from the page border and if this caption amounts to more than a single line, this gap remains constant, but the first caption line moves away from the page border.}[fig:FSfakeA3margins]!\large\sffamily!
+%}
\end{document}
diff --git a/macros/latex/contrib/swfigure/swfigure.dtx b/macros/latex/contrib/swfigure/swfigure.dtx
index 5da66dfc6f..671502d36d 100644
--- a/macros/latex/contrib/swfigure/swfigure.dtx
+++ b/macros/latex/contrib/swfigure/swfigure.dtx
@@ -4,7 +4,7 @@
%<*internal>
\begingroup
\input docstrip.tex
-%\keepsilent
+\keepsilent
\preamble
Copyright (C) 2020 Claudio Beccari all rights reserved.
@@ -27,7 +27,6 @@ files swfigure.sty and swfigure.pdf
\askforoverwritefalse
\generate{\file{swfigure.sty}{\from{swfigure.dtx}{package}}}
-%\generate{\file{README.txt}{\from{swfigure.dtx}{readme}}}
\def\tmpa{plain}
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
@@ -43,22 +42,21 @@ files swfigure.sty and swfigure.pdf
\ProvidesFile{swfigure.dtx}%
%</driver>
%<+package>\ProvidesPackage{swfigure}%
-%<+readme>File README.txt for package swfigure
-%<*package|readme>
- [2020-10-18 v.0.9.11 Managing large and spread wide figures]
-%</package|readme>
+%<*package>
+ [2020-11-10 v.0.9.14 Managing large and spread wide figures]
+%</package>
%<*driver>
\documentclass[a4paper]{ltxdoc}\errorcontextlines=9
\hfuzz 10pt
\usepackage[utf8]{inputenc}
-\usepackage{lmodern,textcomp,multicol,enumitem,mflogo,xcolor}
-\usepackage{swfigure}
+\usepackage{lmodern,textcomp,multicol,enumitem,mflogo,guit}
+\usepackage{swfigure}% this already loads the graphicx package
\providecommand*\diff{\mathop{}\!\mathrm{d}}
\renewcommand\meta[1]{{\normalfont\textlangle\textit{#1}\textrangle}}
-\renewcommand\marg[1]{\texttt{\{\meta{#1}\}}}
+\renewcommand\marg[1]{\texttt{\string{\meta{#1}\string}}}
\providecommand\Marg{}
-\renewcommand\Marg[1]{\texttt{\{#1\}}}
+\renewcommand\Marg[1]{\texttt{\string{#1\string}}}
\providecommand\oarg{}
\renewcommand\oarg[1]{\texttt{[\meta{#1}]}}
\providecommand\Oarg{}
@@ -74,6 +72,8 @@ files swfigure.sty and swfigure.pdf
\providecommand\eTeX{}
\newbox\SWsynt
\renewcommand\eTeX{\lower0.5ex\hbox{$\varepsilon\!$}\TeX}
+\newcommand\Benv[1]{\cs{begin}\Marg{#1}}
+\newcommand\Eenv[1]{\cs{end}\Marg{#1}}
\newenvironment{medaglione}%
{\par\medskip\fboxrule=0.8pt\fboxsep6pt\relax
@@ -85,24 +85,27 @@ files swfigure.sty and swfigure.pdf
\providecommand\setfontsize{}
\DeclareRobustCommand\setfontsize[2][1.2]{%
\linespread{#1}\fontsize{#2}{#2}\selectfont}
+\providecommand\ped[1]{\ensuremath{_{\mathrm{#1}}}}
\GetFileInfo{swfigure.dtx}
+
\title{The \texttt{swfigure} package\\
Managing large and spread wide figures}
\author{Claudio Beccari\thanks{E-mail: \texttt{claudio dot beccari at gmail dot com}}}
-\date{Version \fileversion~---~ Last revised \filedate}
+\date{Version \fileversion~---~Last revised \filedate}
\begin{document}\errorcontextlines=100
\maketitle
\columnseprule=0.4pt
\begin{multicols}{2}
- \tableofcontents
- \end{multicols}
- \DocInput{swfigure.dtx}
+ \tableofcontents
+\end{multicols}
+\DocInput{swfigure.dtx}
\end{document}
%</driver>
% \fi
-% \CheckSum{10}^^A Doesn't this work any more?
+%
+% \CheckSum{10}
%
% \begin{abstract}
% This package defines a single command that with different options can
@@ -116,6 +119,12 @@ Managing large and spread wide figures}
% uses.
% \end{abstract}
%
+%\begin{figure}[t]
+%\includegraphics[width=\linewidth]{DFscreenshot}
+%\caption{Example of a large fake image that occupies a spread;
+% screenshot of a spread view from the companion file
+% swfigure-examples.pdf.}\label{fig:DFscreenshot}
+%\end{figure}
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Introduction}
@@ -127,11 +136,11 @@ Managing large and spread wide figures}
% printed document as special inserts; or for documents to be read on
% the screen such large sheets have to be attached to the document as
% separate files to be viewed in windows different from that where the
-% document is being read.
+% document is being read.
%
% In the other case it is possible to manage such large figures in
% different ways; we define a single command that, according to
-% different settings, can insert such figures in five different display
+% different settings, can insert such figures in six different display
% modes.
%\begin{enumerate}[noitemsep]
% \item
@@ -168,12 +177,19 @@ Managing large and spread wide figures}
% images that have a “height over width” ratio not lower than~2; we
% provide also some option arguments so as to correct small imperfections
% in the sizing of the text indention
+%\item
+% A very large image, typically A3 sized, that occupies a full spread
+% including the lateral margins; it is a solution to inputting, for
+% example, a line drawing of a technical device, that otherwise
+% should be attached as a separate document; a very large table
+% that does not fit the usual A4 paper and that cannot be reduced
+% by means of |longtable| or scaled down to unreadable font sizes.
%\end{enumerate}
%
% In any case, depending on the page geometry and the image aspect
% ratio, it is very handy to have available a single command that
% changes the display mode by just changing a single input optional
-% argument. In facts the user might start with one of the five
+% argument. In facts the user might start with one of the six
% described display modes; after examining the document daft the
% user might chose another display mode, and it suffices to change
% the optional argument, without changing the whole code.
@@ -181,8 +197,8 @@ Managing large and spread wide figures}
% \bigskip
%
% \noindent\fbox{\textcolor{red}{WARNING}}\quad This package performs
-% well with documents typeset in \texttt{twoside} mode, and with a page
-% design where the internal margins of both the odd and even pages
+% as expected with documents typeset in \texttt{twoside} mode, and with
+% a page design where the internal margins of both the odd and even pages
% are equal (symmetrical page design). For example, it does not work
% with this document designed to work in \texttt{oneside} mode and
% where the the left page margin is always larger than the right one
@@ -201,35 +217,52 @@ Managing large and spread wide figures}
% the |swfigure.zip| file from the Comprehensive \TeX\ Archive Network
% (CTAN), and decompress it either in the very folder where there is
% the document main or single document file or, for a general use, in
-% the user |texmf| personal tree; it is possible that the user should
-% directly create this personal tree; how to do it is described in the
-% documentation of the user \TeX\ system distribution.
+% the user |texmf| personal tree; it might be necessary that the user
+% should directly create this personal tree; how to do it is described
+% in the documentation of the user \TeX\ system distribution.
%
% The same holds true if the user employs a vintage \TeX\ system
% distribution; this package requires the \LaTeX3 modern language
% functionalities, therefore a \LaTeX\ kernel with a date after
-% 2019-01-01. Lacking this modern kernel, the package is strongly
-% limited, because packages |xparse| and |xfp| are used for its
+% 2019-01-01. Lacking this modern kernel, the package does not work,
+% because packages |xparse| and |xfp| are used for its
% internal workings.
%
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Usage}\label{sec:Usage}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% This package defines a single user command, |DFimage| to be used
-% with the following syntax:
+% This package defines a single user command\slash environment,
+% |DFimage|. The command is usable when the image fills up the page
+% or the spread, so that it contains no text, except the caption; the
+% environment is recommended when the large image is in a page or a
+% spread that contains also some text.\\
+% \fbox{\color{red} Warning!} This particular environment
+% cannot be nested and cannot contain a |\DFimage| command.
+%
+% The syntax is the following:
%\begin{ttsyntax}
-%\cs{DFimage}\oarg{display mode}\marg{image file name}\oarg{lof entry}\marg{caption}\oarg{label}\%
-%\qquad\parg{heigth correction}\aarg{line correction}|\meta{width test}|
+%\cs{DFimage}\oarg{display mode}\marg{image file name}\%
+%\qquad \oarg{lof entry}\marg{caption}\oarg{label}\%
+%\qquad\parg{height correction}\aarg{line correction}|\meta{width test}|!\meta{precaption}!
+%\vspace{0.5\baselineskip}
+%or
+%\vspace{0.5\baselineskip}
+% \Benv{DFimage}\oarg{display mode}\marg{image file name}\%
+%\qquad \oarg{lof entry}\marg{caption}\oarg{label}\%
+%\qquad\parg{height correction}\aarg{line correction}|\meta{width test}|!\meta{precaption}!
+%\meta{environment textual contents}
+%\Eenv{DFimage}
%\end{ttsyntax}
-% where:
+% \noindent where:
%\begin{description}[noitemsep]
%\item[\meta{display mode}]
% is one of the following uppercase acronyms:
% \texttt{NF} (Normal Figure), \texttt{RF} (Rotated Figure),
% \texttt{SW} (Spread Wide image), \texttt{HS} (Horizontal Spread-wide
-% image), and \texttt{VS} (Vertical Slim image).
-%\item[\meta{image fie name}]
+% image), \texttt{VS} (Vertical Slim image), and \texttt{FS}
+% (Full Spread image).
+%\item[\meta{image file name}]
% is the name of the image graphic file; remember that the \LaTeX based
% \TeX\ system typesetting programs accept graphic files in the formats
% with extensions \texttt{.pdf}, \texttt{.eps}, \texttt{.jpg},
@@ -246,19 +279,21 @@ Managing large and spread wide figures}
% argument; of course, if this argument is not specified, the figure
% number and its page cannot be referenced with \cs{ref}, \cs{pageref}
% and other similar commands.
-%\item[\meta{height correction}]
-% is a round parenthesis delimited optional argument; it is a fractional
-% number lower than~1 (default 0.8) with which to further scale the
-% scaled image height to be included; it is used by some display modes,
-% and it is ignored by others.
+%\item[\meta{height correction or color}]
+% is a round parenthesis delimited optional argument; as a
+% \emph{height correction} it is a fractional number lower than~1
+% (default 0.8) with which to further scale the scaled image height
+% to be included; it is used by some display modes, and it is ignored
+% by others.
%\item[\meta{line correction}] is an angle bracket delimited optional
% argument preset to zero. It is relevant only with the slim
% vertical image display mode. Sometimes the |wrapfig| package
% indents the wrapping text in such a way as to leave to much or too
% little vertical space around the image and its caption; by examining
-% the document drafts it is possible to increase or decrease the
-% vertical space by any (integer) number of lines.
-%\item[\meta{width test}] this further vertical bars delimited argument
+% the document drafts it is possible to correct the predetermined
+% number of lines by increasing or decreasing the vertical space by
+% any (integer) number of lines.
+%\item[\meta{width test}] this further vertical bars-delimited argument
% is used only when dealing with vertical slim images; when they are
% scaled down in order to fit in the available space, their width may
% become too small to allow a decently typeset caption below the
@@ -266,8 +301,14 @@ Managing large and spread wide figures}
% fraction of the text block width in order to skip the image insertion
% if the image width becomes too small; the default value for this
% \meta{width test} fraction is \texttt{0.25}, but the user can specify
-% a different value, even zero; with the zero value the width test is
+% a different value, even zero; with the zero value this width test is
% skipped.
+%\item[\meta{precaption}] is an optional color declaratio delimited by
+% exclamation points; the default value is ‘empty’; it is used only
+% by the \texttt{FS} display mode in order to typeset a caption, for
+% example, with a contrasting color over the background image average
+% color, and/or with a displacement of the first or only caption line,
+% and/or with a different font.
%\end{description}
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -285,7 +326,9 @@ Managing large and spread wide figures}
% does not know in advance the vertical space occupied by the caption,
% therefore the optional \meta{height correction} comes handy for
% small adjustments; this display mode is fully and freely floating,
-% although its positioning is fixed to~|[p]|, full only-float page.
+% although its positioning option is fixed to~|[p]|, an only-float page.
+% Therefore don't use it it the image is not really such as to occupy
+% most of text block area.
%
%\item[\texttt{RF}]
% This display mode is convenient when the image
@@ -294,6 +337,38 @@ Managing large and spread wide figures}
% for the caption. It is a fully and freely floating object with the
% same pros and cons as the \texttt{NF} display mode.
%
+%\item[\texttt{VS}]
+% This mode is convenient for tall and slim figures with aspect ratio
+% not lower than~2; but for obvious reasons, it should not be too
+% large, let's say, not larger than about~3 or~4. As always this depends
+% on the page design and the caption size. The limitations of the
+% underlying |wrapfig| package forbid its usage too close to
+% explicit lists and texts typeset in special modes with a different
+% measure from normal text. Again it is up to the user to chose
+% where to insert the |DFfigure| environment or the |\DFimage| command.
+% The |wrapfig| package documentation and our experience, show that the
+% best position is just before a new paragraph; the environment end
+% should be placed after a suitable number of full paragraphs, even
+% if not all of them are involved with wrapping.
+%
+% If the aspect ratio of the image to include is lower than~2, the
+% following message is printed in the document where the image
+% should appear (of course with |#1| replaced by the actual image
+% file name):\\
+%\begin{minipage}{0.7\textwidth}
+%\begin{verbatim}
+% ===========================================
+% Figure #1 is not tall enough.
+% Consider using a display mode different
+% from VS; may be NF or RF are better suited.
+% ===========================================
+% Nothing done!
+% ===========================================
+%\end{verbatim}
+%\end{minipage}\\[2ex]
+% A similar action and a similar message is output if the \emph{scaled}
+% image width becomes too small.
+%
%\item[\texttt{SW}]
% This display mode is convenient when a really large
% image requires two pages to display all its details; its aspect ratio
@@ -316,31 +391,18 @@ Managing large and spread wide figures}
% slim figure. The constrains described for display mode \texttt{SW}
% apply also to this mode.
%
-%\item[\texttt{VS}]
-% This mode is convenient for tall and slim figures with aspect ratio
-% not lower than~2; but for obvious reasons, it should not be too
-% large, let's say not higher than about~3 or~4. As always this depends on
-% the page design and the caption size. The limitations of the
-% underlying |wrapfig| package forbids its usage too close to
-% explicit lists and texts typeset in special modes with a different
-% measure than normal text. Again it is up to the user to chose
-% where to insert the \cs{DFfigure} command. If the aspect ratio of
-% the image to include is lower than~2, this message is printed
-% in the document where the image should appear (of course with |#1|
-% replaced by the actual image file name):\\
-%\begin{minipage}{0.7\textwidth}
-%\begin{verbatim}
-% ===========================================
-% Figure #1 is not tall enough.
-% Consider using a display mode different
-% from VS; may be NF or RF are better suited.
-% ===========================================
-% Nothing done!
-% ===========================================
-%\end{verbatim}
-%\end{minipage}\\[2ex]
-% A similar action and a similar message is output if the scaled image
-% width becomes too small.
+% \item[\texttt{FS}]
+% The \texttt{SW} mode occupies a spread without invading the lateral
+% margins; it simply occupies only the internal margin. On the opposite,
+% the \texttt{FS} Full Spread mode occupies also the lateral margins;
+% typically a full spread of two A4 pages, can contain a rotated A3 page,
+% without scaling down its contents. With this full occupation of both
+% facing pages, there is no room for any caption; therefore the actual
+% image, besides occupying an A3 page, should have a minimum white
+% margin around, so that a caption can be superimposed to the white
+% part if its original bottom margin that, upon rotation, becomes the
+% right one. If the original image has no margins, the caption may be
+% typeset with contrasting different color from the default black one.
%
%\end{description}
%
@@ -358,9 +420,18 @@ Managing large and spread wide figures}
% that he was “just” a tester. He was precious and I warmly thank him.
%
% Thanks also to Benedict Wilde who spotted some errors and suggested
-% the use of a specific setting for the PDF viewer.
+% the use of specific settings for the PDF viewer.
+%
+% Thanks also to the unknown person nicknamed “dylan.bacc” on the \GuIT\
+% forum, who induced me to work on the sixth display mode. I knew that
+% using the |memoir| class, with suitable settings, and having available
+% an advanced printer, it was possible to print documents with pages of
+% different formats and page designs; but this was not my aim: I wanted
+% something possibly independent from the document class and not
+% requiring any particular printer.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\newpage
%\begin{thebibliography}{9}
%\bibitem{bib:xparse} The \LaTeX3 Project, \emph{The \texttt{xparse} package} --- Document command parser. Release date 2020-05-15. PDF document readable with \texttt{texdoc xparse}.
%\bibitem{bib:xfp} The \LaTeX3 Project, \emph{The \texttt{xfp} package} --- Floating Point Unit. Release date 2020-05-15. PDF document readable with \texttt{texdoc xfp}.
@@ -375,9 +446,16 @@ Managing large and spread wide figures}
%
% \StopEventually{}
%
+%\clearpage
+%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{The code}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%\iffalse
+%<*package>
+%\fi
% The required \TeX\ format and is date, and the identification of this
% package have already ben inserted by the initial commands of this
% documented file.
@@ -385,12 +463,14 @@ Managing large and spread wide figures}
% Here we call the initial required packages and, since the necessary
% software to define some \LaTeX3 (L3) language “functions” are already
% part of the \LaTeX\ kernel, we just use them in order to define a
-% robust \LaTeXe/L3 interface to create a testing macro that accepts
-% many logical operators that act on items that, besides being boolean
+% robust \LaTeXe/L3 interface to create some testing macros that accept
+% many logical operators that act on items that, besides boolean
% variables, are also numerical expressions connected with relation
% operators; for further details it suffices to examine the
% |interface3.pdf| file, that is integral part of any recent \TeX\
-% system distribution.
+% system distribution. We neede also some commands to compare strings
+% or to check if a given string was included into an L3 sequence
+% (list) of strings.
%
% The syntax of the new testing macro is the following:
%\begin{ttsyntax}
@@ -402,26 +482,51 @@ Managing large and spread wide figures}
% status of boolean variables, but also the numerical relation operators;
% these, on turn, may be paired so that, for example |>=| is the same
% as~|!<|.
+% The comparisons of strings with the following syntax
+%\begin{ttsyntax}
+%\cs{CompStrings}\marg{string\ped{1}}\marg{string\ped{2}}
+%\end{ttsyntax}
+%Produces a boolean result that may be used as a \meta{test} argument
+% to |\fptest|
+% The |\SetList| macro defines a named L3 sequence variable containing
+% the reference list of valid display modes, while the |\TestList| is
+% an L3 function that tests if a given string is listed in a named
+% sequence list. Their syntax is the following:
+%\begin{ttsyntax}
+%\cs{SetList}\marg{list name}\marg{comma separated string list}
+% \cs{TestList}\meta{string}\marg{list name}\marg{true}\marg{false}
+%\end{ttsyntax}
+% The fields \meta{true} and \meta{false}, as usual, are the action
+% to be executed if the test is true or false; the test is true if
+% \meta{string} is listed into the \meta{named list}.
%
% The |trace| package is still present in this beta version of the
-% package; it will not be present in the next stable versions.
+% package; it will not be present any more in the future stable versions.
% Packages |graphicx|, |afterpage|, and |wrapfig| are functional
% for this package. In order to avoid “Option Clash” messages, such
% packages are loaded without any option; should the user load some
-% or all of them with options, this operation must be done
-% \emph{before} loading this package.
-%\iffalse
-%<*package>
-%\fi
+% or all of them with options, the user should load them
+% \emph{before} loading this package. This particular documentation
+% does not require the |graphicx| package, because it is already
+% loaded by |swfigure|.
% \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{xfp}
\ExplSyntaxOn
-\AtBeginDocument{%
-\ProvideExpandableDocumentCommand\fptest{m m m}{%
- \fp_compare:nTF{#1}{#2}{#3}}
-}
+\ProvideExpandableDocumentCommand\CompStrings{m m}{%
+ \str_if_eq_p:nn{#1}{#2}}
+
+ \ProvideExpandableDocumentCommand\fptest{m m m}{%
+ \fp_compare:nTF{#1}{#2}{#3}}
+
+ \ProvideExpandableDocumentCommand\SetList{m m}{%
+ \seq_clear_new:N #1
+ \seq_set_from_clist:Nn \DisplayModeList {#2}}
+
+ \ProvideExpandableDocumentCommand\TestList{m m m m}{%
+ \seq_if_in:NnTF #1 {#2}{#3}{#4}}
+
\ExplSyntaxOff
\RequirePackage{trace}
@@ -445,15 +550,20 @@ Managing large and spread wide figures}
%
% \begin{macrocode}
\newdimen\internalmargin
-\internalmargin=\dimexpr\oddsidemargin+1in+1bp\relax
+ \internalmargin=\dimexpr\oddsidemargin+1in+1bp\relax
+\newdimen\externalmargin
+ \externalmargin=\dimexpr\evensidemargin+1in
\newdimen\spreadwidth
-\spreadwidth=\dimexpr 2\textwidth+2\internalmargin\relax
+ \spreadwidth=\dimexpr 2\textwidth+2\internalmargin\relax
%
\newdimen\DFwidth
\newdimen\DFheight
\newdimen\DFhalfwidth
\newdimen\DFheight
+\newdimen\DFhalfheight
\newdimen\FigSpace
+\def\SWcaptionShift{1em}%
+\def\FScaptionShift{2em}%
\newsavebox\DFtotalimage
\newsavebox\DFimageI
\newsavebox\DFimageII
@@ -463,16 +573,16 @@ Managing large and spread wide figures}
\newif\if@SWtmode
% \end{macrocode}
-% The following caption-like command recompiles the captions within
-% a zero height vertical box and deals with the mandatory and optional
+% The following caption-like commands recompile the captions within
+% a zero height vertical box and deal with the mandatory and optional
% arguments according to the following syntax:
%\begin{ttsyntax}
%\cs{DFcaption}\oarg{lof entry}\marg{caption}\oarg{label}
%\end{ttsyntax}
-% Notice that the ]lof entry defaults to the full caption text if
-% a different text is not explicitly entered.
-% This command is specific those those display modes that compose
-% the caption in vertical mode, therefore the measure is the
+% Notice that the \meta{lof entry} defaults to the full caption text if
+% a different text is not explicitly entered.
+% This commands are specific to those display modes that compose
+% the caption in vertical mode, therefore the caption measure is the
% |\textheight|.
% \begin{macrocode}
\NewDocumentCommand\DFcaption{O{#2} m o}{\refstepcounter{figure}%
@@ -481,35 +591,41 @@ Managing large and spread wide figures}
\addcontentsline{lof}{figure}{\protect\numberline{\thefigure}#1}
\IfValueT{#3}{\label{#3}}\relax%
}
+\NewDocumentCommand\DFcaptionP{O{#2} m o D!!{black}}%
+ {\refstepcounter{figure}%
+ \vbox to 0pt{\vss\hsize=\textheight\parindent=0pt\leavevmode
+ #4\relax Figure \thefigure\quad #2}%
+ \addcontentsline{lof}{figure}{\protect\numberline{\thefigure}#1}
+ \IfValueT{#3}{\label{#3}}\relax%
+}
+
% \end{macrocode}
% The |\cleartoeven| command may already exist in the document class.
% We prefer to make an absolute redefinition so as to be sure that it
% performs as we need in this package. In any case this new definition
% may be used in such a way that the |\DFimage| user command may be used
-% also while typesetting in text mode, resuming text mode after complete
-% expansion. This is useful, especially for spread wide display modes,
-% to chose the most suitable place in the suorce file to place the
-% |\DFimace| command with its arguments; only with the |SW| mode it
-% is necessary to avoid any space after the last macro argument and the
-% text that follows it.
+% also while typesetting in text (horizontal) mode, resuming such mode
+% after complete expansion. This is useful, especially for spread wide
+% display modes, to chose the most suitable place in the source file to
+% place the |\DFimage| command with its arguments.
%
% \begin{macrocode}
+
\newcommand\set@tmode@newpage{%
\ifvmode
\@SWtmodefalse
\else
- \@SWtmodetrue
- \@bsphack\vadjust{\vspace{0pt plus1fill}\@esphack\newpage}%
+ \unskip\@SWtmodetrue\linebreak
+ \vadjust{\vspace{0pt plus1fill}\newpage}%
\fi}
\newcommand\reset@tmode{\if@SWtmode\expandafter\noindent\ignorespaces\fi}
-\NewDocumentCommand\cleartoeven{ o }{%
- \IfValueTF{#1}%
- {\set@tmode@newpage
- \ifodd\value{page}\afterpage{#1}\else#1\fi}%
- {\ifodd\value{page}\null\clearpage\fi}}
+\newcommand\cleartoeven[1]{%
+ \set@tmode@newpage\clearpage
+ \ifodd\c@page\afterpage{#1}\else#1\fi%
+ }
% \end{macrocode}
% Now we define the “real” user macro necessary to chose the
@@ -524,51 +640,43 @@ Managing large and spread wide figures}
% conceived for, and its initials recall this priority. All other
% modes came afterwards. the other optional parameters may have a
% default value, but they are ignored by certain modes that don use
-% those parameters. As for the previous macro |\DFimage|, here the \meta{lof entry} defaults to the full \meta{caption} text.
+% those parameters. As for the previous macro |\DFimage|, here
+% the \meta{lof entry} defaults to the full \meta{caption} text.
%
% Actually \cs{DFimage} just examines the \meta{display mode}, and
% accordingly passes the necessary parameters to the actual macros
% that implement the various mode displays. It outputs an error
% message if the \meta{display mode} acronym was misspelt.
% \begin{macrocode}
-\NewDocumentEnvironment{DFimage}{%
- O{SW} m O{#4} m o D(){0.8} D<>{0} D||{0.25}}{%
-\ifstrequal{#1}{SW}%
- {%
- \SWfigure{#2}[#3]{#4}[#5]%
+\NewDocumentEnvironment{DFimage}%
+ {O{SW} m O{#4} m o D(){0.8} D<>{0} D||{0.25} D!!{}}%
+{%
+ \SetList{\DisplayModeList}{SW,HS,VS,FS,NF,RF}%
+ \TestList{\DisplayModeList}{#1}%
+ {\csuse{#1figure}{#2}[#3]{#4}[#5](#6)<#7>|#8|!#9!%
+ \fptest{\CompStrings{\@currenv}{DFimage}}{}{\reset@tmode}%
}%
- {\ifstrequal{#1}{NF}%
- {%
- \NFfigure{#2}[#3]{#4}[#5](#6)%
- }%
- {\ifstrequal{#1}{RF}% OK
- {%
- \RFfigure{#2}[#3]{#4}[#5]%
- }%
- {\ifstrequal{#1}{VS}%
- {%
- \VSfigure{#2}[#3]{#4}[#5](#6)<#7>|#8|%
- }%
- {\ifstrequal{#1}{HS}
- {%
- \HSfigure{#2}[#3]{#4}[#5](#6)%
- }%
- {\PackageWarning{swfigure}%
- {%
- **************************************\MessageBreak
- Option #1\space is not valid \MessageBreak
- Nothing done \MessageBreak
- Image #2\space was not processed \MessageBreak
- **************************************\MessageBreak}%
- }%
- }%
- }%
- }%
+ {%
+ \DFwarning[#1]{#2}[#3]{#4}
}%
}%
+{%
+ \aftergroup\reset@tmode
+}%
+
+\NewDocumentCommand\DFwarning{ o m o m o d() d<> d|| d!!}%
+{\PackageWarning{swfigure}%
+ {********************************************\MessageBreak
+ Option #1\space is not valid. Nothing done \MessageBreak
+ \MessageBreak
+ Image #2 was not processed \MessageBreak
+ *******************************************\MessageBreak
+ }%
+}
+
% \end{macrocode}
-% In the following subsections the five specific display mode macros
+% In the following subsections the six specific display mode macros
% are examined and commented.
%^^A=====================================
% \subsection{The \cs{SWfigure} macro for Spread Wide images}
@@ -576,6 +684,7 @@ Managing large and spread wide figures}
%The specific macro for spread-wide images has the following syntax:
%\begin{ttsyntax}
%\cs{SWfigure}\marg{image file name}\oarg{lof entry}\marg{caption}\oarg{label}
+%\qquad\parg{height correction}\aarg{lines}|\meta{width thest}|!precaption!
%\end{ttsyntax}
% The various arguments have already been described; as you see the
% \meta{display mode} argument is not there anymore, as well as the
@@ -583,7 +692,9 @@ Managing large and spread wide figures}
% \meta{caption} text, the third argument of this macro, is used also
% to initialise the \meta{lof entry}, so that if the user doe not
% specify such short caption entry, the default is identica to the
-% full caption.
+% full caption. Notice the the last arguments are not actually used;
+% they are needed in the definition due to the way |DFimage| transfers
+% its arguments to the called macros.
%
% The working strategy is the following: the initial image to be divided
% in two halves is stored in a box; this box is examined in order
@@ -592,11 +703,11 @@ Managing large and spread wide figures}
% all the necessary data to display the image halves in the requested
% way.
%
-% Notice that the |trim| option to |\includegraphics|, used to
-% divide the initial image in two exact halves, maybe should
+% Notice that the |trim| option to |\includegraphics|, that is being
+% used to divide the initial image in two exact halves, maybe should
% be used without specifying other options; but, most important,
% it requires actual numbers, not macros; therefore we have to make
-% use of the usual dirty trick of defining an expanded macro
+% use of the usual “dirty” trick of defining an expanded macro
% |\x| within a group that the macro itself closes upon its
% expansion; in this way the optional argument of the |\includegraphics|
% macro contains only keywords and numbers and may be executed
@@ -638,9 +749,10 @@ Managing large and spread wide figures}
% Eventually the caption is set in the right margin of the right
% spread page, rotated $90^\circ$ counterclockwise.
% The |cleartoeven| guaranties that the first float is set into an even
-% numbered page. A final |\clearpage| ensures that both floats are output.
+% numbered page. A final |\clearpage| ensures that both floats are
+% output.
% \begin{macrocode}
-\NewDocumentCommand\SWfigure{m O{#3} m o}{%
+\NewDocumentCommand\SWfigure{m o m o d() d<> d|| d!!}{%
\setbox\DFtotalimage=\hbox{\includegraphics{#1}}%
\DFwidth=\wd\DFtotalimage \DFhalfwidth=0.5\DFwidth
\DFheight=\ht\DFtotalimage
@@ -662,22 +774,22 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
\setbox\DFimageI=\hbox{\scalebox{\DFscalefactor}{\usebox{\DFimageI}}}%
\setbox\DFimageII=\hbox{\scalebox{\DFscalefactor}{\usebox{\DFimageII}}}%
%
-\cleartoeven[%
+\cleartoeven{%
\begin{figure}[p]%
- \vbox to\textheight{\vss\hsize=\textwidth%\
+ \vbox to\textheight{\vss\hsize=\textwidth%
\makebox[\hsize][l]{\makebox[\FigSpace][r]{\box\DFimageI}}\vss}%
- \end{figure}\clearpage
+ \end{figure}\newpage
%
\begin{figure}[p]%
\vbox to\textheight{\vss\hsize=\textwidth
\makebox[\hsize][r]{\makebox[\FigSpace][l]{\box\DFimageII}%
% Rotated caption in the right page
- \makebox(0,0)[lb]{\hspace*{1em}\raisebox{0.5\textheight}{%
+ \makebox(0,0)[lb]{\hspace*{\SWcaptionShift}\raisebox{0.5\textheight}{%
\rotatebox[origin=tc]{90}{\DFcaption[#2]{#3}[#4]%
%
}}}}\vss}%
\end{figure}%
-]\clearpage\reset@tmode}
+}\clearpage\reset@tmode}
% \end{macrocode}
%^^A========================================
@@ -685,7 +797,8 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% page figures}
%^^A========================================
% This code is without surprises, except that it receives from the
-% |DFimage| steering macro five arguments, the last (optional) one
+% |DFimage| steering macro five usable arguments (plus three more
+% ones that are not actually used); the fifth (optional) one
% being delimited by round parentheses; by default, it contains the
% value 0.8, but the user can pass to the steering macro a different
% value in order to reduce the actual image size so as to leave
@@ -693,9 +806,9 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% not know in advance how many lines would occupy a structured
% complex caption.
% \begin{macrocode}
-\NewDocumentCommand\NFfigure{m O{#3} m o d()}{%
+\NewDocumentCommand\NFfigure{m o m o d() d<> d|| d!!}{%
\begin{figure}[p]
- \includegraphics[width=\linewidth,height=#5\textheight,
+ \includegraphics[width=\linewidth, height=#5\textheight,
keepaspectratio]{#1}%
\caption[#2]{#3}%
\IfValueT{#4}{\label{#4}}\relax
@@ -714,10 +827,10 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% any \meta{height correction} argument to this macro, because
% it automatically scales the box containing the image and
% the caption so as to fill up the height or the width of the
-% text block.
+% text block. Of course the macro signature includes also
+% the descriptors of unused arguments.
% \begin{macrocode}
-%\NewDocumentCommand\RFfigure{m o m o}{%
-\NewDocumentCommand\RFfigure{m O{#3} m o}{%
+\NewDocumentCommand\RFfigure{m o m o d() d<> d|| d!!}{%
\dimen8=\textwidth\dimen10=\textheight
\figure[p]\setbox\RFbox=\hbox{%
\rotatebox[origin=cc]{90}{\parbox[b][\dimen8][c]{\dimen10}%
@@ -744,6 +857,17 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% the text that flows around the image. Nevertheless with a “normal”
% textual contents of the text block the result may be very good.
%
+% The user is recommended to attentively read the |wrapfig|
+% documentation because it has several limitations. here we suggest
+% the user to open the environment just before a paragraph and
+% close it after several paragraphs; remember that since the opening
+% and the closing statements are far away from one another, it is
+% possible to forget this situation and insert another such environment
+% within the former one ,or a |\DFimage| command, and this will
+% produce undesirable effects; never ever nest two |Dfimage|
+% environments and never ever insert a |\DFimage| command within
+% an environment.
+%
% The user should help a little bit the correct performance of
% this macro; for this reason, besides the \meta{height correction}
% factor, the steering macro may pass to it also the \meta{line
@@ -755,12 +879,12 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% aspect ratio is performed; should this image have an aspect ratio
% smaller than~2, the process is aborted and a message is printed
% in the output document that informs the user and recommends to
-% use another \meta{display mode} acronym.
+% use another \meta{display mode} code.
%
% Furthermore, should the image be very slim and tall, the
% \meta{height correction} may conveniently reduce its height,
% but, in order to avoid changing its aspect ratio, it reduces
-% also its width; eventually the withs is reduced to the point that
+% also its width; eventually the width is reduced to the point that
% beneath the image there would not be enough space for a decently
% typeset caption. A further optional delimited argument is available:
% its delimiting tokens are two vertical bars, \verb+| |+, and its
@@ -773,7 +897,7 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
%
%
% \begin{macrocode}
-\NewDocumentCommand\VSfigure{m O{#3} m o d() d<> d||}{%
+\NewDocumentCommand\VSfigure{m o m o d() d<> d|| d!!}{%
\setbox\DFtotalimage=\hbox{\includegraphics{#1}}
\DFwidth=\wd\DFtotalimage \DFheight=\ht\DFtotalimage
\edef\VS@aspectratio{\fpeval{\DFheight/\DFwidth}}
@@ -810,7 +934,7 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
\IfValueT{#4}{\label{#4}}\relax}
\VS@lines=
\fpeval{round(\ht\DFtotalimage/\baselineskip,0)+#6}%
- \begin{wrapfigure}[\VS@lines]{O}[0pt]{\VS@width}%
+ \begin{wrapfigure}[\VS@lines]{o}[0pt]{\VS@width}%
\box\DFtotalimage
\end{wrapfigure}%
}%
@@ -836,9 +960,8 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
% it is necessary to box again the left page box so as to have
% the same hight and depth as the right page one.
% \begin{macrocode}
-\NewDocumentCommand\HSfigure{m o m o d()}{%
- \cleartoeven
- \setbox\DFtotalimage=\hbox{\includegraphics{#1}}
+\NewDocumentCommand\HSfigure{m o m o d() d<> d|| d!!}{%
+ \setbox\DFtotalimage=\hbox{\includegraphics{#1}}%
\DFwidth=\wd\DFtotalimage \DFhalfwidth=0.5\DFwidth
\FigSpace=0.5\spreadwidth%
%
@@ -848,7 +971,7 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
%
\setbox\DFimageII\hbox{\bgroup
\edef\x{\egroup\noexpand\includegraphics*[%
- trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
+ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
%
\edef\DFscalefactor{\fpeval{\FigSpace/\DFhalfwidth}}%
%
@@ -864,30 +987,224 @@ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
\vtop{\hsize\dimen10\parindent\z@
\textwidth=\hsize
\DFcaption[#2]{#3}[#4]%
- }%
+ }\vspace*{2\baselineskip}%
}%
}%
\setbox\DFimageI=\vbox to\ht\DFimageII{\box\DFimageI\vss}%
%
- \begin{figure}[t]
- \makebox[\textwidth][l]{%
- \makebox[\DFhalfwidth][l]{\box\DFimageI}}%
- \end{figure}
- \afterpage{%
- \begin{figure}[t]
- \makebox[\textwidth][r]{%
- \makebox[\DFhalfwidth][r]{\box\DFimageII}}%
- \end{figure}%
- }
+ \cleartoeven{%
+ \hb@xt@\textwidth{%
+ \makebox[\DFhalfwidth][l]{\box\DFimageI}\hss}%
+%
+ \afterpage{\hb@xt@\textwidth{%
+ \hss\makebox[\DFhalfwidth][r]{\box\DFimageII}}%
+ }%
+ }%
}
% \end{macrocode}
-%\begin{center}\setfontsize{15mm}
-%\color{red} HAPPY \LaTeX-ING
-%\end{center}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\subsection{The \cs{FSfigure}~macro for Full Spread figures}
+%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Although using certain classes, such as |memoir|, it is possible to
+% typeset documents on pages of different sizes and to print them on
+% advanced printers that use different sized papers, this package aims
+% to be independent form any class and any printer; it is limited to
+% the ordinary default paper size A4, as it is usual in Europe, but
+% letter paper is also valid); ideally it would typeset an A3 sized
+% image on a full spread, i.e. by using also the space of all the
+% margins.
+%
+% Actually with American paper sizes there is not a series of sizes
+% that behaves as the ISO A series, but this macro tries to adjust the
+% large image to the available full spread; this means an image as
+% large as two standard pages.
+%
+% If the available image is taller than large, with an aspect ratio
+% around~$\sqrt2$, it turns the image 90° counterclockwise; cuts it in
+% two identically sized halves, and sets them on two facing pages joining
+% them at the spine but covering the greatest part of both pages, so
+% as to avoid exceeding either the paper height or twice the paper width.
+% If the image has an aspect ratio close to $\sqrt{1/2}$, it does the
+% same, except rotating the image.
+%
+% In any case the user creates a separate PDF file to be imported into
+% the document that is supposed to contain it; it is better if this PDF
+% is of vectorial type, i.e. any drawing and all fonts should should be
+% vectorial; this PDF might contain photos or similar images of
+% rasterised type, but the pixel density should be suitably high in
+% order to preserve the image quality.
+%
+% The user has two choices: $(a)$ either the image has its own margins,
+% or $(b)$ the image is cropped and has no white margins.
+%
+% Normally this display mode does not leave space for a caption;
+% therefore if a caption is needed, it is overprinted on the image;
+% in case $(a)$ there are no problems because the caption goes over
+% the white right margin (rotated 90° counterclockwise); while in
+% case $(b)$ the caption is over printed un the right side of the
+% image; depending on the image “background” a different color
+% might be more suited compared to black (the default color).
+% The last macro argument takes care of inserting before the caption
+% any declaration that may involve color, displacement, font encoding
+% (seldom necessary), family, series, shape and size;
+%
+% With all the above constraints the syntax of this \cs{FSimage}
+% macro is the following; it uses one of the main macro delimited
+% optional arguments in a different way:
+%\begin{ttsyntax}\setfontsize{9.25}%
+%\cs{FSimage}\marg{image file name}\oarg{lof entry}\marg{caption text}\oarg{label string}
+%\qquad\parg{height correction}\aarg{line correction}|\meta{width text|!\meta{precaption}!
+%\end{ttsyntax}
+% The above is the full definition, but the fifth, sixth and seventh
+% arguments are not used; they are necessary for the special
+% mechanism of argument transfer from the environment or command
+% opening statement arguments to this actual macro.
+%
+% Moreover, since the included image overlaps the top and bottom
+% margins, if these contain the header and footer such elements
+% would show if the image is not opaque enough; in any case the
+% footer would show because it overlaps the image. Since most
+% images are not opaque at all it is better to locally use the
+% \texttt{empty} page style, but without using the |\thispagestyle|
+% command, because it hold for just one page, while the spread
+% occupies two pages. The macro provides this setting but it has
+% to create a group in case the |\DFimage| command is used, while
+% it is not necessary when using the |DFimage| environment,
+% therefore the current environment is tested and the opening
+% |\bgroup| and closing |\egroup| commands are used onlY if the
+% code is used without the environment.
+%
+% Therefore the code steps are the following:
+%\begin{enumerate}[noitemsep]
+%\item
+% The initial figure is loaded into a box from which the necessary
+% measures are taken; in particular the its width and its height in
+% order to check the aspect ratio, or better, which dimension is greater
+% than the other. If the height is smaller than the width the image is
+% sort of panoramic and we proceed splitting the total image box into
+% two equal halves, with a vertical cut in the middle.
+%\item
+% Otherwise the image is as a portrait, and we split the total image
+% block into two halves with an horizontal cut in the middle; such two
+% boxes need a rotation of 90° anticlockwise due to the horizontal cut of
+% an original higher than wide image. With this operation we simulate a
+% rotation of the original image, because it is not allowed to
+% simultaneously rotate and trim the original image; the trimming
+% action apparently cannot be executed together with any other one
+% among the many other that the |\includegraphics| command can
+% do\footnote{Actually it can, provided that the trim option with
+% its arguments is specified before any other option.}.
+% Of course, with this rotation of the half pictures we have to
+% redefine the height and width to use for scaling.
+%\item
+% The |\fptest| is used to compare the aspect ratios of any of the two
+% equal halves with the aspect ratio of the paper. If the former
+% aspect ratio is higher than the latter, the scaling factor is
+% based on the heights, otherwise on the widths, so as to resize
+% both half picture boxes to fit within the page.
+%\item
+% The |\cleartoeven| command allows to use the main macro even within
+% a paragraph; in any case it possibly inserts a blanc page and restarts
+% working on an even page. First is sets the left half picture box;
+% that complicated series of vertical and horizontal boxes of different
+% specified dimensions contains displacements and the material to output;
+% That complicated alternating set is to guarantee that no overfull
+% vertical or horizontal boxes are created, in spite of the fact that
+% an object larger than the text block is being output; at the same
+% time the box must be flush right in order to reach the spine.
+%\item
+% The right half is even more complicated to build, because there
+% is also the caption to set on the right of the page, overwriting
+% the right part of the image, but the idea is always to close
+% correctly every box putting the right spacing commands at the
+% beginning or at the end of each box.
+%\item
+% Eventually a |\clearpage| flushes out everything that is still in
+% the figure stack and possibly restores the vertical or horizontal
+% typesetting mode depending on the status that was in force when
+% the |\DFimage| command or the |DFimage| environment started its
+% expansion.
+% Due to the size of the images that completely fill up all the
+% margins, probably the best way to output such huge images is at
+% the end of a chapter, or at the end of the whole document.
+%\end{enumerate}
+% \begin{macrocode}
+\NewDocumentCommand\FSfigure{m o m o d() d<> d|| d!!}{%
+ \fptest{\CompStrings{\@currenv}{DFimage}}{}{\bgroup}%
+ \pagestyle{empty}%
+ \setbox\DFtotalimage=\hbox{\includegraphics{#1}}%
+ \DFwidth=\wd\DFtotalimage \DFheight=\ht\DFtotalimage
+ \ifdim \DFheight < \DFwidth
+ \DFhalfwidth=0.5\DFwidth
+ \setbox\DFimageI\hbox{\bgroup
+ \edef\x{\egroup\noexpand\includegraphics*[%
+ trim = 0 0 \the\DFhalfwidth\space 0]}\x{#1}}%
+ \setbox\DFimageII\hbox{\bgroup
+ \edef\x{\egroup\noexpand\includegraphics*[%
+ trim = \the\DFhalfwidth\space 0 0 0]}\x{#1}}%
+ \DFwidth=\DFhalfwidth \DFheight=\ht\DFtotalimage
+ \else
+ \DFhalfheight=0.5\DFheight
+ \setbox\DFimageII\hbox{\bgroup
+ \edef\x{\egroup\noexpand\includegraphics*[%
+ trim = 0 0 0 \the\DFhalfheight\space]}\x{#1}}% bottom half
+ \setbox\DFimageI\hbox{\bgroup
+ \edef\x{\egroup\noexpand\includegraphics*[%
+ trim = 0 \the\DFhalfheight\space 0 0]}\x{#1}}% tophalf
+ \setbox\DFimageI=\hbox{\rotatebox[origin=cc]{90}{\box\DFimageI}}
+ \setbox\DFimageII=\hbox{\rotatebox[origin=cc]{90}{\box\DFimageII}}
+ \DFwidth=\DFhalfheight \DFheight=\wd\DFtotalimage
+ \fi
+\fptest{\DFheight/\DFwidth > \paperheight/\paperwidth}%
+ {\edef\DFscalefactor{\fpeval{\paperheight/\DFheight}}}%
+ {\edef\DFscalefactor{\fpeval{\paperwidth/\DFwidth}}}%
+ \setbox\DFimageI=\hbox{\scalebox{\DFscalefactor}{\usebox{\DFimageI}}}%
+ \setbox\DFimageII=\hbox{\scalebox{\DFscalefactor}{\usebox{\DFimageII}}}%
+\cleartoeven{%
+ \begin{figure}[p]%
+ \vbox to\textheight{\vss\hsize=\textwidth% vbox 1
+ \hbox to\hsize{\hspace*{-\externalmargin}% hbox 1
+ \vbox to\paperheight{\vss% vbox 2
+ \hbox to\paperwidth{\hss\box\DFimageI}% hbox 2 end hbox 2
+ \vss}% end vbox 2
+ \hss}% end hbox 1
+ \vss}% end vbox 1
+ \end{figure}\newpage
+%
+ \begin{figure}[p]%
+ \vbox to\textheight{\vss\hsize=\textwidth% vbox 1
+ \hbox to\hsize{\hspace*{-\internalmargin}% hbox 1
+ \vbox to\paperheight{\vss% vbox 2
+ \hbox to\paperwidth{% hbox 2
+ \box\DFimageII\makebox(0,0)[lb]{% mbox 3
+ \hspace*{-\FScaptionShift}%
+ \raisebox{0.5\textheight}{% raisebox
+ \rotatebox[origin=bc]{90}{% rotatebox
+ \DFcaptionP[#2]{#3}[#4]!#8!%
+ }% end rotatebox
+ }% end raisebox
+ }% end mbox 3
+ }% end hbox 2
+ \vss}% end vbox 2
+ \hss}% end hbox 1
+ \vss}% end vbox 1
+ \end{figure}%
+}\clearpage
+\fptest{\CompStrings{\@currenv}{DFimage}}{}{\egroup}%
+\reset@tmode}
+% \end{macrocode}
+%\vspace*{2\baselineskip}
+%\noindent\makebox[\textwidth]{\setfontsize{10mm}
+%\color{red} HAPPY \LaTeX-ing}
%\endinput
%\iffalse
%</package>
%\fi
+%
+% \Finale
+%
+%\endinput
+%
%\iffalse
%<*readme>
%\fi
@@ -913,4 +1230,6 @@ deriving from the use of this software; you use it at your own risk.
% \end{macrocode}
%\iffalse
%</readme>
-%\fi \ No newline at end of file
+%\fi
+%
+% \ No newline at end of file
diff --git a/macros/latex/contrib/swfigure/swfigure.pdf b/macros/latex/contrib/swfigure/swfigure.pdf
index b0501e26b6..19dd19dd9a 100644
--- a/macros/latex/contrib/swfigure/swfigure.pdf
+++ b/macros/latex/contrib/swfigure/swfigure.pdf
Binary files differ
diff --git a/macros/latex/contrib/vdmlisting/README b/macros/latex/contrib/vdmlisting/README
index 66383edd17..ec31c3b2d6 100644
--- a/macros/latex/contrib/vdmlisting/README
+++ b/macros/latex/contrib/vdmlisting/README
@@ -1,5 +1,5 @@
VdmListing package
-Copyright 2012--2013 Kenneth Lausdahl (the package)
+Copyright 2012--2020 Kenneth Lausdahl (the package)
Released under the LaTeX Project Public License 1.3 or later
The `vdmlisting' package is an extension for the 'listings'
diff --git a/macros/latex/contrib/vdmlisting/vdmlisting.pdf b/macros/latex/contrib/vdmlisting/vdmlisting.pdf
index 136708dbd5..d856550a16 100644
--- a/macros/latex/contrib/vdmlisting/vdmlisting.pdf
+++ b/macros/latex/contrib/vdmlisting/vdmlisting.pdf
Binary files differ
diff --git a/macros/latex/contrib/vdmlisting/vdmlisting.sty b/macros/latex/contrib/vdmlisting/vdmlisting.sty
index 619fb34df2..7bf4a72a73 100644
--- a/macros/latex/contrib/vdmlisting/vdmlisting.sty
+++ b/macros/latex/contrib/vdmlisting/vdmlisting.sty
@@ -9,8 +9,8 @@
%% (c) 2013 Kenneth Lausdahl
%%
%%
-\def\filedate{2013/04/10}
-\def\fileversion{1.0}
+\def\filedate{2020/11/10}
+\def\fileversion{1.1}
\NeedsTeXFormat{LaTeX2e}
\AtEndOfPackage{\ProvidesPackage{vdmlisting}
[\filedate\space\fileversion\space(Kenneth Lausdahl)]}
@@ -53,8 +53,7 @@
%
%configure listing style and language
%
-
-\lstdefinelanguage{VDM_SL}
+\lstdefinelanguage{VDM_SL_10}
{morekeywords={RESULT, abs, all, always, and, as, be, be st, bool, by, card, cases, char, comp, compose,
conc, dcl, def, definitions, dinter, div, dlmodule, do, dom, dunion, elems, else, elseif, end,
error, errs, exists, exists1, exit, exports, ext, false, floor, for, for all, forall, from,
@@ -69,8 +68,20 @@ conc, dcl, def, definitions, dinter, div, dlmodule, do, dom, dunion, elems, else
morestring=[b]",
morestring=[b]',
}[keywords,comments,strings]
+
+\lstdefinelanguage{VDM_SL}
+ {morekeywords={RESULT,\#else,\#endif,\#ifdef,\#ifndef,abs,all,always,and,as,atomic,be,be st,bool,by,card,cases,char,comp,compose,conc,dcl,def,definitions,dinter,div,dlmodule,do,dom,dunion,
+ elems,else,elseif,end,eq,error,errs,exists,exists1,exit,exports,ext,false,floor,for,for all,forall,from,functions,hd,if,imports,in,in set,inds,init,inmap,int,inter,inv,inverse,iota,is,is not yet specified,is\_,lambda,len,let,map,measure,merge,mk\_,mod,module,mu,munion,nat,nat1,nil,not,not in set,of,operations,or,ord,others,post,power,pre,psubset,pure,rat,rd,real,rem,renamed,return,reverse,rng,
+ seq,seq1,set,set1,skip,specified,st,state,struct,subset,then,tixe,tl,to,token,traces,trap,true,types,undefined,
+ union,uselib,values,while,with,wr,yet
+},
+ sensitive,
+ morecomment=[l]--,
+ morestring=[b]",
+ morestring=[b]',
+ }[keywords,comments,strings]
-\lstdefinelanguage{VDM_PP}
+\lstdefinelanguage{VDM_PP_10}
{morekeywords={\#act, \#active, \#fin, \#req, \#waiting,
RESULT, abs, all, always, and, async, atomic, be, be st, bool, by, card, cases, char, class,
comp, compose, conc, dcl, def, dinter, div, do, dom, dunion, elems, else, elseif, end, error,
@@ -87,8 +98,23 @@ conc, dcl, def, definitions, dinter, div, dlmodule, do, dom, dunion, elems, else
morestring=[b]",
morestring=[b]',
}[keywords,comments,strings]
+
+\lstdefinelanguage{VDM_PP}
+ {morekeywords={RESULT,\#act,\#active,\#else,\#endif,\#fin,\#ifdef,\#ifndef,\#req,\#waiting,abs,all,always,and,async,atomic,be,be st,bool,by,card,cases,char,class,comp,compose,conc,dcl,def,dinter,div,do,dom,dunion,elems,else,elseif,end,
+ eq,error,errs,exists,exists1,exit,ext,false,floor,for,for all,forall,from,functions,hd,if,in,in set,inds,init,inmap,instance,instance variables,int,inter,inv,inverse,iota,is,is not yet specified,is subclass of,is subclass responsibility,is\_,isofbaseclass,isofclass,lambda,len,let,map,measure,merge,mk\_,mod,mu,munion,mutex,narrow\_,
+ nat,nat1,new,nil,not,not in set,obj\_,of,operations,or,ord,others,per,periodic,post,power,pre,private,protected,psubset,public,pure,rat,rd,real,rem,
+ responsibility,return,reverse,rng,samebaseclass,sameclass,self,seq,seq1,set,set1,skip,specified,sporadic,st,start,
+ startlist,static,stop,stoplist,subclass,subset,sync,then,thread,threadid,tixe,tl,to,token,traces,trap,true,types,undefined,
+ union,values,variables,while,with,wr,yet
+ },
+ sensitive,
+ morecomment=[l]--,
+ morestring=[b]",
+ morestring=[b]',
+ }[keywords,comments,strings]
-\lstdefinelanguage{VDM_RT}
+
+\lstdefinelanguage{VDM_RT_10}
{morekeywords={\#act, \#active, \#fin, \#req, \#waiting,
RESULT, abs, all, always, and, async, atomic, be, be st, bool, by, card, cases,
char, class, comp, compose, conc, cycles, dcl, def, dinter, div, do, dom, dunion,
@@ -107,6 +133,20 @@ floor, for, for all, forall, from, functions, hd, if, in, in set, inds, inmap, i
morestring=[b]',
}[keywords,comments,strings]
+\lstdefinelanguage{VDM_RT}
+ {morekeywords={RESULT,\#act,\#active,\#else,\#endif,\#fin,\#ifdef,\#ifndef,\#req,\#waiting,abs,all,always,and,async,atomic,be,be st,bool,by,card,cases,char,class,comp,compose,conc,cycles,dcl,def,dinter,div,do,dom,dunion,duration,elems,
+ else,elseif,end,eq,error,errs,exists,exists1,exit,ext,false,floor,for,for all,forall,from,functions,hd,if,in,in set,inds,init,inmap,instance,instance variables,int,inter,inv,inverse,iota,is,is not yet specified,is subclass of,is subclass responsibility,is\_,isofbaseclass,isofclass,lambda,len,let,map,measure,merge,mk\_,mod,mu,munion,mutex,narrow\_,
+ nat,nat1,new,nil,not,not in set,obj\_,of,operations,or,ord,others,per,periodic,post,power,pre,private,protected,psubset,public,pure,rat,rd,real,
+ rem,responsibility,return,reverse,rng,samebaseclass,sameclass,self,seq,seq1,set,set1,skip,specified,sporadic,
+ st,start,startlist,static,stop,stoplist,subclass,subset,sync,system,then,thread,threadid,time,tixe,tl,to,token,traces,
+ trap,true,types,undefined,union,values,variables,while,with,wr,yet
+ },
+ sensitive,
+ morecomment=[l]--,
+ morestring=[b]",
+ morestring=[b]',
+ }[keywords,comments,strings]
+
%
% Define listing for the VDM language
@@ -142,12 +182,21 @@ floor, for, for all, forall, from, functions, hd, if, in, in set, inds, inmap, i
\lstnewenvironment{vdmsl}[1][]{\lstset{style=overtureLanguageStyle}\lstset{language=VDM_SL}\lstset{#1}}
{}
+\lstnewenvironment{vdmsl_10}[1][]{\lstset{style=overtureLanguageStyle}\lstset{language=VDM_SL_10}\lstset{#1}}
+{}
+
\lstnewenvironment{vdmpp}[1][]{\lstset{style=overtureLanguageStyle}\lstset{language=VDM_PP}\lstset{#1}}
{}
+\lstnewenvironment{vdmpp_10}[1][]{\lstset{style=overtureLanguageStyle}\lstset{language=VDM_PP_10}\lstset{#1}}
+{}
+
\lstnewenvironment{vdmrt}[1][]{\lstset{style=overtureLanguageStyle}\lstset{language=VDM_RT}\lstset{#1}}
{}
+\lstnewenvironment{vdmrt_10}[1][]{\lstset{style=overtureLanguageStyle}\lstset{language=VDM_RT_10}\lstset{#1}}
+{}
+
% Environment definition for test coverage use by VDM Tools
\lstnewenvironment{vdmrealtimeinfo}{}
{}
diff --git a/macros/latex/contrib/vdmlisting/vdmlisting.tex b/macros/latex/contrib/vdmlisting/vdmlisting.tex
index 673b61a6aa..057e083cdb 100644
--- a/macros/latex/contrib/vdmlisting/vdmlisting.tex
+++ b/macros/latex/contrib/vdmlisting/vdmlisting.tex
@@ -4,7 +4,7 @@
\usepackage{vdmlisting}
\usepackage{hyperref}
-\usepackage{vdm}
+%\usepackage{vdm}
\def\vdmlisting{\texttt{vdmlisting}}
\def\envvdmsl{\texttt{vdmsl}}
\def\envvdmpp{\texttt{vdmpp}}
@@ -15,9 +15,9 @@
Dept. of Engineering\\
Aarhus University\\
Denmark.\\
-\texttt{lausdahl@cs.au.dk}}
-\date{10 April 2013 \\
-Version 1.0}
+\texttt{kenneth@lausdahl.com}}
+\date{10 Novemberl 2020 \\
+Version 1.1}
@@ -112,10 +112,15 @@ This package defined three listing environments that can be used to typeset VDM.
\end{vdmrt}
+
\end{description}
Furthermore, the environments are configured with \texttt{escapeinside=\{(*@\}\{@*)\}} enabling the command \texttt{\textbackslash vdmnotcovered\{ VDM specification\}} to be used to mark execution coverage for the VDM specification displayed.
+\subsection{Previous versions}
+
+This package includes all environments from the previous version \texttt{1.0} of this package. All environments and language definitions can be post fixed with \texttt{\_10} to get the previous version.
+
\section{Package loading}
As usual in \LaTeX, the package is loaded by \texttt{\textbackslash usepackage[optionsi]\{vdmlisting\}},
where [optionsi] is optional and gives a comma separated list of options:
@@ -137,6 +142,6 @@ style files (your system administrator will know where this is).
\section{The License}
-The vdmlisting.sty and vdmlisting.tex file is copyright 2012--2013 Kenneth Lausdahl and is released under the LaTeX Project Public License 1.3 or later.
+The vdmlisting.sty and vdmlisting.tex file is copyright 2012--2020 Kenneth Lausdahl and is released under the LaTeX Project Public License 1.3 or later.
\end{document}