summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-10 03:01:27 +0000
committerNorbert Preining <norbert@preining.info>2020-10-10 03:01:27 +0000
commit03964f11f0331968e99fa5a3d614f25a7b3f8a95 (patch)
tree4facdecd5e8388a9955ace8724a1029eb1da98d7 /macros
parent1f42d0c83e745c8ee0454060ea03fbb886e77ce5 (diff)
CTAN sync 202010100301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/base/README.md2
-rw-r--r--macros/latex/base/alltt.pdfbin173079 -> 173079 bytes
-rw-r--r--macros/latex/base/cfgguide.pdfbin220217 -> 220217 bytes
-rw-r--r--macros/latex/base/changes.txt44
-rw-r--r--macros/latex/base/classes.pdfbin520851 -> 520851 bytes
-rw-r--r--macros/latex/base/clsguide.pdfbin372555 -> 372555 bytes
-rw-r--r--macros/latex/base/cmfonts.pdfbin264505 -> 264505 bytes
-rw-r--r--macros/latex/base/cyrguide.pdfbin216997 -> 216997 bytes
-rw-r--r--macros/latex/base/doc.pdfbin630882 -> 630928 bytes
-rw-r--r--macros/latex/base/docstrip.pdfbin479493 -> 479545 bytes
-rw-r--r--macros/latex/base/encguide.pdfbin1532144 -> 1532144 bytes
-rw-r--r--macros/latex/base/exscale.pdfbin195877 -> 195877 bytes
-rw-r--r--macros/latex/base/fix-cm.pdfbin262059 -> 262059 bytes
-rw-r--r--macros/latex/base/fntguide.pdfbin417861 -> 417861 bytes
-rw-r--r--macros/latex/base/graphpap.pdfbin156277 -> 156277 bytes
-rw-r--r--macros/latex/base/ifthen.pdfbin205213 -> 205213 bytes
-rw-r--r--macros/latex/base/inputenc.pdfbin294900 -> 294900 bytes
-rw-r--r--macros/latex/base/latexchanges.pdfbin232390 -> 232390 bytes
-rw-r--r--macros/latex/base/latexrelease.pdfbin246195 -> 246195 bytes
-rw-r--r--macros/latex/base/latexsym.pdfbin192297 -> 192297 bytes
-rw-r--r--macros/latex/base/lb2.pdfbin138219 -> 138219 bytes
-rw-r--r--macros/latex/base/letter.pdfbin305650 -> 305701 bytes
-rw-r--r--macros/latex/base/lgc2.pdfbin101343 -> 101343 bytes
-rw-r--r--macros/latex/base/lppl.pdfbin125830 -> 125830 bytes
-rw-r--r--macros/latex/base/ltclass.dtx30
-rw-r--r--macros/latex/base/ltfilehook-code.pdfbin735666 -> 735762 bytes
-rw-r--r--macros/latex/base/ltfilehook-doc.pdfbin516541 -> 516631 bytes
-rw-r--r--macros/latex/base/ltfiles.dtx6
-rw-r--r--macros/latex/base/ltfssini.dtx17
-rw-r--r--macros/latex/base/lthooks-code.pdfbin896384 -> 900409 bytes
-rw-r--r--macros/latex/base/lthooks-doc.pdfbin602781 -> 619426 bytes
-rw-r--r--macros/latex/base/lthooks.dtx93
-rw-r--r--macros/latex/base/ltluatex.pdfbin305339 -> 305339 bytes
-rw-r--r--macros/latex/base/ltnews.pdfbin989351 -> 989398 bytes
-rw-r--r--macros/latex/base/ltnews01.pdfbin150020 -> 150020 bytes
-rw-r--r--macros/latex/base/ltnews02.pdfbin134751 -> 134751 bytes
-rw-r--r--macros/latex/base/ltnews03.pdfbin134742 -> 134742 bytes
-rw-r--r--macros/latex/base/ltnews04.pdfbin128772 -> 128772 bytes
-rw-r--r--macros/latex/base/ltnews05.pdfbin157181 -> 157181 bytes
-rw-r--r--macros/latex/base/ltnews06.pdfbin133138 -> 133138 bytes
-rw-r--r--macros/latex/base/ltnews07.pdfbin124029 -> 124029 bytes
-rw-r--r--macros/latex/base/ltnews08.pdfbin144482 -> 144482 bytes
-rw-r--r--macros/latex/base/ltnews09.pdfbin120222 -> 120222 bytes
-rw-r--r--macros/latex/base/ltnews10.pdfbin147946 -> 147946 bytes
-rw-r--r--macros/latex/base/ltnews11.pdfbin104936 -> 104936 bytes
-rw-r--r--macros/latex/base/ltnews12.pdfbin137919 -> 137919 bytes
-rw-r--r--macros/latex/base/ltnews13.pdfbin161065 -> 161065 bytes
-rw-r--r--macros/latex/base/ltnews14.pdfbin150907 -> 150907 bytes
-rw-r--r--macros/latex/base/ltnews15.pdfbin122092 -> 122092 bytes
-rw-r--r--macros/latex/base/ltnews16.pdfbin130687 -> 130687 bytes
-rw-r--r--macros/latex/base/ltnews17.pdfbin149838 -> 149838 bytes
-rw-r--r--macros/latex/base/ltnews18.pdfbin36005 -> 36005 bytes
-rw-r--r--macros/latex/base/ltnews19.pdfbin235073 -> 235073 bytes
-rw-r--r--macros/latex/base/ltnews20.pdfbin283318 -> 283318 bytes
-rw-r--r--macros/latex/base/ltnews21.pdfbin233492 -> 233492 bytes
-rw-r--r--macros/latex/base/ltnews22.pdfbin302836 -> 302836 bytes
-rw-r--r--macros/latex/base/ltnews23.pdfbin274459 -> 274459 bytes
-rw-r--r--macros/latex/base/ltnews24.pdfbin252645 -> 252645 bytes
-rw-r--r--macros/latex/base/ltnews25.pdfbin196326 -> 196326 bytes
-rw-r--r--macros/latex/base/ltnews26.pdfbin362839 -> 362839 bytes
-rw-r--r--macros/latex/base/ltnews27.pdfbin239758 -> 239758 bytes
-rw-r--r--macros/latex/base/ltnews28.pdfbin368226 -> 368226 bytes
-rw-r--r--macros/latex/base/ltnews29.pdfbin433004 -> 433004 bytes
-rw-r--r--macros/latex/base/ltnews30.pdfbin491246 -> 491246 bytes
-rw-r--r--macros/latex/base/ltnews31.pdfbin500919 -> 500919 bytes
-rw-r--r--macros/latex/base/ltnews32.pdfbin521204 -> 520923 bytes
-rw-r--r--macros/latex/base/ltnews32.tex36
-rw-r--r--macros/latex/base/ltshipout-code.pdfbin749323 -> 749397 bytes
-rw-r--r--macros/latex/base/ltshipout-doc.pdfbin503825 -> 503916 bytes
-rw-r--r--macros/latex/base/ltvers.dtx2
-rw-r--r--macros/latex/base/ltx3info.pdfbin191527 -> 191527 bytes
-rw-r--r--macros/latex/base/ltxdoc.dtx9
-rw-r--r--macros/latex/base/ltxdoc.pdfbin215134 -> 215102 bytes
-rw-r--r--macros/latex/base/makeindx.pdfbin160667 -> 160667 bytes
-rw-r--r--macros/latex/base/manifest.txt1
-rw-r--r--macros/latex/base/manual.pdfbin151347 -> 151347 bytes
-rw-r--r--macros/latex/base/modguide.pdfbin220388 -> 220388 bytes
-rw-r--r--macros/latex/base/nfssfont.pdfbin202451 -> 202451 bytes
-rw-r--r--macros/latex/base/proc.pdfbin216877 -> 216877 bytes
-rw-r--r--macros/latex/base/slides.pdfbin351586 -> 351586 bytes
-rw-r--r--macros/latex/base/slifonts.pdfbin214710 -> 214710 bytes
-rw-r--r--macros/latex/base/source2e.pdfbin4342817 -> 4347415 bytes
-rw-r--r--macros/latex/base/syntonly.pdfbin181346 -> 181388 bytes
-rw-r--r--macros/latex/base/tlc2.pdfbin164947 -> 164947 bytes
-rw-r--r--macros/latex/base/tulm.pdfbin156546 -> 156546 bytes
-rw-r--r--macros/latex/base/usrguide.pdfbin399035 -> 399035 bytes
-rw-r--r--macros/latex/base/utf8ienc.pdfbin330675 -> 330675 bytes
-rw-r--r--macros/latex/base/webcomp.pdfbin136159 -> 136159 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb-doc.pdfbin154900 -> 154799 bytes
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb-doc.tex9
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.dtx40
-rw-r--r--macros/latex/contrib/babel-contrib/french/frenchb.pdfbin327379 -> 328108 bytes
-rw-r--r--macros/latex/contrib/jsclasses/README.md2
-rw-r--r--macros/latex/contrib/jsclasses/jsclasses.dtx6
-rw-r--r--macros/latex/contrib/jsclasses/jsclasses.pdfbin412093 -> 412399 bytes
-rw-r--r--macros/latex/contrib/kvoptions/README.md10
-rw-r--r--macros/latex/contrib/kvoptions/kvoptions.dtx308
-rw-r--r--macros/latex/contrib/kvoptions/kvoptions.pdfbin488653 -> 480927 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/CHANGES10
-rw-r--r--macros/latex/contrib/tcolorbox/README2
-rw-r--r--macros/latex/contrib/tcolorbox/tcbbreakable.code.tex45
-rw-r--r--macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbexternal.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbfitting.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbhooks.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcblistings.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcblistingscore.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbmagazine.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbminted.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbposter.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbprocessing.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbraster.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbskins.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbtheorems.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbvignette.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcbxparse.code.tex4
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdfbin273842 -> 273812 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example.pdfbin457487 -> 457359 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-example.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdfbin442492 -> 442139 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex2
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex76
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.pdfbin7184574 -> 7174046 bytes
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.sty54
-rw-r--r--macros/latex/contrib/tcolorbox/tcolorbox.tex8
-rw-r--r--macros/latex/contrib/xmuthesis/LICENSE416
-rw-r--r--macros/latex/contrib/xmuthesis/README.md45
-rw-r--r--macros/latex/contrib/xmuthesis/xmuthesis.dtx4722
-rw-r--r--macros/latex/contrib/xmuthesis/xmuthesis.pdfbin0 -> 426423 bytes
-rw-r--r--macros/latex/contrib/zref/README.md11
-rw-r--r--macros/latex/contrib/zref/zref.dtx75
-rw-r--r--macros/latex/contrib/zref/zref.pdfbin673694 -> 674089 bytes
-rw-r--r--macros/latex/required/firstaid/changes.txt5
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx54
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdfbin225073 -> 208937 bytes
-rw-r--r--macros/unicodetex/latex/polyglossia/README.md9
-rw-r--r--macros/unicodetex/latex/polyglossia/polyglossia.dtx6507
-rw-r--r--macros/unicodetex/latex/polyglossia/polyglossia.pdfbin269164 -> 279264 bytes
141 files changed, 11777 insertions, 951 deletions
diff --git a/macros/latex/base/README.md b/macros/latex/base/README.md
index 36decd0156..f10a94deee 100644
--- a/macros/latex/base/README.md
+++ b/macros/latex/base/README.md
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2020-10-01
+Release 2020-10-01 patch level 1
Overview
--------
diff --git a/macros/latex/base/alltt.pdf b/macros/latex/base/alltt.pdf
index 0b9fe6d7db..3e1905c11e 100644
--- a/macros/latex/base/alltt.pdf
+++ b/macros/latex/base/alltt.pdf
Binary files differ
diff --git a/macros/latex/base/cfgguide.pdf b/macros/latex/base/cfgguide.pdf
index 5a47682b94..570ac543f2 100644
--- a/macros/latex/base/cfgguide.pdf
+++ b/macros/latex/base/cfgguide.pdf
Binary files differ
diff --git a/macros/latex/base/changes.txt b/macros/latex/base/changes.txt
index 00407db4bb..36a22af10e 100644
--- a/macros/latex/base/changes.txt
+++ b/macros/latex/base/changes.txt
@@ -6,6 +6,45 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+================================================================================
+All changes above are only part of the development branch for the next release.
+================================================================================
+
+#########################
+# 2020-10-01 PL 1 Release
+#########################
+
+2020-10-08 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltclass.dtx:
+ Fix loading expl3-based package after rollback to 2020-02-02 (gh/406).
+
+2020-10-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx: removed redundant code and fixed a misspelling
+ in a csname - no functional change (gh/405)
+
+2020-10-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltxdoc.dtx (section{DocInclude}):
+ Quotes around the aux file name removed,
+ they are not needed and upset BibTeX (gh/400)
+
+2020-10-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfiles.dtx (section{File Handling}):
+ Quotes around the aux file name removed,
+ they are not needed and upset BibTeX (gh/400)
+
+2020-10-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lthooks.dtx (subsection{Internal commands needed elsewhere}):
+ Definition \AddToHookNext was supposed to be for \AddToHook (gh/401)
+
+#########################
+# 2020-10-01 Release
+#########################
+
2020-10-01 Joseph Wright <Joseph.Wright@latex-project.org>
* ltclass.dtx:
@@ -419,11 +458,6 @@ are not part of the distribution.
XeTeX-specific definition for \symbol to avoid bug in maths mode (gh/124)
-================================================================================
-All changes above are only part of the development branch for the next release.
-================================================================================
-
-
#########################
# 2020-02-02 PL 5 Release
#########################
diff --git a/macros/latex/base/classes.pdf b/macros/latex/base/classes.pdf
index dc3eb1a664..4cc983e297 100644
--- a/macros/latex/base/classes.pdf
+++ b/macros/latex/base/classes.pdf
Binary files differ
diff --git a/macros/latex/base/clsguide.pdf b/macros/latex/base/clsguide.pdf
index 8f9cf9477b..49b8cc76a4 100644
--- a/macros/latex/base/clsguide.pdf
+++ b/macros/latex/base/clsguide.pdf
Binary files differ
diff --git a/macros/latex/base/cmfonts.pdf b/macros/latex/base/cmfonts.pdf
index 62ca1c1041..ff673d73bd 100644
--- a/macros/latex/base/cmfonts.pdf
+++ b/macros/latex/base/cmfonts.pdf
Binary files differ
diff --git a/macros/latex/base/cyrguide.pdf b/macros/latex/base/cyrguide.pdf
index a7e2562d98..ee3a39c730 100644
--- a/macros/latex/base/cyrguide.pdf
+++ b/macros/latex/base/cyrguide.pdf
Binary files differ
diff --git a/macros/latex/base/doc.pdf b/macros/latex/base/doc.pdf
index d911f9e920..dc66e7df02 100644
--- a/macros/latex/base/doc.pdf
+++ b/macros/latex/base/doc.pdf
Binary files differ
diff --git a/macros/latex/base/docstrip.pdf b/macros/latex/base/docstrip.pdf
index 84684a2c6b..766592f1f9 100644
--- a/macros/latex/base/docstrip.pdf
+++ b/macros/latex/base/docstrip.pdf
Binary files differ
diff --git a/macros/latex/base/encguide.pdf b/macros/latex/base/encguide.pdf
index 5c5526b11d..6ca1541239 100644
--- a/macros/latex/base/encguide.pdf
+++ b/macros/latex/base/encguide.pdf
Binary files differ
diff --git a/macros/latex/base/exscale.pdf b/macros/latex/base/exscale.pdf
index ad34bdf912..69727ba012 100644
--- a/macros/latex/base/exscale.pdf
+++ b/macros/latex/base/exscale.pdf
Binary files differ
diff --git a/macros/latex/base/fix-cm.pdf b/macros/latex/base/fix-cm.pdf
index 7249ef595d..bc778e9a23 100644
--- a/macros/latex/base/fix-cm.pdf
+++ b/macros/latex/base/fix-cm.pdf
Binary files differ
diff --git a/macros/latex/base/fntguide.pdf b/macros/latex/base/fntguide.pdf
index 5d8ec2d612..c89713ed12 100644
--- a/macros/latex/base/fntguide.pdf
+++ b/macros/latex/base/fntguide.pdf
Binary files differ
diff --git a/macros/latex/base/graphpap.pdf b/macros/latex/base/graphpap.pdf
index 79f77e32cb..e417f74dde 100644
--- a/macros/latex/base/graphpap.pdf
+++ b/macros/latex/base/graphpap.pdf
Binary files differ
diff --git a/macros/latex/base/ifthen.pdf b/macros/latex/base/ifthen.pdf
index 8b15d8eb47..a6be5d449d 100644
--- a/macros/latex/base/ifthen.pdf
+++ b/macros/latex/base/ifthen.pdf
Binary files differ
diff --git a/macros/latex/base/inputenc.pdf b/macros/latex/base/inputenc.pdf
index 16246b70fd..76ed961588 100644
--- a/macros/latex/base/inputenc.pdf
+++ b/macros/latex/base/inputenc.pdf
Binary files differ
diff --git a/macros/latex/base/latexchanges.pdf b/macros/latex/base/latexchanges.pdf
index 27269b2541..d5c1ff3e85 100644
--- a/macros/latex/base/latexchanges.pdf
+++ b/macros/latex/base/latexchanges.pdf
Binary files differ
diff --git a/macros/latex/base/latexrelease.pdf b/macros/latex/base/latexrelease.pdf
index 26e1feff1f..5b8221881f 100644
--- a/macros/latex/base/latexrelease.pdf
+++ b/macros/latex/base/latexrelease.pdf
Binary files differ
diff --git a/macros/latex/base/latexsym.pdf b/macros/latex/base/latexsym.pdf
index b273c4d148..82bad4ba5c 100644
--- a/macros/latex/base/latexsym.pdf
+++ b/macros/latex/base/latexsym.pdf
Binary files differ
diff --git a/macros/latex/base/lb2.pdf b/macros/latex/base/lb2.pdf
index 98f058af57..a5f2bd43f0 100644
--- a/macros/latex/base/lb2.pdf
+++ b/macros/latex/base/lb2.pdf
Binary files differ
diff --git a/macros/latex/base/letter.pdf b/macros/latex/base/letter.pdf
index a142d55a1f..ae5549b6d5 100644
--- a/macros/latex/base/letter.pdf
+++ b/macros/latex/base/letter.pdf
Binary files differ
diff --git a/macros/latex/base/lgc2.pdf b/macros/latex/base/lgc2.pdf
index 17aa4f909c..5cb60acbbd 100644
--- a/macros/latex/base/lgc2.pdf
+++ b/macros/latex/base/lgc2.pdf
Binary files differ
diff --git a/macros/latex/base/lppl.pdf b/macros/latex/base/lppl.pdf
index 2bf460dc7d..5c60effa01 100644
--- a/macros/latex/base/lppl.pdf
+++ b/macros/latex/base/lppl.pdf
Binary files differ
diff --git a/macros/latex/base/ltclass.dtx b/macros/latex/base/ltclass.dtx
index bc6500541e..e771044e66 100644
--- a/macros/latex/base/ltclass.dtx
+++ b/macros/latex/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2020/10/01 v1.3r LaTeX Kernel (Class & Package Interface)]
+ [2020/10/08 v1.3s LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -561,6 +561,7 @@
% |#4| Rest of the stack.
% \changes{v1.3l}{2020/06/05}{Added \cs{@expl@push@filename@@}
% and \cs{@expl@push@filename@aux@@}}
+% \changes{v1.3s}{2020/10/08}{Added missing 2020/02/02 \cs{IncludeInRelease}}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
@@ -586,6 +587,27 @@
\@currnamestack}%
\@expl@push@filename@aux@@}
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% The following version of \cs{@pushfilename} didn't formally exist in
+% this file, but in the 2020/02/02 release, \pkg{expl3} was preloaded
+% and it patched \cs{@pushfilename} (and \cs{@popfilename}) by adding
+% some hooks in there. But rolling back to 2020/02/02, \pkg{expl3}
+% doesn't patch these macros again, so rolling back has to take those
+% hooks into account. Same goes for \cs{@popfilename}.
+% \begin{macrocode}
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/02}{\@pushfilename}%
+%<latexrelease> {Add \@expl@push@filename@@}%
+%<latexrelease>\def\@pushfilename{%
+%<latexrelease> \@expl@push@filename@@
+%<latexrelease> \xdef\@currnamestack{%
+%<latexrelease> {\@currname}%
+%<latexrelease> {\@currext}%
+%<latexrelease> {\the\catcode`\@}%
+%<latexrelease> \@currnamestack}%
+%<latexrelease> \@expl@push@filename@aux@@}
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}{\@pushfilename}%
%<latexrelease> {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
@@ -613,6 +635,12 @@
\@expl@pop@filename@@}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/02}{\@popfilename}%
+%<latexrelease> {Add \@expl@push@filename@@}%
+%<latexrelease>\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil
+%<latexrelease> \@expl@pop@filename@@}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}{\@popfilename}%
%<latexrelease> {Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
%<latexrelease>\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil}
diff --git a/macros/latex/base/ltfilehook-code.pdf b/macros/latex/base/ltfilehook-code.pdf
index 7b2ab3e4aa..695028ba23 100644
--- a/macros/latex/base/ltfilehook-code.pdf
+++ b/macros/latex/base/ltfilehook-code.pdf
Binary files differ
diff --git a/macros/latex/base/ltfilehook-doc.pdf b/macros/latex/base/ltfilehook-doc.pdf
index c8fa06d91d..cd3cf7d46e 100644
--- a/macros/latex/base/ltfilehook-doc.pdf
+++ b/macros/latex/base/ltfilehook-doc.pdf
Binary files differ
diff --git a/macros/latex/base/ltfiles.dtx b/macros/latex/base/ltfiles.dtx
index 835f600e32..99be77c844 100644
--- a/macros/latex/base/ltfiles.dtx
+++ b/macros/latex/base/ltfiles.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2020/08/21 v1.2i LaTeX Kernel (File Handling)]
+ [2020/10/04 v1.2j LaTeX Kernel (File Handling)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfiles.dtx}
@@ -824,11 +824,13 @@
%<latexrelease> {\@include}{Spaces in file names and hooks}%
% \end{macrocode}
%
+% \changes{v1.2j}{2020/10/04}{Quotes around the aux file name removed,
+% they are not needed and upset BibTeX (gh/400)}
% \begin{macrocode}
\def\@include#1 {%
\clearpage
\if@filesw
- \immediate\write\@mainaux{\string\@input{"#1.aux"}}%
+ \immediate\write\@mainaux{\string\@input{#1.aux}}%
\fi
\@tempswatrue
\if@partsw
diff --git a/macros/latex/base/ltfssini.dtx b/macros/latex/base/ltfssini.dtx
index 10f3dc5863..fbea725c1d 100644
--- a/macros/latex/base/ltfssini.dtx
+++ b/macros/latex/base/ltfssini.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssini.dtx}
- [2020/09/30 v3.2d LaTeX Kernel (NFSS Initialisation)]
+ [2020/10/08 v3.2e LaTeX Kernel (NFSS Initialisation)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -1070,17 +1070,23 @@
% \begin{macro}{\@rmfamilyhook}
% \begin{macro}{\@sffamilyhook}
% \begin{macro}{\@ttfamilyhook}
+% \begin{macro}{\@defaultfamilyhook}
+% \changes{v3.1h}{2020/02/10}{Add \cs{@defaultfamilyhook} to \cs{normalfont} (gh/269)}
% These four hooks have legacy versions used in 2020/02/02 so we
% should support them until they aren't any longer used.
+%
+% By default the hooks do nothing.
% \begin{macrocode}
\let\@rmfamilyhook\@empty
\let\@sffamilyhook\@empty
\let\@ttfamilyhook\@empty
-\let\@defaulfamilyhook\@empty
+\let\@defaultfamilyhook\@empty %FMi sort out
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+%
%
% \begin{macrocode}
%</2ekernel|latexrelease>
@@ -1787,13 +1793,6 @@
% \end{macro}
%
%
-% \begin{macro}{\@defaultfamilyhook}
-% By default the hooks do nothing.
-% \changes{v3.1h}{2020/02/10}{Add \cs{@defaultfamilyhook} to \cs{normalfont} (gh/269)}
-% \begin{macrocode}
-\let\@defaultfamilyhook\@empty %FMi sort out
-% \end{macrocode}
-% \end{macro}
%
% \begin{macrocode}
%</2ekernel|latexrelease>
diff --git a/macros/latex/base/lthooks-code.pdf b/macros/latex/base/lthooks-code.pdf
index e93647bf1b..b0b5f66939 100644
--- a/macros/latex/base/lthooks-code.pdf
+++ b/macros/latex/base/lthooks-code.pdf
Binary files differ
diff --git a/macros/latex/base/lthooks-doc.pdf b/macros/latex/base/lthooks-doc.pdf
index c3be9771c9..b547c414a1 100644
--- a/macros/latex/base/lthooks-doc.pdf
+++ b/macros/latex/base/lthooks-doc.pdf
Binary files differ
diff --git a/macros/latex/base/lthooks.dtx b/macros/latex/base/lthooks.dtx
index cb48570a0d..a5953cc25d 100644
--- a/macros/latex/base/lthooks.dtx
+++ b/macros/latex/base/lthooks.dtx
@@ -31,8 +31,8 @@
%%% From File: lthooks.dtx
%
% \begin{macrocode}
-\def\lthooksversion{v1.0b}
-\def\lthooksdate{2020/09/21}
+\def\lthooksversion{v1.0d}
+\def\lthooksdate{2020/10/09}
% \end{macrocode}
%
%<*driver>
@@ -256,6 +256,11 @@
% is used in a package/class, then the current
% package/class name is used, otherwise \hook{top-level} is used.
%
+% If the code for that \meta{label} wasn't yet added to the
+% \meta{hook}, an order is set so that when some code attempts to add
+% that label, the removal order takes action and the code is not
+% added.
+%
% If the optional argument is \texttt{*}, then all code chunks are
% removed. This is rather dangerous as it drops code from other
% packages one may not know about!
@@ -648,10 +653,72 @@
%
% \cs{LogHook} prints the information to the |.log| file, and
% \cs{ShowHook} prints them to the terminal/command window and starts
-% \TeX's prompt (only if \cs{errorstopmode}) to wait for user action.
+% \TeX's prompt (only in \cs{errorstopmode}) to wait for user action.
%
% The \meta{hook} can be specified using the dot-syntax to denote
% the current package name. See section~\ref{sec:default-label}.
+%
+%^^A % Code for the listing below:
+%^^A \NewHook{example-hook}
+%^^A \AddToHook{example-hook}[foo]{[code from package 'foo']}
+%^^A \AddToHook{example-hook}[bar]{[from package 'bar']}
+%^^A \AddToHook{example-hook}[baz]{[package 'baz' is here]}
+%^^A \AddToHookNext{example-hook}{[one-time code]}
+%^^A \DeclareHookRule{example-hook}{baz}{before}{foo}
+%^^A \DeclareDefaultHookRule{bar}{after}{baz}
+%^^A \ShowHook{example-hook}
+%
+% \def\theFancyVerbLine{\textcolor[gray]{0.5}{%^^A
+% \sffamily\tiny\arabic{FancyVerbLine}}}
+%
+% \bigskip
+% Suppose a hook \texttt{example-hook} whose output of
+% \cs{ShowHook}|{example-hook}| is:
+% \begin{verbatim}[numbers=left]
+% -> The hook 'example-hook':
+% > Code chunks:
+% > foo -> [code from package 'foo']
+% > bar -> [from package 'bar']
+% > baz -> [package 'baz' is here]
+% > Extra code for next invocation:
+% > -> [one-time code]
+% > Rules:
+% > foo|baz with relation >
+% > baz|bar with default relation <
+% > Execution order (after applying rules):
+% > bar, baz, foo.
+% \end{verbatim}
+%
+% In the listing above, lines~3 to~5 show the three code chunks added
+% to the hook and their respective labels in the format
+% \begin{quote}
+% \quad \meta{label}\verb| -> |\meta{code}
+% \end{quote}
+%
+% Line~7 shows the code chunk for the next execution of the hook in
+% the format
+% \begin{quote}
+% \quad \verb|-> |\meta{next-code}
+% \end{quote}
+% This code will be used and disappear at the next
+% \verb|\UseHook{example-hook}|, in contrast to the chunks mentioned
+% earlier, which can only be removed from that hook by doing
+% \verb|\RemoveFromHook{|\meta{label}|}[example-hook]|.
+%
+% Lines~9 and~10 show the rules declared that affect this hook in the
+% format
+% \begin{quote}
+% \quad \meta{label-1}\verb+|+\meta{label-2}| with |%^^A
+% \meta{\texttt{default}?}| relation |\meta{relation}
+% \end{quote}
+% which means that the \meta{relation} applies to \meta{label-1} and
+% \meta{label-2}, in that order, as detailed in \cs{DeclareHookRule}.
+% If the relation is \texttt{default} it means that that rule applies
+% to \meta{label-1} and \meta{label-2} in \emph{all} hooks, (unless
+% overrided by a non-default relation).
+%
+% Finally, line~12 lists the labels in the hook after sorting;
+% that is, in the order they will be executed when the hook is used.
% \end{function}
%
%
@@ -3964,19 +4031,21 @@
% may be used in packages without rollback functionality. So we
% just make them do nothing which may or may not work depending on
% the code usage.
+% \changes{v1.0d}{2020/10/04}{Definition \cs{AddToHookNext} was supposed
+% to be for \cs{AddToHook} vize versa (gh/401)}
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\NewHook}{The hook management}%
%<latexrelease>
-%<latexrelease>\def \NewHook#1{}
-%<latexrelease>\def \NewReversedHook#1{}
-%<latexrelease>\def \NewMirroredHookPair#1#2{}
+%<latexrelease>\def\NewHook#1{}
+%<latexrelease>\def\NewReversedHook#1{}
+%<latexrelease>\def\NewMirroredHookPair#1#2{}
%<latexrelease>
-%<latexrelease>\long\def \AddToHook#1#2{}
+%<latexrelease>\long\def\AddToHookNext#1#2{}
%<latexrelease>
-%<latexrelease>\def \AddToHookNext#1{\@gobble@AddToHook@args}
+%<latexrelease>\def\AddToHook#1{\@gobble@AddToHook@args}
%<latexrelease>\providecommand\@gobble@AddToHook@args[2][]{}
%<latexrelease>
%<latexrelease>\def\RemoveFromHook#1{\@gobble@RemoveFromHook@arg}
@@ -3988,17 +4057,17 @@
%<latexrelease>\let \DebugHooksOn \@empty
%<latexrelease>\let \DebugHooksOff\@empty
%<latexrelease>
-%<latexrelease>\def \DeclareHookRul#1#2#3#4{}
+%<latexrelease>\def \DeclareHookRule #1#2#3#4{}
%<latexrelease>\def \DeclareDefaultHookRule #1#2#3{}
-%<latexrelease>\def \ClearHookRule#1#2#3{}
+%<latexrelease>\def \ClearHookRule #1#2#3{}
% \end{macrocode}
% If the hook management is not provided we make the test for existence
% false and the test for empty true in the hope that this is most
% of the time reasonable. If not a package would need to guard
% against running in an old kernel.
% \begin{macrocode}
-%<latexrelease>\def \IfHookExistTF #1#2#3{#3}
-%<latexrelease>\def \IfHookEmptyTF #1#2#3{#2}
+%<latexrelease>\long\def \IfHookExistsTF #1#2#3{#3}
+%<latexrelease>\long\def \IfHookEmptyTF #1#2#3{#2}
%<latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
diff --git a/macros/latex/base/ltluatex.pdf b/macros/latex/base/ltluatex.pdf
index c7d795cbc7..57762988e5 100644
--- a/macros/latex/base/ltluatex.pdf
+++ b/macros/latex/base/ltluatex.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews.pdf b/macros/latex/base/ltnews.pdf
index 06048f8c70..23c0dd26c1 100644
--- a/macros/latex/base/ltnews.pdf
+++ b/macros/latex/base/ltnews.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews01.pdf b/macros/latex/base/ltnews01.pdf
index dc2f7ea8df..bfbea06e7f 100644
--- a/macros/latex/base/ltnews01.pdf
+++ b/macros/latex/base/ltnews01.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews02.pdf b/macros/latex/base/ltnews02.pdf
index ebcd2d2354..cf688058cb 100644
--- a/macros/latex/base/ltnews02.pdf
+++ b/macros/latex/base/ltnews02.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews03.pdf b/macros/latex/base/ltnews03.pdf
index 289cbe4d2b..bc23990d0b 100644
--- a/macros/latex/base/ltnews03.pdf
+++ b/macros/latex/base/ltnews03.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews04.pdf b/macros/latex/base/ltnews04.pdf
index f7baebfb3b..e15bb561d1 100644
--- a/macros/latex/base/ltnews04.pdf
+++ b/macros/latex/base/ltnews04.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews05.pdf b/macros/latex/base/ltnews05.pdf
index ee5c4d9266..e9341e9aca 100644
--- a/macros/latex/base/ltnews05.pdf
+++ b/macros/latex/base/ltnews05.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews06.pdf b/macros/latex/base/ltnews06.pdf
index 319a1d8e43..baa3c67c49 100644
--- a/macros/latex/base/ltnews06.pdf
+++ b/macros/latex/base/ltnews06.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews07.pdf b/macros/latex/base/ltnews07.pdf
index 5f222309f3..758f0d9331 100644
--- a/macros/latex/base/ltnews07.pdf
+++ b/macros/latex/base/ltnews07.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews08.pdf b/macros/latex/base/ltnews08.pdf
index 7f716710f2..e3b73cf681 100644
--- a/macros/latex/base/ltnews08.pdf
+++ b/macros/latex/base/ltnews08.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews09.pdf b/macros/latex/base/ltnews09.pdf
index dbd989c4c5..b4356f35b8 100644
--- a/macros/latex/base/ltnews09.pdf
+++ b/macros/latex/base/ltnews09.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews10.pdf b/macros/latex/base/ltnews10.pdf
index c0f06cc42a..2de518f198 100644
--- a/macros/latex/base/ltnews10.pdf
+++ b/macros/latex/base/ltnews10.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews11.pdf b/macros/latex/base/ltnews11.pdf
index 9ee38fb373..c374a53349 100644
--- a/macros/latex/base/ltnews11.pdf
+++ b/macros/latex/base/ltnews11.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews12.pdf b/macros/latex/base/ltnews12.pdf
index 4650093733..386d78e184 100644
--- a/macros/latex/base/ltnews12.pdf
+++ b/macros/latex/base/ltnews12.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews13.pdf b/macros/latex/base/ltnews13.pdf
index 675df98f90..8385a22c65 100644
--- a/macros/latex/base/ltnews13.pdf
+++ b/macros/latex/base/ltnews13.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews14.pdf b/macros/latex/base/ltnews14.pdf
index 2ff8832b42..569ded2002 100644
--- a/macros/latex/base/ltnews14.pdf
+++ b/macros/latex/base/ltnews14.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews15.pdf b/macros/latex/base/ltnews15.pdf
index d600f64199..583e931323 100644
--- a/macros/latex/base/ltnews15.pdf
+++ b/macros/latex/base/ltnews15.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews16.pdf b/macros/latex/base/ltnews16.pdf
index 5ecdfca848..60005231b7 100644
--- a/macros/latex/base/ltnews16.pdf
+++ b/macros/latex/base/ltnews16.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews17.pdf b/macros/latex/base/ltnews17.pdf
index 025dc9e090..b59c29cd94 100644
--- a/macros/latex/base/ltnews17.pdf
+++ b/macros/latex/base/ltnews17.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews18.pdf b/macros/latex/base/ltnews18.pdf
index 85b69c2db3..ca3a515a2a 100644
--- a/macros/latex/base/ltnews18.pdf
+++ b/macros/latex/base/ltnews18.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews19.pdf b/macros/latex/base/ltnews19.pdf
index 0dd540fc4a..3f099b4a9e 100644
--- a/macros/latex/base/ltnews19.pdf
+++ b/macros/latex/base/ltnews19.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews20.pdf b/macros/latex/base/ltnews20.pdf
index 2b64a285cb..419a89a8b7 100644
--- a/macros/latex/base/ltnews20.pdf
+++ b/macros/latex/base/ltnews20.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews21.pdf b/macros/latex/base/ltnews21.pdf
index 00e4604478..3e2441d77d 100644
--- a/macros/latex/base/ltnews21.pdf
+++ b/macros/latex/base/ltnews21.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews22.pdf b/macros/latex/base/ltnews22.pdf
index 616b4526ce..5d38155d83 100644
--- a/macros/latex/base/ltnews22.pdf
+++ b/macros/latex/base/ltnews22.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews23.pdf b/macros/latex/base/ltnews23.pdf
index fa5042a08b..aa38c11c14 100644
--- a/macros/latex/base/ltnews23.pdf
+++ b/macros/latex/base/ltnews23.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews24.pdf b/macros/latex/base/ltnews24.pdf
index dd92d6173b..91a8d86ba6 100644
--- a/macros/latex/base/ltnews24.pdf
+++ b/macros/latex/base/ltnews24.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews25.pdf b/macros/latex/base/ltnews25.pdf
index c5e573d4ce..add99bcdf0 100644
--- a/macros/latex/base/ltnews25.pdf
+++ b/macros/latex/base/ltnews25.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews26.pdf b/macros/latex/base/ltnews26.pdf
index eea1677407..de17bfda82 100644
--- a/macros/latex/base/ltnews26.pdf
+++ b/macros/latex/base/ltnews26.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews27.pdf b/macros/latex/base/ltnews27.pdf
index c26de3e974..72c1d5587d 100644
--- a/macros/latex/base/ltnews27.pdf
+++ b/macros/latex/base/ltnews27.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews28.pdf b/macros/latex/base/ltnews28.pdf
index 7dfdd43ccd..3575e10cd4 100644
--- a/macros/latex/base/ltnews28.pdf
+++ b/macros/latex/base/ltnews28.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews29.pdf b/macros/latex/base/ltnews29.pdf
index fe4ec53989..bcff75a9d6 100644
--- a/macros/latex/base/ltnews29.pdf
+++ b/macros/latex/base/ltnews29.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews30.pdf b/macros/latex/base/ltnews30.pdf
index ae005b2ab5..8e96ec9962 100644
--- a/macros/latex/base/ltnews30.pdf
+++ b/macros/latex/base/ltnews30.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews31.pdf b/macros/latex/base/ltnews31.pdf
index 0b99ad35cd..efebbb5b94 100644
--- a/macros/latex/base/ltnews31.pdf
+++ b/macros/latex/base/ltnews31.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews32.pdf b/macros/latex/base/ltnews32.pdf
index a61dffb1ef..7e18de6fe5 100644
--- a/macros/latex/base/ltnews32.pdf
+++ b/macros/latex/base/ltnews32.pdf
Binary files differ
diff --git a/macros/latex/base/ltnews32.tex b/macros/latex/base/ltnews32.tex
index f26449af6b..85283a86a9 100644
--- a/macros/latex/base/ltnews32.tex
+++ b/macros/latex/base/ltnews32.tex
@@ -241,7 +241,7 @@ soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
\cs{-}. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
differently though: They either ignored U+00AD or interpreted it as an
unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
-always treats \texttt{U+00AD} as \cs{-}.
+always treats U+00AD as \cs{-}.
%
\githubissue{323}
@@ -308,8 +308,6 @@ by setting \cs{finalhyphendemerits} to zero in unjustified settings.
%
\githubissue{274}
-\def\negskip{\tubcommand{\vspace*{-.2pt}}}
-\negskip
\subsection{Set a non-zero \cs{baselineskip} in text scripts}
As \cs{textsuperscript} and \cs{textsubscript} usually contain only a
@@ -320,7 +318,6 @@ been adjusted.
%
\githubissue{249}
-\negskip
\subsection{Spacing issues when using \cs{linethickness}}
In some circumstances the use of \cs{linethickness} introduced a
@@ -330,7 +327,6 @@ to the right. This has been corrected.
\githubissue{274}
-\negskip
\subsection{Better support for the legacy series default interface}
In the initial implementation of \LaTeX's font selection scheme (NFSS)
@@ -342,10 +338,9 @@ now through \cs{DeclareFontSeriesDefault}~\cite{32:ltnews31}. In this
release we improved the support for legacy documents using the old
method to cover additional edge cases.
%
-\githubissue[s]{306,315}
+\githubissue[s]{306 and 315}
-\negskip
\subsection{Support for uncommon font series defaults}
If a font family was set up with fairly unusual font series defaults,
@@ -363,6 +358,8 @@ been corrected.
%
\githubissue{291}
+\tubcommand{\vspace*{-6pt}\break}
+
\subsection{Checking the current font series context}
Sometimes it is necessary to define commands that act differently when
@@ -605,13 +602,11 @@ now allowed.
\subsection{Spacing commands moved from \pkg{amsmath} to the kernel}
Originally \LaTeX{} only provided a small set of spacing commands
-for use in text and math, some of the commands like \cs{;} were
+for use in text and math; some of the commands like \cs{;} were
only supported in math mode. \texttt{amsmath} normalized and
provided all of them in text and math. This code has now been
moved to the kernel so that it is generally available.
-%
-\githubissue{303}
-
+\begin{center}
\begin{tabular}{lll}
command name(s) & math & text\\\hline
\cs{,} \cs{thinspace} & $x\,x$ & x\,x\\
@@ -621,7 +616,9 @@ command name(s) & math & text\\\hline
\cs{;} \cs{thickspace} & $x\;x$ & x\;x\\
\cs{negthickspace} & $x\negthickspace x$ & x\negthickspace x\\
\end{tabular}
-
+\end{center}
+%
+\githubissue{303}
\subsection{Access raw glyphs in \LuaTeX\ without reloading fonts}
@@ -645,7 +642,8 @@ command with three arguments to the \texttt{.toc} and similar files.
\pkg{hyperref} redefines \cs{addcontentsline} to write
a fourth argument. The change unifies the number of arguments
by writing an additional empty brace group.
-
+%
+\githubissue{370}
\subsection{Lua\TeX\ callback \texttt{new\_graf} made \texttt{exclusive}}
@@ -795,15 +793,15 @@ processed as part of the formula.
%
\githubissue{5}
-\tubcommand\newpage
\subsection{Detect Unicode engines when setting \cs{std@minus} and \cs{std@equal}}
\pkg{amsmath} now detects the Unicode engines and uses their extended
-commands to define \cs{std@minus} and \cs{std@equal}. This avoids a
-package like \pkg{unicode-math} having to patch the code in the begin
-document hook to change the commands.
+commands to define \cs{std@minus} and
+\tubcommand{\parfillskip=0pt\par\newpage\noindent}%
+\cs{std@equal}. This avoids a package like
+\pkg{unicode-math} having to patch the code in the begin document hook to change the commands.
-\subsection{Use lua\TeX{} primitives}
+\subsection{Use Lua\TeX{} primitives where applicable}
For a number of years \pkg{lualatex-math} patched \cs{frac},
\cs{genfrac} and the \texttt{subarray} environment to make use of new
@@ -842,7 +840,7 @@ serve as a source for other packages.
For further details take a look at the \pkg{babel} package
documentation~\cite{32:babel}.
-
+\medskip
\begin{thebibliography}{9}
\fontsize{9.3}{11.3}\selectfont
diff --git a/macros/latex/base/ltshipout-code.pdf b/macros/latex/base/ltshipout-code.pdf
index a0de61ff55..2798161f94 100644
--- a/macros/latex/base/ltshipout-code.pdf
+++ b/macros/latex/base/ltshipout-code.pdf
Binary files differ
diff --git a/macros/latex/base/ltshipout-doc.pdf b/macros/latex/base/ltshipout-doc.pdf
index 0e1295f1fe..36bf7eaddc 100644
--- a/macros/latex/base/ltshipout-doc.pdf
+++ b/macros/latex/base/ltshipout-doc.pdf
Binary files differ
diff --git a/macros/latex/base/ltvers.dtx b/macros/latex/base/ltvers.dtx
index 2813670115..fcd722b0e8 100644
--- a/macros/latex/base/ltvers.dtx
+++ b/macros/latex/base/ltvers.dtx
@@ -115,7 +115,7 @@
{2020-10-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{0}
+\def\patch@level{1}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
diff --git a/macros/latex/base/ltx3info.pdf b/macros/latex/base/ltx3info.pdf
index c752adf37e..df2407717f 100644
--- a/macros/latex/base/ltx3info.pdf
+++ b/macros/latex/base/ltx3info.pdf
Binary files differ
diff --git a/macros/latex/base/ltxdoc.dtx b/macros/latex/base/ltxdoc.dtx
index 696af32ab1..0c7130c371 100644
--- a/macros/latex/base/ltxdoc.dtx
+++ b/macros/latex/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2020/08/21 v2.1a Standard LaTeX documentation class]
+%<class> [2020/10/04 v2.1b Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -443,7 +443,12 @@
\expandafter\@docinclude\expandafter{\@curr@file}
\fi}
\def\@docinclude#1 {\clearpage
-\if@filesw \immediate\write\@mainaux{\string\@input{"#1.aux"}}\fi
+% \end{macrocode}
+%
+% \changes{v2.1bj}{2020/10/04}{Quotes around the aux file name removed,
+% they are no longer needed and upset BibTeX (gh/400)}
+% \begin{macrocode}
+\if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi
\@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for
\@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi
\if@tempswa \let\@auxout\@partaux \if@filesw
diff --git a/macros/latex/base/ltxdoc.pdf b/macros/latex/base/ltxdoc.pdf
index 20f8a87783..e71726bb93 100644
--- a/macros/latex/base/ltxdoc.pdf
+++ b/macros/latex/base/ltxdoc.pdf
Binary files differ
diff --git a/macros/latex/base/makeindx.pdf b/macros/latex/base/makeindx.pdf
index a816222f02..45c46bc9ea 100644
--- a/macros/latex/base/makeindx.pdf
+++ b/macros/latex/base/makeindx.pdf
Binary files differ
diff --git a/macros/latex/base/manifest.txt b/macros/latex/base/manifest.txt
index 449b250ee8..f3c8f2b216 100644
--- a/macros/latex/base/manifest.txt
+++ b/macros/latex/base/manifest.txt
@@ -114,6 +114,7 @@
% ltspace.dtx -- Spacing, line and page breaking.
% ltlogos.dtx -- Logos.
% ltlists.dtx -- Code for lists and related environments.
+% ltluatex.dtx -- LuaTeX engine related code.
% ltmath.dtx -- Code for math.
% ltmiscen.dtx -- Code for miscellaneous environments.
% ltoutenc.dtx -- Code for output encoding commands.
diff --git a/macros/latex/base/manual.pdf b/macros/latex/base/manual.pdf
index 1de8969b16..431b6c3c45 100644
--- a/macros/latex/base/manual.pdf
+++ b/macros/latex/base/manual.pdf
Binary files differ
diff --git a/macros/latex/base/modguide.pdf b/macros/latex/base/modguide.pdf
index 048da21603..046822176f 100644
--- a/macros/latex/base/modguide.pdf
+++ b/macros/latex/base/modguide.pdf
Binary files differ
diff --git a/macros/latex/base/nfssfont.pdf b/macros/latex/base/nfssfont.pdf
index 303128883a..7de676f4ce 100644
--- a/macros/latex/base/nfssfont.pdf
+++ b/macros/latex/base/nfssfont.pdf
Binary files differ
diff --git a/macros/latex/base/proc.pdf b/macros/latex/base/proc.pdf
index 4eae184b71..e7d82693a1 100644
--- a/macros/latex/base/proc.pdf
+++ b/macros/latex/base/proc.pdf
Binary files differ
diff --git a/macros/latex/base/slides.pdf b/macros/latex/base/slides.pdf
index 69e08c34cb..7081d4f442 100644
--- a/macros/latex/base/slides.pdf
+++ b/macros/latex/base/slides.pdf
Binary files differ
diff --git a/macros/latex/base/slifonts.pdf b/macros/latex/base/slifonts.pdf
index 4f6bb23e59..dc704d9b86 100644
--- a/macros/latex/base/slifonts.pdf
+++ b/macros/latex/base/slifonts.pdf
Binary files differ
diff --git a/macros/latex/base/source2e.pdf b/macros/latex/base/source2e.pdf
index d3fb51b8a9..3726b124d1 100644
--- a/macros/latex/base/source2e.pdf
+++ b/macros/latex/base/source2e.pdf
Binary files differ
diff --git a/macros/latex/base/syntonly.pdf b/macros/latex/base/syntonly.pdf
index 21af8af2d8..486c6597fd 100644
--- a/macros/latex/base/syntonly.pdf
+++ b/macros/latex/base/syntonly.pdf
Binary files differ
diff --git a/macros/latex/base/tlc2.pdf b/macros/latex/base/tlc2.pdf
index 9b632fc3ba..ba77288259 100644
--- a/macros/latex/base/tlc2.pdf
+++ b/macros/latex/base/tlc2.pdf
Binary files differ
diff --git a/macros/latex/base/tulm.pdf b/macros/latex/base/tulm.pdf
index b9e88f0cdd..93c492ea0c 100644
--- a/macros/latex/base/tulm.pdf
+++ b/macros/latex/base/tulm.pdf
Binary files differ
diff --git a/macros/latex/base/usrguide.pdf b/macros/latex/base/usrguide.pdf
index 423ad9fb05..ce13d76976 100644
--- a/macros/latex/base/usrguide.pdf
+++ b/macros/latex/base/usrguide.pdf
Binary files differ
diff --git a/macros/latex/base/utf8ienc.pdf b/macros/latex/base/utf8ienc.pdf
index 8d92fe05ee..ee4c898fbb 100644
--- a/macros/latex/base/utf8ienc.pdf
+++ b/macros/latex/base/utf8ienc.pdf
Binary files differ
diff --git a/macros/latex/base/webcomp.pdf b/macros/latex/base/webcomp.pdf
index fafa0b8b00..754b111b1d 100644
--- a/macros/latex/base/webcomp.pdf
+++ b/macros/latex/base/webcomp.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
index 26bb961678..d55eccfeee 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
+++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
index 850f59aec5..2ff7f14307 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
+++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex
@@ -125,7 +125,7 @@
%
\title{Documentation sur le module \ext{babel-french}}
\author{\href{mailto:daniel.flipo@free.fr}{Daniel \textsc{Flipo}}}
-\newcommand*{\latestversion}{3.5k}
+\newcommand*{\latestversion}{3.5l}
\date{Version {\latestversion} -- \today}
\begin{document}
@@ -1080,8 +1080,9 @@ La liste étant longue, les options sont regroupées par thèmes.
\item [SmallCapsFigTabcaptions=false (true*)]; si cette option est mise
à \fbo{false}, le recours aux petites capitales dans les intitulés des
légendes de figures et tables est supprimé, on obtient « Figure » et
- « Table » au lieu de « \textsc{Figure} » et « \textsc{Table} ».%
- \hlabel{scfigtab}
+ « Table » au lieu de « \textsc{Figure} » et « \textsc{Table} ».
+ Noter que le même résultat peut être obtenu en définissant |\FBfigtabshape|
+ comme |\relax| avant le chargement de \ext{babel}.%\hlabel{scfigtab}
\item [CustomiseFigTabcaptions=false (true*)] ; si cette option est mise
à \fbo{false}, le séparateur défini par |\CaptionSeparator| est remplacé par
@@ -1479,7 +1480,7 @@ préambule :\hlabel{enumitem-cfg}
|\settowidth{\mylabelwidth}{\mylabel}|\\
|\setlist[itemize]{label=\mylabel, nosep}|\\ % nosep ou noitemsep
|\setlist[1]{labelindent=\parindent}|\\
-|\setlist{labelwidth=\mylabelwidth, leftmargin=!|\\
+|\setlist{labelwidth=\mylabelwidth, leftmargin=!,|\\
| itemsep=0.4ex plus 0.2ex minus 0.2ex,|\\ % enumitem ne redéfinit pas
| parsep=0.4ex plus 0.2ex minus 0.2ex,|\\ % \list, on peut s’en passer
| topsep=0.8ex plus 0.4ex minus 0.4ex,|\\ % sauf option StandardLists,
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.dtx b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
index c30847224f..161833dd13 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.dtx
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.dtx
@@ -1,4 +1,4 @@
-%\CheckSum{3748}
+%\CheckSum{3759}
%
%\iffalse
% Tell the LaTeX system who we are and write an entry on the
@@ -13,7 +13,7 @@
%<frenchb>\ProvidesLanguage{frenchb}
%<lua>--[[
%<lua> File `frenchb.lua’ generated from frenchb.dtx
- [2020/09/09 v3.5k French support from the babel system]
+ [2020/10/10 v3.5l French support from the babel system]
%<*internal>
\iffalse
%</internal>
@@ -646,7 +646,9 @@
% \item [SmallCapsFigTabCaptions=false (true*)]; when set to
% \fbo{false}, |\figurename| and |\tablename| will be printed in
% French captions as ``Figure’’ and ``Table’’ instead of being
-% printed in small caps (the default).
+% printed in small caps (the default). The same result can be
+% achieved by defining |\FBfigtabshape| as |\relax| before
+% loading \frenchb{} (in a document class f.i.).
%
% \item [CustomiseFigTabCaptions=false (true*)]; when \fbo{false}
% the default separator (colon) is used instead of
@@ -3778,6 +3780,9 @@ return french_punctuation
% \changes{v3.5k}{2020/09/09}{Small caps removed in \cs{figurename} and
% \cs{tablename}, use \cs{fnum@figure} and \cs{fnum@table} instead.}
%
+% \changes{v3.5l}{2020/10/08}{Redefine \cs{fnum@figure} and
+% \cs{fnum@table} separately.}
+%
% |\figurename| and |\tablename| are printed in small caps in French,
% unless either \fbo{SmallCapsFigTabCaptions} is set to \fbo{false}
% or a class or package loaded before \frenchb{} defines
@@ -3863,9 +3868,11 @@ return french_punctuation
\else
\ifdefined\fnum@figure
\let\fnum@figureORI\fnum@figure
- \let\fnum@tableORI\fnum@table
\renewcommand{\fnum@figure}{{\ifFBfrench\FBfigtabshape\fi
\fnum@figureORI}}%
+ \fi
+ \ifdefined\fnum@table
+ \let\fnum@tableORI\fnum@table
\renewcommand{\fnum@table}{{\ifFBfrench\FBfigtabshape\fi
\fnum@tableORI}}%
\fi
@@ -3946,7 +3953,7 @@ return french_punctuation
\egroup
% \end{macrocode}
%
-% No warning is issued for SMF, AMS and ACM classes as their layout
+% No warning is issued for SMF and AMS classes as their layout
% of captions is compatible with French typographic standards.
%
% With \cls{memoir} and koma-script classes, \frenchb{} customises
@@ -3982,9 +3989,8 @@ return french_punctuation
% \changes{v3.0a}{2014/02/20}{No warning about \cs{@makecaption} for
% SMF classes.}
%
-% Disable the standard warning with ACM, AMS and SMF classes.
+% Disable the standard warning with AMS and SMF classes.
% \begin{macrocode}
-\@ifclassloaded{acmart}{\@FBwarning@capsepfalse}{}
\@ifclassloaded{amsart}{\@FBwarning@capsepfalse}{}
\@ifclassloaded{amsbook}{\@FBwarning@capsepfalse}{}
\@ifclassloaded{amsdtx}{\@FBwarning@capsepfalse}{}
@@ -3994,6 +4000,18 @@ return french_punctuation
\@ifclassloaded{smfbook}{\@FBwarning@capsepfalse}{}
% \end{macrocode}
%
+% \changes{v3.5l}{2020/10/01}{No warning about \cs{@makecaption} for
+% more classes.}
+%
+% Disable the standard warning for some classes that do not use
+% `:’ as caption separator.
+% \begin{macrocode}
+\@ifclassloaded{IEEEconf}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{IEEEtran}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{revtex4-2}{\@FBwarning@capsepfalse}{}
+\@ifclassloaded{svjour3}{\@FBwarning@capsepfalse}{}
+% \end{macrocode}
+%
% \changes{v2.6c}{2013/05/18}{No warning about \cs{@makecaption} for
% koma-script classes. \cs{captionformat} customised in French.}
%
@@ -4063,9 +4081,11 @@ return french_punctuation
\@FBwarning@capsepfalse
\fi
% \end{macrocode}
-% No Warning if \file{caption.sty} has been loaded.
+% No Warning if \file{caption.sty} or \file{caption-light.sty}
+% has been loaded.
% \begin{macrocode}
- \@ifpackageloaded{caption}{\@FBwarning@capsepfalse}{}%
+ \@ifpackageloaded{caption}{\@FBwarning@capsepfalse}{}%
+ \@ifpackageloaded{caption-light}{\@FBwarning@capsepfalse}{}%
% \end{macrocode}
% Final warning if relevant:
% \begin{macrocode}
@@ -4074,8 +4094,8 @@ return french_punctuation
{Figures' and tables' captions might look like\MessageBreak
`Figure 1:' in French instead of `Figure 1 :'.\MessageBreak
If this happens, to fix this issue\MessageBreak
- just add \protect\usepackage{caption} or\MessageBreak
switch to LuaLaTeX or XeLaTeX or\MessageBreak
+ try to add \protect\usepackage{caption} or\MessageBreak
... leave it as it is; reported}%
\fi
\let\FB@makecaption\relax
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.pdf b/macros/latex/contrib/babel-contrib/french/frenchb.pdf
index f8d5e00fbe..56a5c87b0d 100644
--- a/macros/latex/contrib/babel-contrib/french/frenchb.pdf
+++ b/macros/latex/contrib/babel-contrib/french/frenchb.pdf
Binary files differ
diff --git a/macros/latex/contrib/jsclasses/README.md b/macros/latex/contrib/jsclasses/README.md
index f860393a45..3d2e2b2b22 100644
--- a/macros/latex/contrib/jsclasses/README.md
+++ b/macros/latex/contrib/jsclasses/README.md
@@ -37,7 +37,7 @@ distributed separately.
## Release Date
-2020-10-05
+2020-10-09
Haruhiko Okumura,
Japanese TeX Development Community
diff --git a/macros/latex/contrib/jsclasses/jsclasses.dtx b/macros/latex/contrib/jsclasses/jsclasses.dtx
index 941b08c4f3..08d6bd4486 100644
--- a/macros/latex/contrib/jsclasses/jsclasses.dtx
+++ b/macros/latex/contrib/jsclasses/jsclasses.dtx
@@ -32,7 +32,7 @@
%<*driver>
\ProvidesFile{jsclasses.dtx}
%</driver>
- [2020/10/05 jsclasses (okumura, texjporg)]
+ [2020/10/09 jsclasses (okumura, texjporg)]
%<*driver>
\documentclass{jsarticle}
\usepackage{doc}
@@ -163,8 +163,12 @@
% をあてる場合があります。この処理に使用するフラグを定義します。
%
% \begin{macrocode}
+%</class>
+%<*class|minijs>
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
+%</class|minijs>
+%<*class>
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/jsclasses/jsclasses.pdf b/macros/latex/contrib/jsclasses/jsclasses.pdf
index 6288f723c2..b1783be1fb 100644
--- a/macros/latex/contrib/jsclasses/jsclasses.pdf
+++ b/macros/latex/contrib/jsclasses/jsclasses.pdf
Binary files differ
diff --git a/macros/latex/contrib/kvoptions/README.md b/macros/latex/contrib/kvoptions/README.md
index b307ffc87f..ecaccfa494 100644
--- a/macros/latex/contrib/kvoptions/README.md
+++ b/macros/latex/contrib/kvoptions/README.md
@@ -1,7 +1,13 @@
-# kvoptions
+# kvoptions package for LaTeX
-kvoptions package for LaTeX
+Version: 2020-10-07 v3.14
This package is intended for package authors who want to
use options in key value format for their package options.
+## Copyright (C)
+* 2007, 2009-2011 Heiko Oberdiek
+* 2016-2020 Oberdiek Package Support Group
+
+## License
+LATEX Project Public License, version 1.3c or later.
diff --git a/macros/latex/contrib/kvoptions/kvoptions.dtx b/macros/latex/contrib/kvoptions/kvoptions.dtx
index 8dd9701d47..38dfa18586 100644
--- a/macros/latex/contrib/kvoptions/kvoptions.dtx
+++ b/macros/latex/contrib/kvoptions/kvoptions.dtx
@@ -1,12 +1,12 @@
% \iffalse meta-comment
%
% File: kvoptions.dtx
-% Version: 2019/11/29 v3.13
+% Version: 2020-10-07 v3.14
% Info: Key value format for package options
%
% Copyright (C)
% 2004, 2006, 2007, 2009-2011 Heiko Oberdiek
-% 2016-2019 Oberdiek Package Support Group
+% 2016-2020 Oberdiek Package Support Group
% https://github.com/ho-tex/kvoptions/issues
%
% This work may be distributed and/or modified under the
@@ -85,7 +85,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: kvoptions 2019/11/29 v3.13 Key value format for package options (HO)}
+\Msg{* Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -97,11 +97,11 @@
This is a generated file.
Project: kvoptions
-Version: 2019/11/29 v3.13
+Version: 2020-10-07 v3.14
Copyright (C)
2004, 2006, 2007, 2009-2011 Heiko Oberdiek
- 2016-2019 Oberdiek Package Support Group
+ 2016-2020 Oberdiek Package Support Group
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -145,10 +145,6 @@ and the derived files
% \file{kvoptions-test3.tex}{\from{kvoptions.dtx}{test3}}%
% \file{kvoptions-test4.tex}{\from{kvoptions.dtx}{test4}}%
% \file{kvoptions-test4.sty}{\from{kvoptions.dtx}{test4pkg}}%
- \nopreamble
- \nopostamble
-% \usedir{source/latex/kvoptions/catalogue}%
-% \file{kvoptions.xml}{\from{kvoptions.dtx}{catalogue}}%
}
\catcode32=13\relax% active space
@@ -175,7 +171,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{kvoptions.drv}%
- [2019/11/29 v3.13 Key value format for package options (HO)]%
+ [2020-10-07 v3.14 Key value format for package options (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\begin{document}
@@ -185,26 +181,11 @@ and the derived files
% \fi
%
%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
%
% \GetFileInfo{kvoptions.drv}
%
% \title{The \xpackage{kvoptions} package}
-% \date{2019/11/29 v3.13}
+% \date{2020-10-07 v3.14}
% \author{Heiko Oberdiek\thanks
% {Please report any issues at \url{https://github.com/ho-tex/kvoptions/issues}}}
%
@@ -883,6 +864,11 @@ and the derived files
%
% \subsection{Package \xpackage{kvoptions-patch}}
%
+% \begin{description}
+% \item[Change in version v3.14:] \xpackage{kvoptions-patch} is not compatible with a
+% \LaTeX\ 2020-10-01 or newer and will abort loading if it detects it!
+% \end{description}
+%
% \LaTeX's system of package/class options has some severe limitations
% that especially affects the value part if options are used as
% pair of key and value.
@@ -1075,7 +1061,19 @@ and the derived files
% }
%
% \section{Implementation}
-%
+% \subsection{Disabling the patches for newer LaTeX}
+% \xpackage{kvoptions-patch} is not compatible with \LaTeX{} 2020-10-01 and newer
+% so it is disabled and issues a warning.
+% \begin{macrocode}
+%<*patch>
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+\IfFormatAtLeastTF{2020/10/01}{\PackageWarning{kvoptions-patch}%
+ {kvoptions-patch is not compatible with \MessageBreak
+ LaTeX \fmtversion\MessageBreak Loading is aborted}{}}{}
+\IfFormatAtLeastTF{2020/10/01}{\endinput}{}
+%</patch>
+% \end{macrocode}
+
% \subsection{Preamble}
%
% \begin{macrocode}
@@ -1154,7 +1152,7 @@ and the derived files
\fi
\expandafter\x\csname ver@kvoptions.sty\endcsname
\ProvidesPackage{kvoptions}%
- [2019/11/29 v3.13 Key value format for package options (HO)]%
+ [2020-10-07 v3.14 Key value format for package options (HO)]%
% \end{macrocode}
%
% \paragraph{Catcodes}
@@ -2288,7 +2286,7 @@ and the derived files
\TMP@EnsureCode{124}{12}% |
\edef\KVO@AtEnd{\KVO@AtEnd\noexpand\endinput}
\ProvidesPackage{kvoptions-patch}%
- [2019/11/29 v3.13 LaTeX patch for keyval options (HO)]%
+ [2020-10-07 v3.14 LaTeX patch for keyval options (HO)]%
% \end{macrocode}
%
% Check for \eTeX.
@@ -2789,253 +2787,6 @@ and the derived files
\KVO@AtEnd%
%</patch>
% \end{macrocode}
-%
-% \section{Test}
-%
-% \subsection{Preface for standard catcode check}
-%
-% \begin{macrocode}
-%<*test1>
-\input miniltx.tex\relax
-%</test1>
-% \end{macrocode}
-%
-% \subsection{Catcode checks for loading}
-%
-% \begin{macrocode}
-%<*test1>
-% \end{macrocode}
-% \begin{macrocode}
-\catcode`\{=1 %
-\catcode`\}=2 %
-\catcode`\#=6 %
-\catcode`\@=11 %
-\expandafter\ifx\csname count@\endcsname\relax
- \countdef\count@=255 %
-\fi
-\expandafter\ifx\csname @gobble\endcsname\relax
- \long\def\@gobble#1{}%
-\fi
-\expandafter\ifx\csname @firstofone\endcsname\relax
- \long\def\@firstofone#1{#1}%
-\fi
-\expandafter\ifx\csname loop\endcsname\relax
- \expandafter\@firstofone
-\else
- \expandafter\@gobble
-\fi
-{%
- \def\loop#1\repeat{%
- \def\body{#1}%
- \iterate
- }%
- \def\iterate{%
- \body
- \let\next\iterate
- \else
- \let\next\relax
- \fi
- \next
- }%
- \let\repeat=\fi
-}%
-\def\RestoreCatcodes{}
-\count@=0 %
-\loop
- \edef\RestoreCatcodes{%
- \RestoreCatcodes
- \catcode\the\count@=\the\catcode\count@\relax
- }%
-\ifnum\count@<255 %
- \advance\count@ 1 %
-\repeat
-
-\def\RangeCatcodeInvalid#1#2{%
- \count@=#1\relax
- \loop
- \catcode\count@=15 %
- \ifnum\count@<#2\relax
- \advance\count@ 1 %
- \repeat
-}
-\def\RangeCatcodeCheck#1#2#3{%
- \count@=#1\relax
- \loop
- \ifnum#3=\catcode\count@
- \else
- \errmessage{%
- Character \the\count@\space
- with wrong catcode \the\catcode\count@\space
- instead of \number#3%
- }%
- \fi
- \ifnum\count@<#2\relax
- \advance\count@ 1 %
- \repeat
-}
-\def\space{ }
-\expandafter\ifx\csname LoadCommand\endcsname\relax
- \def\LoadCommand{\input kvoptions.sty\relax}%
-\fi
-\def\Test{%
- \RangeCatcodeInvalid{0}{47}%
- \RangeCatcodeInvalid{58}{64}%
- \RangeCatcodeInvalid{91}{96}%
- \RangeCatcodeInvalid{123}{255}%
- \catcode`\@=12 %
- \catcode`\\=0 %
- \catcode`\%=14 %
- \LoadCommand
- \RangeCatcodeCheck{0}{36}{15}%
- \RangeCatcodeCheck{37}{37}{14}%
- \RangeCatcodeCheck{38}{47}{15}%
- \RangeCatcodeCheck{48}{57}{12}%
- \RangeCatcodeCheck{58}{63}{15}%
- \RangeCatcodeCheck{64}{64}{12}%
- \RangeCatcodeCheck{65}{90}{11}%
- \RangeCatcodeCheck{91}{91}{15}%
- \RangeCatcodeCheck{92}{92}{0}%
- \RangeCatcodeCheck{93}{96}{15}%
- \RangeCatcodeCheck{97}{122}{11}%
- \RangeCatcodeCheck{123}{255}{15}%
- \RestoreCatcodes
-}
-\Test
-\csname @@end\endcsname
-\end
-% \end{macrocode}
-% \begin{macrocode}
-%</test1>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*test2>
-\NeedsTeXFormat{LaTeX2e}
-\makeatletter
-\catcode`\@=11 %
-\def\RestoreCatcodes{}
-\count@=0 %
-\loop
- \edef\RestoreCatcodes{%
- \RestoreCatcodes
- \catcode\the\count@=\the\catcode\count@\relax
- }%
-\ifnum\count@<255 %
- \advance\count@\@ne
-\repeat
-
-\def\RangeCatcodeInvalid#1#2{%
- \count@=#1\relax
- \loop
- \catcode\count@=15 %
- \ifnum\count@<#2\relax
- \advance\count@\@ne
- \repeat
-}
-\def\Test#1{%
- \RangeCatcodeInvalid{0}{47}%
- \RangeCatcodeInvalid{58}{64}%
- \RangeCatcodeInvalid{91}{96}%
- \RangeCatcodeInvalid{123}{255}%
- \catcode`\@=12 %
- \catcode`\\=0 %
- \catcode`\{=1 %
- \catcode`\}=2 %
- \catcode`\#=6 %
- \catcode`\[=12 %
- \catcode`\]=12 %
- \catcode`\%=14 %
- \catcode`\ =10 %
- \catcode13=5 %
- #1\relax
- \RestoreCatcodes
-}
-\Test{\RequirePackage{kvoptions-patch}}%
-\Test{\RequirePackage{kvoptions}}%
-\csname @@end\endcsname
-%</test2>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*test3>
-\NeedsTeXFormat{LaTeX2e}
-\makeatletter
-\RequirePackage{kvoptions}[2019/11/29]
-\def\msg#{\immediate\write16}
-\define@key{testfamily}{testkey}{%
- \msg{[testfamily/testkey/#1]}%
-}
-\define@key{testfamily}{testdefaultkey}[testdefault]{%
- \msg{[testfamily/testdefaultkey/#1]}%
-}
-\AddToKeyvalOption{testfamily}{testkey}{%
- \msg{[addition/#1]}%
-}
-\AddToKeyvalOption{testfamily}{testdefaultkey}{%
- \msg{[addition/#1]}%
-}
-\setkeys{testfamily}{%
- testkey=testA,%
- testdefaultkey=testB,%
- testdefaultkey,%
-}
-\SetupKeyvalOptions{%
- family=testfamily%
-}
-\AddToKeyvalOption*{testkey}{%
- \msg{[star addition/#1]}%
-}
-\AddToKeyvalOption*{testdefaultkey}{%
- \msg{[star addition/#1]}%
-}
-\setkeys{testfamily}{%
- testkey=testA,%
- testdefaultkey=testB,%
- testdefaultkey,%
-}
-\@@end
-%</test3>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*test4pkg>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{kvoptions-test4}[2019/11/29 package for testing]
-\RequirePackage{kvoptions}[2019/11/29]
-\SetupKeyvalOptions{%
- family=FOO,%
- prefix=foo,%
- setkeys=\kvsetkeys,%
-}
-\DeclareStringOption{str}
-\define@key{FOO}{set}{%
- \setkeys{BAR}{strbar={#1}}%
-}
-\define@key{BAR}{strbar}{%
- \def\foostr{[BAR:#1]}%
-}
-\ProcessKeyvalOptions*
-%</test4pkg>
-% \end{macrocode}
-% \begin{macrocode}
-%<*test4>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{kvoptions-test4.tex}[2019/11/29 test file]
-\RequirePackage[%
- str=A,set=B,str=C,%
-]{kvoptions-test4}[2019/11/29]
-\def\TestExpected{C}
-\ifx\foostr\TestExpected
- \typeout{* Test ok.}%
-\else
- \typeout{* Result: [\foostr]}%
- \typeout{* Expected: [\TestExpected]}%
- \errmessage{Test failed!}%
-\fi
-\csname @@end\endcsname\end
-%</test4>
-% \end{macrocode}
-%
% \section{Installation}
%
% \subsection{Download}
@@ -3368,6 +3119,11 @@ and the derived files
% \item
% Documentation updates.
% \end{Version}
+% \begin{Version}{2020-10-07 v3.14}
+% \item \xpackage{kvoptions-patch} is not compatible with a
+% \LaTeX\ 2020-10-01 or newer and so it will abort loading if it detects it.
+% This fixes github issue \#5.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/macros/latex/contrib/kvoptions/kvoptions.pdf b/macros/latex/contrib/kvoptions/kvoptions.pdf
index d3c53e3096..fd9e72e93a 100644
--- a/macros/latex/contrib/kvoptions/kvoptions.pdf
+++ b/macros/latex/contrib/kvoptions/kvoptions.pdf
Binary files differ
diff --git a/macros/latex/contrib/tcolorbox/CHANGES b/macros/latex/contrib/tcolorbox/CHANGES
index f78792d54a..0b75eb6406 100644
--- a/macros/latex/contrib/tcolorbox/CHANGES
+++ b/macros/latex/contrib/tcolorbox/CHANGES
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
@@ -1184,3 +1184,11 @@ version 4.40 (2020/09/25)
version 4.41 (2020/09/29)
- bug fix (#120): color bleeding for xelatex and breakable boxes (since 4.32)
+
+version 4.42 (2020/10/09)
+- due to several problems with the color algorithm introduced with version 4.32,
+ essentially reversion to the proven pre 4.32 method.
+ * support of luacolor persists (since 4.32)
+ * color stacks (by pdfcol) are not mandatory any more,
+ but are optional now with 'use color stack'. Note that effects of whatsits
+ on the vertical space have to be expected.
diff --git a/macros/latex/contrib/tcolorbox/README b/macros/latex/contrib/tcolorbox/README
index 219c0ae662..55edf61ca4 100644
--- a/macros/latex/contrib/tcolorbox/README
+++ b/macros/latex/contrib/tcolorbox/README
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
diff --git a/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex b/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex
index 44669727e6..d77ecad60b 100644
--- a/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbbreakable.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbbreakable.code.tex: Code for breakable colorboxes
%%
%% -------------------------------------------------------------------------------------------
@@ -17,11 +17,13 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{pdfcol}
\pdfcolInitStack{tcb@breakable}
+\newif\iftcb@usecolorstack
+
\let\tcb@parboxrestore@true=\tcb@parboxrestore
\let\tcb@parboxrestore@false\tcb@parbox@false@settings
@@ -66,6 +68,7 @@
\def\tcb@@break{\par\xleaders\vbox{\rule{0pt}{2\textheight}}\vskip 2\textheight\par}
+
\def\tcb@vbox#1#2{%
\edef\reserved@a{%
\endgroup%
@@ -76,7 +79,10 @@
\reserved@a%
\@endpefalse%
\let\tcbbreak\tcb@@break%
- \pdfcolSwitchStack{tcb@breakable}%
+ \iftcb@usecolorstack%
+ \pdfcolSwitchStack{tcb@breakable}%
+ \pdfcolSetCurrentColor%
+ \fi%
\color@begingroup%
\textwidth\hsize%
\columnwidth\hsize%
@@ -274,7 +280,7 @@
\tcb@multicolfalse%
\fi}%
\ifx\kvtcb@float\@empty\relax%
- \iftcb@nobreak
+ \iftcb@nobreak%
\let\tcb@nobreak@warning\tcb@do@nobreak@warning%
\iftcb@ignorenobreak%
\kvtcb@beforebox%
@@ -308,14 +314,7 @@
\def\tcb@height@fill@unbroken@normal{\tcb@height@fill@unbroken{none}}
\def\tcb@height@fill@unbroken@compressed{\tcb@height@fill@unbroken{all}}
-\pdfcolIfStackExists{tcb@breakable}{%
- \def\tcb@use@after@lastbox{\bgroup\tcb@after@lastbox\egroup}
-}{%
- \def\tcb@use@after@lastbox{%
- \everypar=\expandafter{\the\everypar\everypar{}\color{.}}%
- \bgroup\tcb@after@lastbox\egroup%
- }%
-}
+\def\tcb@use@after@lastbox{\bgroup\tcb@after@lastbox\egroup}
\def\tcb@drawcolorbox@breakable{%
\tcbdimto\kvtcb@topsep{\kvtcb@topsep}%
@@ -330,6 +329,7 @@
\tcb@parfillskip@check%
\tcb@split@start%
\endgroup%
+ \color{.}% hack for some special cases
\ifx\kvtcb@float\@empty\relax%
\aftergroup\tcb@use@after@lastbox%
\fi%
@@ -916,13 +916,13 @@
\let\tcb@savebox=\tcb@vbox%
\let\endtcb@savebox=\endtcb@vbox%
\let\tcb@drawcolorbox=\tcb@drawcolorbox@breakable%
- \pdfcolIfStackExists{tcb@breakable}{%
- \appto\tcb@upperdraw@begin@hook{\pdfcolSetCurrent{tcb@breakable}}%
- \appto\tcb@lowerdraw@begin@hook{\pdfcolSetCurrent{tcb@breakable}}%
- }{%
- \appto\tcb@upperdraw@begin@hook{\color{tcbcolupper}}%
- \appto\tcb@lowerdraw@begin@hook{\color{tcbcollower}}%
- }%
+ \iftcb@usecolorstack%
+ \def\tcb@upperdraw@begin@hook{\pdfcolSetCurrent{tcb@breakable}}%
+ \def\tcb@lowerdraw@begin@hook{\pdfcolSetCurrent{tcb@breakable}}%
+ \else%
+ \def\tcb@upperdraw@begin@hook{\color{tcbcolupper}}%
+ \def\tcb@lowerdraw@begin@hook{\color{tcbcollower}}%
+ \fi%
}
\tcbset{%
@@ -1027,12 +1027,19 @@
segmentation at break/true/.code={\let\tcb@split@SL\tcb@split@SL@displayed},
segmentation at break/false/.code={\let\tcb@split@SL\tcb@split@L},
segmentation at break/.default=true,
+ use color stack/.is choice,%
+ use color stack/true/.code={%
+ \pdfcolIfStackExists{tcb@breakable}{\tcb@usecolorstacktrue}{\tcb@usecolorstackfalse}%
+ },%
+ use color stack/false/.code={\tcb@usecolorstackfalse},%
+ use color stack/.default=true,%
}
\tcbset{%
reset@breakable/.style={%
unbreakable,notitle after break,
+ use color stack=false,
shrink break goal=0pt,
lines before break=2,
topsep at break=0pt,
diff --git a/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex b/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex
index 0b9e7058b9..569308b3b5 100644
--- a/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbdocumentation.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbdocumentation.code.tex: Code for LaTeX documentations
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{listings,skins,xparse,external,raster}
diff --git a/macros/latex/contrib/tcolorbox/tcbexternal.code.tex b/macros/latex/contrib/tcolorbox/tcbexternal.code.tex
index 26664a4ab5..776a5694ec 100644
--- a/macros/latex/contrib/tcolorbox/tcbexternal.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbexternal.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbexternal.code.tex: Code for externalization
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{pro@cessing}
diff --git a/macros/latex/contrib/tcolorbox/tcbfitting.code.tex b/macros/latex/contrib/tcolorbox/tcbfitting.code.tex
index 62b718efe6..31e0b37980 100644
--- a/macros/latex/contrib/tcolorbox/tcbfitting.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbfitting.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbfitting.code.tex: Code for fit boxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\newdimen\tcbfitdim
\newdimen\tcb@lowerfitdim
diff --git a/macros/latex/contrib/tcolorbox/tcbhooks.code.tex b/macros/latex/contrib/tcolorbox/tcbhooks.code.tex
index 4e82c8ecd1..9e3be34df0 100644
--- a/macros/latex/contrib/tcolorbox/tcbhooks.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbhooks.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbhooks.code.tex: Code for adding hooks
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbset{%
before upper app/.code={\appto\kvtcb@before@upper{#1}},%
diff --git a/macros/latex/contrib/tcolorbox/tcblistings.code.tex b/macros/latex/contrib/tcolorbox/tcblistings.code.tex
index 84acc3bc18..f44cbe9a4e 100644
--- a/macros/latex/contrib/tcolorbox/tcblistings.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcblistings.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcblistings.code.tex: Code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{listings}[2007/02/22]
diff --git a/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex b/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex
index 42f48c655b..b070c4e727 100644
--- a/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcblistingscore.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcblistingscode.code.tex: Auxiliary code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{pro@cessing}
diff --git a/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex b/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex
index b656e6722f..b4fb28f987 100644
--- a/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcblistingsutf8.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{listings}
diff --git a/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex b/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex
index e85f6143da..0e29cfe97d 100644
--- a/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbmagazine.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbmagazine.code.tex: Code for box sets and magazine styles
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{breakable}
diff --git a/macros/latex/contrib/tcolorbox/tcbminted.code.tex b/macros/latex/contrib/tcolorbox/tcbminted.code.tex
index de83f6f154..20b548f0ae 100644
--- a/macros/latex/contrib/tcolorbox/tcbminted.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbminted.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbminted.code.tex: Code for colorboxes with listings
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{minted}[2011/09/17]
diff --git a/macros/latex/contrib/tcolorbox/tcbposter.code.tex b/macros/latex/contrib/tcolorbox/tcbposter.code.tex
index ab7704e1ae..591806e8e5 100644
--- a/macros/latex/contrib/tcolorbox/tcbposter.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbposter.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbposter.code.tex: Code for posters
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{breakable,magazine,skins,fitting}
diff --git a/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex b/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex
index 535d393e2c..14e7c8d430 100644
--- a/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbprocessing.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbprocessing.code.tex: Code for conditional processing
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{pdftexcmds}
\RequirePackage{shellesc}
diff --git a/macros/latex/contrib/tcolorbox/tcbraster.code.tex b/macros/latex/contrib/tcolorbox/tcbraster.code.tex
index fe8da9dceb..2cdfbfcd7b 100644
--- a/macros/latex/contrib/tcolorbox/tcbraster.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbraster.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\newcounter{tcbrastercolumn}
\newcounter{tcbrasterrow}
diff --git a/macros/latex/contrib/tcolorbox/tcbskins.code.tex b/macros/latex/contrib/tcolorbox/tcbskins.code.tex
index 14c70a87c6..0df4c6b0c6 100644
--- a/macros/latex/contrib/tcolorbox/tcbskins.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbskins.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbskins.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{tikz}[2010/10/13]
diff --git a/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex b/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex
index 03a9bf1eda..ca0940971a 100644
--- a/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbskinsjigsaw.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{skins}
diff --git a/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex b/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex
index 897f1a9737..334f51dea9 100644
--- a/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbtheorems.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbtheorems.code.tex: Code for theorems in colorboxes
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{amsmath}
diff --git a/macros/latex/contrib/tcolorbox/tcbvignette.code.tex b/macros/latex/contrib/tcolorbox/tcbvignette.code.tex
index 1d76bf65dd..cd02d69ff3 100644
--- a/macros/latex/contrib/tcolorbox/tcbvignette.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbvignette.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbvignette.code.tex: Code for ornamental frames
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\tcbuselibrary{skins}
diff --git a/macros/latex/contrib/tcolorbox/tcbxparse.code.tex b/macros/latex/contrib/tcolorbox/tcbxparse.code.tex
index 83713823f4..8fbf7fb8a1 100644
--- a/macros/latex/contrib/tcolorbox/tcbxparse.code.tex
+++ b/macros/latex/contrib/tcolorbox/tcbxparse.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcbxparse.code.tex: Code for xparse features
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
%\makeatletter
-\tcb@set@library@version{4.41}
+\tcb@set@library@version{4.42}
\RequirePackage{xparse}[2013/12/31]
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf
index 05ef9686bd..8df5f0fb63 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf
+++ b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.pdf
Binary files differ
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex
index 219b331661..7561a6fa3d 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox-example-poster.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcolorbox-example-poster.tex: a poster example for tcolorbox
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf
index 3506915b03..8d7e1b9e17 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf
+++ b/macros/latex/contrib/tcolorbox/tcolorbox-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-example.tex b/macros/latex/contrib/tcolorbox/tcolorbox-example.tex
index 3849a1c223..0d1cb965bd 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox-example.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox-example.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcolorbox-example.tex: an example for tcolorbox
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf
index 71cfb4f99b..71727a970e 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf
+++ b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.pdf
Binary files differ
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex
index b54b5585b2..de4c7d17b9 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox-tutorial-poster.tex
@@ -1,5 +1,5 @@
% \LaTeX-Main\
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcolorbox-tutorial-poster.tex: a tutorial for poster creation with tcolorbox
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex
index b8d678d8d2..9720be99f0 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.doc.breakable.tex
@@ -110,13 +110,9 @@ parameters. The differences are:
box\footnote{\refKey{/tcb/enforce breakable} acts like \refKey{/tcb/breakable} until |tcolorbox| 3.04.}.
\textbf{But, a breakable box inside a breakable box will usually give a mess.}
\item\tcbdocmarginnote{\tcbdocnew{2020-09-17}}
- Depending on the \LaTeX\ compiler, if your text content contains some text
+ Depending on the \LaTeX\ engine, if your text content contains some text
color changing commands, your color may not survive the break to the next box.
- Since |tcolorbox|~4.32, |pdflatex| and |lualatex| should not have that
- problem. For |xelatex|, with the |fontspec| package,
- you can use
- |\addfontfeatures{Color=mycolor}|
- to add a font color which survives the break.
+ See the documentation for \refKey{/tcb/use color stack} for more information.
\item\tcbdocmarginnote{\tcbdocnew{2014-10-30}}
The |perpage| option of the |footmisc| package is deliberately deactivated
inside a breakable box since all footnotes are placed at the end
@@ -222,7 +218,7 @@ parameters. The differences are:
\item Setting a \meta{length} to a negative value means that
the sum of this negative value and the naturally available space is used
for breaking (boxes will shrink in height).
- That that before version 4.10 negative values were treated like |0pt|.
+ Note that before version 4.10 negative values were treated like |0pt|.
\end{itemize}
\begin{dispExample}
% \usepackage{multicol,lipsum}
@@ -313,6 +309,72 @@ The |break at| option can be used to insert better break points by hand.
\end{docTcbKey}
+
+\begin{docTcbKey}[][doc new=2020-10-09]{use color stack}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
+ Depending on the \LaTeX\ engine and loaded packages, if your text contains some
+ color changing commands, your color may not survive the break to the next box.
+ For some engines, there is support for additional color stacks which
+ allow colors to survive breaks. Such an color stack can be activated
+ by \refKey{/tcb/use color stack} with help of the |pdfcol| package.
+ This can be done globally or per box.
+ \begin{marker}
+ Note that activating \refKey{/tcb/use color stack} inserts a color command with a \emph{whatsit}
+ at the begin of the upper part and of the lower part of a \refEnv{tcolorbox}.
+ This \emph{may} add additional vertical space, e.g. if your box text starts
+ with a list like \emph{enumerate}!
+ \end{marker}
+ \begin{itemize}
+ \item pdf\TeX: color stacks supported.
+ \item Lua\TeX: color stacks supported, but you should consider loading the
+ |luacolor| package \emph{instead} which avoids the spacing problem.
+ \item Xe\TeX: color stacks not supported (yet?). From hearsay,
+ with the |fontspec| package, you may use |\addfontfeatures{Color=mycolor}|
+ to add a font color which survives the break.
+ \end{itemize}
+ If |pdfcol| cannot initialize an additional color stack for the used engine,
+ \refKey{/tcb/use color stack} is silently ignored.
+
+\clearpage
+\begin{dispExample}
+% \usepackage{multicol,lipsum}
+\begin{multicols}{2}\footnotesize
+Breakable box without color stack.
+\begin{tcolorbox}[enhanced jigsaw,
+ size=small, colframe=gray, colback=yellow!10!white, colupper=blue,
+ enforce breakable,% use only breakable in the real world!
+ vfill before first, pad at break=1mm, break at=3.3cm ]
+ \begin{itemize}\item Some blue text.\end{itemize}
+ {\color{red}\itshape\lipsum[2]}\par
+ More blue text.
+\end{tcolorbox}
+Text after box.
+\end{multicols}
+\end{dispExample}
+
+We do again with \refKey{/tcb/use color stack}. Observe the additional spacing
+at the begin of the box:
+
+\begin{dispExample}
+% \usepackage{multicol,lipsum}
+\begin{multicols}{2}\footnotesize
+Breakable box with color stack.
+\begin{tcolorbox}[enhanced jigsaw, use color stack,
+ size=small, colframe=gray, colback=yellow!10!white, colupper=blue,
+ enforce breakable,% use only breakable in the real world!
+ vfill before first, pad at break=1mm, break at=3.3cm ]
+ \begin{itemize}\item Some blue text.\end{itemize}
+ {\color{red}\itshape\lipsum[2]}\par
+ More blue text.
+\end{tcolorbox}
+Text after box.
+\end{multicols}
+\end{dispExample}
+
+\end{docTcbKey}
+
+
+
+
\clearpage
\subsection{Option Keys for the Break Appearance}
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.pdf b/macros/latex/contrib/tcolorbox/tcolorbox.pdf
index 312bc849e1..f4d99c53ae 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.pdf
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.sty b/macros/latex/contrib/tcolorbox/tcolorbox.sty
index 58d6d15e23..a5f9d23397 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.sty
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.sty
@@ -1,8 +1,8 @@
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcolorbox.sty: Text color boxes
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2006-2019 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2006-2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,8 +18,8 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tcolorbox}[2020/09/29 version 4.41 text color boxes]
-\def\tcb@version{4.41}
+\ProvidesPackage{tcolorbox}[2020/10/09 version 4.42 text color boxes]
+\def\tcb@version{4.42}
\RequirePackage{pgf}[2008/01/15]
\RequirePackage{verbatim}[2003/08/22]
@@ -711,7 +711,10 @@
\let\tcb@savebox=\tcb@lrbox%
\let\endtcb@savebox=\endtcb@lrbox%
\let\tcb@defToTotalHeight=\tcb@defToTotalHeightStandard%
- \let\tcb@drawcolorbox=\tcb@drawcolorbox@standalone},
+ \let\tcb@drawcolorbox=\tcb@drawcolorbox@standalone%
+ \def\tcb@upperdraw@begin@hook{\color{tcbcolupper}}%
+ \def\tcb@lowerdraw@begin@hook{\color{tcbcollower}}%
+ },
code/.code={#1},
capture/.store in=\kvtcb@capture,%
hbox/.style={capture=hbox},%
@@ -868,10 +871,10 @@
\let\endtcb@savebox=\endtcb@lrbox
\def\tcb@saveupperbox{%
-\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper}
+\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\tcb@lua@color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper}
\def\tcb@savelowerbox{%
-\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}\color{tcbcollower}\kvtcb@fontlower\kvtcb@halignlower\tcb@insert@before@lower}
+\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}\tcb@lua@color{tcbcollower}\kvtcb@fontlower\kvtcb@halignlower\tcb@insert@before@lower}
% counter for float
@@ -887,6 +890,11 @@
\tcbset{autoparskip/.style=noparskip}%
\fi%
\tcb@use@autoparskip%
+\ifx\luacolorProcessBox\@undefined%
+ \def\tcb@lua@color#1{}%
+\else%
+ \def\tcb@lua@color#1{\color{#1}}%
+\fi%
}
\long\def\tcb@colorbox{%
@@ -964,12 +972,24 @@
\fi%
}
+\def\tcb@set@color#1{%
+ \edef\current@color{\@nameuse{\string\color@#1}}%
+ \colorlet{.}{#1}%
+}
+
+\def\tcb@reset@color{%
+ \colorlet{.}{tcbcol@origin}%
+ \edef\current@color{\@nameuse{\string\color@tcbcol@origin}}%
+}
+
\def\tcb@set@@upper@and@lower{%
+ \colorlet{tcbcol@origin}{.}%
\let\tcb@insert@after@part=\tcb@insert@after@upper%
% switch for lower box
\def\tcblower{%
\tcb@insert@after@part%
\end{tcb@savebox}%
+ \tcb@set@color{tcbcollower}%
\unless\iftcb@sidebyside%
\tcbdimto\tcb@w@lower{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@leftlower-\kvtcb@rightlower}%
\fi%
@@ -984,6 +1004,7 @@
\fi%
\tcb@startbox}%
% start of upper box
+ \tcb@set@color{tcbcolupper}%
\ifx\kvtcb@saveupperto\@empty%
\let\tcb@startbox\tcb@saveupperbox%
\let\endtcolorbox\tcb@endboxanddraw%
@@ -1167,6 +1188,7 @@
\def\tcb@endboxanddraw{%
\tcb@insert@after@part%
\end{tcb@savebox}%
+ \tcb@reset@color%
\tcb@draw@color@box%
\tcb@finalize@environment%
}
@@ -1602,7 +1624,7 @@
\pgfsetfillopacity{\kvtcb@opacitytitle}%
\pgftext[x=\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@lefttitle\relax,
y=\the\dimexpr\tcb@height-\kvtcb@top@rule-\kvtcb@boxsep-\kvtcb@toptitle\relax,
- left,top]{\box\tcb@titlebox}%
+ left,top]{\color@begingroup\color{tcbcoltitle}\box\tcb@titlebox\color@endgroup}%
\end{pgfscope}%
\fi\fi%
}
@@ -1661,7 +1683,7 @@
\fi%
\iftcb@hasLower%
\tcb@box@align{\tcb@lowerbox}%
- \iftcb@lowervisible\leavevmode\unhbox\tcb@lowerbox%
+ \iftcb@lowervisible\leavevmode\color{tcbcollower}\unhbox\tcb@lowerbox%
\else%
\iftcb@lowerignored\else\rule[-\dp\tcb@lowerbox]{\z@}{\the\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox\relax}\fi%
\fi%
@@ -1803,10 +1825,13 @@
\long\def\tcbox@inner@hbox#1{%
\tcbset{breakable@false,sidebyside=false}%
\tcb@set@@phantom%
+ \colorlet{tcbcol@origin}{.}%
+ \tcb@set@color{tcbcolupper}%
\sbox\tcb@upperbox{\tcb@embed@tcbox{%
\csname tcb@parbox@use@\kvtcb@parbox\endcsname%
\@parboxrestore%
- \color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper}}%
+ \tcb@lua@color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper}}%
+ \tcb@reset@color%
\tcbdimto\tcb@val@raisebase{\the\dimexpr\dp\tcb@upperbox+\kvtcb@bottom+\kvtcb@boxsep+\kvtcb@bottom@rule@stand+\kvtcb@bbbottom@stand\relax}%
\tcbdimto\kvtcb@width{\wd\tcb@upperbox+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule}%
\tcb@hasLowerfalse%
@@ -1821,7 +1846,10 @@
\tcb@set@@phantom%
\tcb@set@@title%
\tcb@set@@dimensions%
- \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper\end{tcb@savebox}%
+ \colorlet{tcbcol@origin}{.}%
+ \tcb@set@color{tcbcolupper}%
+ \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\tcb@lua@color{tcbcolupper}\kvtcb@fontupper\kvtcb@halignupper\tcb@insert@before@upper#1\tcb@insert@after@upper\end{tcb@savebox}%
+ \tcb@reset@color%
\tcb@hasLowerfalse%
\tcb@draw@color@box%
}
@@ -2199,7 +2227,8 @@
\tcbset{%
initialize@reset/.code={\tcbset{#1}\appto\tcb@reset{\tcbset{#1}}},%
reset/.code={\tcb@reset},%
- reset@core/.style={code={%
+ reset@core/.style={%
+ code={%
\let\tcbtitletext\@empty%
\tcb@attach@title@code@%
\let\tcb@lateoptions@hook\@empty%
@@ -2208,6 +2237,7 @@
\let\tcb@lowerdraw@begin@hook\@empty%
\let\tcb@lowerdraw@end@hook\@empty%
},
+ breakable@false,
width=\linewidth,beforeafter skip balanced=0.5\baselineskip plus 2pt,arc is curved,
natural height,height plus=0pt,space to lower,valign=top,valign lower=top,
size=normal,rounded corners,parfillskip restore,
diff --git a/macros/latex/contrib/tcolorbox/tcolorbox.tex b/macros/latex/contrib/tcolorbox/tcolorbox.tex
index 95be857149..39dcde9f3b 100644
--- a/macros/latex/contrib/tcolorbox/tcolorbox.tex
+++ b/macros/latex/contrib/tcolorbox/tcolorbox.tex
@@ -1,5 +1,5 @@
% \LaTeX-Main\
-%% The LaTeX package tcolorbox - version 4.41 (2020/09/29)
+%% The LaTeX package tcolorbox - version 4.42 (2020/10/09)
%% tcolorbox.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -43,8 +43,8 @@
\setlength{\bibitemsep}{\smallskipamount}
\addbibresource{tcolorbox.doc.bib}
-\def\version{4.41}%
-\def\datum{2020/09/29}%
+\def\version{4.42}%
+\def\datum{2020/10/09}%
\makeindex
\hypersetup{
@@ -62,7 +62,7 @@
%\geometry{showframe}
%\tcbset{draftmode}
\tcbset{/tcb/external/-}% for final run
-%\includeonly{tcolorbox.doc.intro,tcolorbox.doc.quickref,tcolorbox.doc.coremacros}
+%\includeonly{tcolorbox.doc.breakable}
%\hypersetup{colorlinks=false}
diff --git a/macros/latex/contrib/xmuthesis/LICENSE b/macros/latex/contrib/xmuthesis/LICENSE
new file mode 100644
index 0000000000..2244313901
--- /dev/null
+++ b/macros/latex/contrib/xmuthesis/LICENSE
@@ -0,0 +1,416 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % 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 (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
diff --git a/macros/latex/contrib/xmuthesis/README.md b/macros/latex/contrib/xmuthesis/README.md
new file mode 100644
index 0000000000..444fbc35dd
--- /dev/null
+++ b/macros/latex/contrib/xmuthesis/README.md
@@ -0,0 +1,45 @@
+![](https://img.shields.io/badge/Language-TeX-red.svg) ![](https://img.shields.io/github/stars/CamuseCao/XMU-thesis.svg?style=social) ![](https://img.shields.io/github/release/CamuseCao/XMU-thesis.svg?label=version) ![](https://img.shields.io/github/last-commit/CamuseCao/XMU-thesis.svg?style=social&logo=Tinder) ![](https://img.shields.io/github/repo-size/CamuseCao/XMU-thesis.svg) ![](https://img.shields.io/github/languages/code-size/CamuseCao/XMU-thesis.svg) ![](https://img.shields.io/github/followers/CamuseCao.svg?label=Followers) ![](https://img.shields.io/github/downloads/CamuseCao/XMU-thesis/v0.4/total.svg?style=plastic)
+
+---
+
+[TOC]
+
+# xmuthesis 厦门大学毕业论文模板
+
+xmuthesis 是为厦门大学毕业论文设计的模板,由 [CamuseCao](https://camusecao.top) 开发和维护。
+
+Github 项目的地址是 : [XMU-thesis](https://github.com/CamuseCao/XMU-thesis)
+
+Overleaf 项目地址是: [XMU-thesis](https://www.overleaf.com/read/ptthxfctspxh)
+
+邮箱: [camusecao@gmail.com](mailto:camusecao@gmail.com)
+
+---
+
+## 几点申明
+
+本模板为个人开发,非学校官方模板,但是基本按照学校的要求定制的。如果在提交论文或查重遇到问题自行负责。学校每年的要求可能会改变,希望到时候学弟学妹们可以提供最新的要求文档给我。期待 2020 年会有人发给我。目前本项目还处于持续开发维护中。在使用该模板之前,请把原始编译出来的文档读一下,对于你的使用是很有帮助的。
+
+## 致谢
+
+感谢曾经为该模板提出建议和改进的所有人。
+
+## 协议
+
+本模板发布遵循 LaTeX 项目公共许可证 1.3 c 或更高版本。如果是衍生作品,请务必加入协议声明和模板信息(github、CTAN 地址)。
+
+---
+
+# xmuthesis A LaTeX template for XMU
+
+xmuthesis is designed for XMU thesis's writing, created and maintained by CamuseCao.
+
+Github: [XMU-thesis](https://github.com/CamuseCao/XMU-thesis)
+
+Overleaf: [XMU-thesis](https://www.overleaf.com/read/ptthxfctspxh)
+
+Email: [camusecao@gmail.com](mailto:camusecao@gmail.com)
+
+## License
+
+This work is released under the LaTeX Project Public License, v1.3c or later. \ No newline at end of file
diff --git a/macros/latex/contrib/xmuthesis/xmuthesis.dtx b/macros/latex/contrib/xmuthesis/xmuthesis.dtx
new file mode 100644
index 0000000000..b2363ad523
--- /dev/null
+++ b/macros/latex/contrib/xmuthesis/xmuthesis.dtx
@@ -0,0 +1,4722 @@
+% \iffalse meta-comment
+% !TEX root = xmuthesis.tex
+% !TEX program = xelatex
+%
+% !TeX encoding = UTF-8
+%
+%% File: xmuthesis.dtx
+%
+% Copyright (C) 2019-2020 CamuseCao
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+%
+%
+%<*driver>
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%<*install>
+% \input l3docstrip.tex
+\input ctxdocstrip %
+\keepsilent
+\askforoverwritefalse
+\preamble
+<!--
+----------------------------------------------------------------
+xmuthesis --- A LaTeX template for XMU thesis writing
+E-mail: camusecao@gmail.com
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+-->
+\endpreamble
+% stop docstrip adding \endinput
+\postamble
+<!--
+Copyright (C) 2019 by CamuseCao <https://camusecao.top>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in the file:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
+CamuseCao.
+
+This work consists of the file xmuthesis.dtx
+and the derived files xmuthesis.cls,
+ xmuthesis.pdf and
+ xmulogo.sty.
+
+-->
+\endpostamble
+
+\generate{
+ \usedir{tex/latex/\jobname}
+ \file{\jobname.cls}{\from{\jobname.dtx}{class}}
+ \file{xmulogo.sty}{\from{\jobname.dtx}{logo}}
+}
+% \generate{\file{l3doc.ist}{\from{l3doc.dtx}{docist}}}
+\Msg{---------------------}
+\Msg{| End of extracting |}
+\Msg{---------------------}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</install>
+%</driver>
+%
+%<*driver|class>
+% !TEX root = ./xmu.tex
+\NeedsTeXFormat{LaTeX2e}
+
+\RequirePackage{ expl3, xparse, xtemplate, l3keys2e, scrlfile }
+
+\RequirePackage[l2tabu, orthodox]{nag}
+%</driver|class>
+%
+%<*driver>
+\ProvidesFile{\jobname.dtx}[2020/10/09 v0.4.1 XMU thesis]
+\documentclass{ctxdoc}% l3doc ctxdoc
+\OnlyDescription
+\begin{document}
+ \DocInput{\jobname.dtx}
+ \IndexLayout
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+% \changes{v0.4}{2020/10/06}{引入 \LaTeX{3} 添加 overleaf 支持以及使用 lppl 许可证等}
+% \changes{v0.3}{2020/08/09}{较少宏包的依赖以及修复部分问题}
+% \changes{v0.2}{2019/07/02}{增加平台支持以及发布 xmulogo 宏包等}
+% \changes{v0.1.1}{2019/02/19}{添加 a3 封面以及编译脚本等}
+% \changes{v0.1}{2019/01/30}{第一版}
+% \CheckSum{0}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \GetFileInfo{\jobname.dtx}
+% \DoNotIndex{\xmulineto, \vspace, \par, \draw, \begin, \end, \\, } %
+%
+% \title{\bfseries 厦大论文模板使用说明}
+% \author{\href{https://camusecao.top}{酸奶}}
+% \date{\filedate\quad\fileversion}
+% \maketitle
+% \begin{abstract}
+% xmuthesis 是面向厦大毕业论文写作的 \LaTeX{} 模板,它能够节约你在排版上面所花的时间。但是它不是官方模板,是由我私人维护的,格式基本符合学校的要求。虽然在我之前已经有类似的模板,但是大多数缺乏维护,已经过时,因此有了该模板。现在模板已经支持本科、硕士和博士。
+% \end{abstract}
+% \tableofcontents
+% \begin{documentation}
+% \section{介绍}
+%
+% \subsection{历史}
+% 厦大论文模板是 2018 年开始开发的, 2019 年发布于 Github 上。起初还没有写成 cls 模板,在后来逐渐规范,还额外开发了 xmulogo 宏包,用于生成高质量的校徽和校名图片。在 2020 年又统一用 dtx 来实现。
+%
+% \subsection{发现模板的问题}
+%
+% 如果发现模板用不对的地方或者有建议欢迎在 Github 上反馈或者发邮件给我。
+%
+% 联系方式:
+% 邮箱: \href{mailto:camusecao@gmail.com}{camusecao@gmail.com}
+%
+% Github 项目的地址 : \href{https://github.com/CamuseCao/XMU-thesis}{XMU-thesis}
+% \section{使用示例}
+% \subsection{最小示例}
+% \begin{ctexexam}
+% \documentclass[degree=undergraduate,bibstyle=numerical,font=empty]{xmuthesis}
+% \xmusetup{
+% author = 酸奶 ,
+% title = 你的论文题目 ,
+% date = \today , % 二〇一九年二月二十八日
+% class = 2015级 ,
+% studentnumber = 1972015xxxxxx ,
+% department = 物理科学与技术学院 ,
+% major = 微电子科学与工程 ,
+% advisor = 校内指导老师 \quad 职称 ,
+% otheradvisor = 校外指导老师 \quad 职称 ,
+% team = 物理科学与技术学院~理论物理 ,
+% fundteam = 物理科学与技术学院~理论物理 ,
+% degree = 本\quad 科 ,
+% englishtitle = Your English Title ,
+% majorordouble = 主修 , % 辅修
+% lab = 实验室 ,
+% % 以下几项本科生无需填写,也不用删除
+% classified_code = 1234 , % 分类号
+% security_classification = 公开 , % 内部 秘密 机密 公开 等
+% UDC = 5 , % 国际十进分类法
+% submit_date = 2020 年 8 月 10 日 , % 论文提交日期
+% defense_date = 2020 年 8 月 11 日 , % 论文答辩日期
+% conferred_date = 2020 年 8 月 21 日 , % 学位授予日期
+% chairman = 张三 , % 答辩委员会主席
+% referee = 李四 , % 评阅人
+% }
+% \usepackage{xmulogo}
+% \begin{document}
+% \maketitle
+% \chapter*{致谢}
+% 这里致谢
+% \begin{abstract}*
+% 中文摘要
+% \keywords*{关键词1;关键词2;关键词3}
+% \end{abstract}
+% \begin{abstract}
+% English abstract.
+% \keywords{keyword1; keyword2; keyword3}
+% \end{abstract}
+% \xmutableofcontents % 双语目录
+% \chapter{正文}{main body}
+% 正文内容
+% % \nocite{*}
+% % \bibliography{Reference}
+% \appendix
+% 附录
+% \backmatter
+% 后记
+% \end{document}
+% \end{ctexexam}
+%
+% \subsection{编译}
+%
+% 本模板需要使用 \verb|xelatex| 编译才能得到正确的结果。
+%
+% 对于 \verb|latexmk| 用户,可以用
+% \begin{frameverb}
+% latexmk -xelatex main
+% \end{frameverb}
+% 一步到位编译好。
+%
+% 不用 \verb|latexmk| 的用户可以用
+% \begin{frameverb}
+% xelatex main
+% \end{frameverb}
+% 编译。
+%
+% 如果用了有参考文献需要编译,使用 \verb|latexmk| 编译的方法仍然可行。对于不用 \verb|latexmk| 的情况,则较为复杂,需要四步
+% \begin{frameverb}
+% xelatex main
+% bibtex main
+% xelatex main
+% xelatex main
+% \end{frameverb}
+%
+% \section{文档选项}
+%
+% \begin{function}[]{degree}
+% \begin{syntax}
+% degree = \Arg{学位}
+% \end{syntax}
+% 是 xmuthesis 声明学位的选项,根据学位的不同,文档风格略有不同,这是由于不同学位的毕业论文要求不同导致的。
+% \end{function}
+%
+% \begin{optdesc}
+% \item[undergraduate] 这是该选项的默认值,本科生选用该选项
+% \item[master] 硕士生使用该选项
+% \item[doctor] 博士生使用该选项
+% \end{optdesc}
+% 以硕士生为例,他应该使用
+% \begin{frameverb}
+% \documentclass[degree=master]{xmuthesis}
+% \end{frameverb}
+%
+% \begin{function}[]{bibstyle}
+% \begin{syntax}
+% bibstyle = \Arg{参考文献样式}
+% \end{syntax}
+% 是控制参考文献样式的选项。模板默认加载 \verb|gbt7714| 宏包,需配合 \verb|bibtex| 编译得到最终结果。
+% \end{function}
+%
+% \begin{optdesc}
+% \item[numerical] 这是该选项的默认值,顺序编码制下,参考文献根据引用的顺序排序。引用样式是角标式。
+% \item[numbers] 与 \verb|numerical| 一样是顺序编码制,但是引用使用正文模式,如“文献 [3] 中说明”
+% \item[authoryear] 使用著者-出版年制
+% \end{optdesc}
+% 以著者-出版年制为例,应该使用
+% \begin{frameverb}
+% \documentclass[bibstyle=authoryear]{xmuthesis}
+% \end{frameverb}
+%
+% 对于著者-出版年制,要获得正确的参考文献排序,需要用 \verb|key=| \Arg{拼音} 对 \verb|bib| 文件的中文作者注音,且用 \verb|&| 分隔作者。如
+% \begin{ctexexam}
+% @article{zhangsan,
+% title={高等数学教学改革研究进展},
+% author={张三 and 李四},
+% key={zhang1 san1 & li3 si4},
+% journal={大學數學},
+% volume={23},
+% number={4},
+% pages={20--26},
+% year={2007},
+% publisher={大學數學編輯部}
+% }
+% \end{ctexexam}
+%
+%
+% \begin{function}[]{font}
+% \begin{syntax}
+% bibstyle = \Arg{字体选项}
+% \end{syntax}
+% 是控制模板使用字体的命令。
+% \end{function}
+%
+% \begin{optdesc}
+% \item[empty] 这是该选项的默认值,采用 \CTeX{} 宏集的自动判断功能,自动根据系统配置字体
+% \item[adobe] 采用 \CTeX{} 宏集配置的 adobe 字体,详情用 \verb|texdoc ctex| 查看
+% \item[fandol] 同上
+% \item[founder] 同上
+% \item[mac] 同上
+% \item[macnew] 同上
+% \item[macold] 同上
+% \item[ubuntu] 同上
+% \item[windows] 同上
+% \item[overleaf] 当模板在 overleaf 平台运行时,请使用该选项。这将调用 noto 中文字体
+% \end{optdesc}
+% 以 fandol 为例,应该使用
+% \begin{frameverb}
+% \documentclass[font=fandol]{xmuthesis}
+% \end{frameverb}
+%
+% 由于学校要求英文使用 Times New Roman 和 Arial 字体,对于 Linux 用户,它们常常不是默认安装在系统中的字体,因此需要用户自行安装这两个字体。
+%
+%
+% \begin{function}[]{nottoc, notabs, notbib}
+% 是控制目录中出现的内容。
+% \end{function}
+% \begin{optdesc}
+% \item[nottoc] 目录中不出现“目录”
+% \item[nottabs] 目录中不出现“摘要”
+% \item[notbib] 目录中不出现“参考文献”
+% \end{optdesc}
+% 以目录中不出现“摘要”和“参考文献” 为例,应该使用
+% \begin{frameverb}
+% \documentclass[nottabs,notbib]{xmuthesis}
+% \end{frameverb}
+%
+% \section{信息录入}
+%
+% \begin{function}[]{\xmusetup}
+% \begin{syntax}
+% \tn{xmusetup} \Arg{键值列表}
+% \end{syntax}
+% 是 xmuthesis 的信息录入命令,其参数是一个键值列表,以通用的接口完成信息录入。
+% \end{function}
+% \begin{table}[htbp]
+% \centering
+% \caption{xmusetup 里的健值}
+% \label{tab:xmusetup}
+% \begin{tabular}{*3l}
+% \toprule \\
+% 值 & 解释 & 示例 \\
+% \midrule
+% author & 作者 & 酸奶 \\
+% title & 题目 & 你的论文题目 \\
+% date & 日期 & \verb|\today| 或~二〇一九年二月二十八日 \\
+% class & 年级 & 2015级 \\
+% studentnumber & 学号 & 1972015xxxxxx \\
+% department & 学院 & 物理科学与技术学院 \\
+% major & 专业 & 微电子科学与工程 \\
+% advisor & 校内指导老师 & 张三 \verb|\quad| 职称 \\
+% otheradvisor & 校外指导老师 & 李四 \verb|\quad| 职称 \\
+% team & 所在课题组 & 物理科学与技术学院~理论物理 \\
+% fundteam & 资助课题组 & 物理科学与技术学院~理论物理 \\
+% degree & 学位 & 本\quad 科 \\
+% englishtitle & 英文标题 & Your English Title \\
+% majorordouble & 学位性质 & 主修 或 辅修 \\
+% lab & 所在实验室 & 极端条件实验室 \\
+% \midrule % \\
+% \midrule % \\
+% classified_code $^*$ & 分类号 & 1234 \\
+% security_classification $^*$ & 安全等级 & 公开 内部 秘密 机密 公开 等 \\
+% UDC $^*$ & 国际十进分类法 & 5 \\
+% submit_date $^*$ & 论文提交日期 & 2020 年 8 月 10 日 \\
+% defense_date $^*$ & 论文答辩日期 & 2020 年 8 月 11 日 \\
+% conferred_date $^*$ & 学位授予日期 & 2020 年 8 月 21 日 \\
+% chairman $^*$ & 答辩委员会主席 & 张三 \\
+% refere $^*$ & 评阅人 & 李四 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% 表~\ref{tab:xmusetup}中是有的值,其中加 \( ^* \) 的值本科生无需填写,也无需删除。对于博士生和硕士生则需要填写。
+%
+% 例如对于毕业论文题目是“我的毕业论文”的张三,他需要在导演区填入的是
+% \begin{frameverb}
+% \xmusetup{
+% author = 张三 ,
+% title = 我的毕业论文 ,
+% }
+% \end{frameverb}
+%
+% \section{模板提供或修改过的命令和环境}
+%
+% \begin{function}{\maketitle}
+% 该命令不仅仅是用于产生标题,还包括了承诺书等。在正确填写好 \verb|\xmusetup| 后,自动得到符合要求的的 title 。另外该命令与普通文档类一样,在 \verb|document| 环境的开头使用。例如
+% \begin{ctexexam}
+% \begin{document}
+% \maketitle
+% 其余内容
+% \end{document}
+% \end{ctexexam}
+% \end{function}
+%
+% \begin{function}{\chapter, \section, \subsection}
+% 这三个命令都不同于标准类文档,它们需要两个参数。第一个参数是中文的标题,第二个参数是英文的标题。在 \verb|\xmutableofcontents| 使用使用时需要加 * ,而之后的无需添加。如
+% \begin{ctexexam}
+% \chapter*{中文的章}{English Chapter}
+% \xmutableofcontents
+% \section{正文的节}{English section in main part}
+% \end{ctexexam}
+% \end{function}
+%
+% \begin{function}{abstract, \keywords}
+% \verb|abstract| 环境和 \verb|keywords| 命令都有带 * 版和不带 * 版,分别对应中英文。一个简单但是完整的摘要应该是如下的样子
+% \begin{ctexexam}
+% \begin{abstract}*
+% 中文摘要
+% \keywords*{关键词1;关键词2;关键词3}
+% \end{abstract}
+% \begin{abstract}
+% English abstract.
+% \keywords{keyword1; keyword2; keyword3}
+% \end{abstract}
+% \end{ctexexam}
+% \end{function}
+%
+% \begin{function}{\xmutableofcontents}
+% 用于生成中英双语目录,一般在摘要结束后使用。 \verb|\tableofcontents| 不要在 xmuthesis 中使用。
+% \end{function}
+%
+%
+% \begin{function}{\cref}
+% 由 \verb|cleveref| 宏包提供,并且在 xmuthesis 经过设置的智能引用命令,用于图片表格的交叉引用。使用例子
+% \begin{ctexexam}
+% \begin{equation}
+% 1+1=2 \label{eq:1}
+% \end{equation}
+% \begin{equation}
+% 2+2=4 \label{eq:2}
+% \end{equation}
+% \begin{equation}
+% 3+3=6 \label{eq:3}
+% \end{equation}
+% \begin{equation}
+% 4+4=8 \label{eq:4}
+% \end{equation}
+% 单引用:\cref{eq:1}
+% 范围引用:\crefrange{eq:1}{eq:2}
+% 连续多引用:\cref{eq:1,eq:3,eq:2} , 同于 \crefrange{eq:1}{eq:3}
+% 不连续多引用:\cref{eq:1,eq:2,eq:4}
+% \end{ctexexam}
+% \end{function}
+%
+% \begin{function}{proof, law, theoty}
+% 由 \verb|amsthm| 宏包提供或定制,分别对应于证明,定律和定理。注意 \verb|proof| 环境是没有编号的,另外两个是有的。简单的使用例子
+% \begin{ctexexam}
+% \begin{theory}[Energy–momentum relation]
+% The relationship of energy, momentum and mass is
+% \[E^2 = m_0^2 c^4 + p^2 c^2\]
+% where $ c $ is the light speed.
+% \end{theory}
+% \begin{law}\label{law:box}
+% Don't hide in the witness box.
+% \end{law}
+% \begin{proof}
+% For simplicity, we use
+% \[
+% E=mc^2
+% \]
+% That's it.
+% \end{proof}
+% \end{ctexexam}
+% \end{function}
+%
+% \begin{function}{\circled}
+% 用于产生带圈的数字,产生带圈的数字用 \verb|\circled{1}| 。
+% \end{function}
+%
+% \section{xmulogo 宏包}
+%
+% 为了方便输出高质量的校徽和校名图片,特意开发了 xmulogo 宏包。主要提供了两个命令。
+% \begin{function}{\xmulogo, \xmulogon}
+% \verb|\xmulogo| , \verb|\xmulogon| 分别用于产生校徽和校名。两者的用法完全一样。一下以 \verb|\xmulogo| 为例介绍其用法。用法为 \verb|\xmulogo[scale]{r,g,b}| ,其中 \verb|scale| 控制图片的尺寸,填入 $0\sim 1$ 之间的数。花括号的 \verb|{r,g,b}| 是用与控制颜色的,采用 rgb 的颜色控制方法。它是一个可选参数,不填则采用默认的颜色。以下用法均为正确用法。
+% \begin{ctexexam}
+% \xmulogo
+% \xmulogo[0.5]
+% \xmulogo{0.1,0.15,0.9}
+% \xmulogo[0.4]{0.1,0.1,0.9}
+% \end{ctexexam}
+% \end{function}
+%
+% 模板封面页在 \verb|figs/xmu-flag.pdf| 不存在是会调用 \verb|xmulogo| 宏包生成相应的图片。建议像 Github 项目地址一样创建 \verb|figs| 文件,并且放入 \verb|xmu-flag.pdf| 。这样可以节约编译的时间。
+% \section{一些建议}
+%
+%\subsection{致谢}
+%
+%致谢语应以简短的文字对课题研究与论文撰写过程中曾直接给予帮助的人员(例如指导教师、答疑教师及其他人员)表示自己的谢意。
+%
+%作为毕业论文提交时,应注意事项:致谢内容用小四号宋体。根据2016年2月施行的《厦门大学本科毕业论文(设计)规范》,致谢被放在论文起首。致谢结构一般分为三个部分:1,回顾;2,感谢; 3,承担责任以及献辞。第一部分可以简述论文写作的经历,所面对的挑战以及你如何应对。第二部分具体感谢在论文过程中给与你帮助的人。第三部分指出你将为自己的论文承担责任,如果你希望将此论文献给谁,可以在最后指出。致谢内容请亲自撰写,使其具备你个人的特色。抄袭任何模板内容是极其懒惰、没有意义、不负责任和错误的行为。
+%
+%
+%\subsection{摘要}
+% 本科生中文摘要应具有独立性和自含性,语言精炼、明确,高度概括论文内容,以 400 字左右为宜。关键词应体现论文特色,具有语义性,在论文中有明确出处,以 3—5 个为宜。关键词另起一行排在摘要的下方,每个关键词之间用中文分号“;”分开,最后一个关键词不打标点符号。
+%
+% 硕士与博士的中文摘要中文 600 字左右;重点概述本文研究的问题、意义、创新之处和主要观点、结论。关键词数量:不超过3个,能体现论文的主要内容,词组符合学术规范;每个关键词字数:不超过5个字;每个关键词字数:不超过5个字;
+%
+% 英文摘要、关键词内容与中文相同,每个关键词之间用英文
+% 分号“;”加一空格分开,最后一个关键词不打标点符号。中、
+% 英文摘要及其关键词各置一页内。
+%
+%
+
+% \subsection{正文的基本要求}
+%
+% 正文从另右页开始。每一章应另起页,并从奇数页开始。正文一般从引言(绪论)开始,以结论或讨论结束。引言(绪论)应包括论文的研究目的、流程和方法等。研究领域的历史回顾、文献回溯、理论分析等内容应独立成章,用足够的文字叙述。结论应包含论文的核心观点,阐述自己的创造性成果及其在本研究领域中的意义、作用,交代研究工作的局限,提出未来工作的意见和建议。
+%
+% 正文由于涉及的学科、选题、研究方法、结果表达方式等有很大的差异,不作统一的规定,但要求自然科学论文应提供实验数据和图片资料真实,推理正确、结论清晰;人文和社会学科的论文应把握论点正确、论证充分、论据可靠,恰当运用系统分析和比较研究的方法进行模型或方案设计,注重实证研究和案例分析。
+%
+% 正文一般不少于 6000 字(不含图表、程序和计算数字)。用外国语言撰写的,字数参照 4 个英文单词折算 1 个中文字数进行计数。\footnote{以上内容仅供参考,详见《厦门大学本科毕业论文(设计)规范》}
+%
+%
+% \subsection{学术名词}
+%
+% \begin{itemize}
+% \item 科学技术名词术语采用全国自然科学名词审定委员会公布的规范词或国家标准、部标准中规定的名称,尚未统一规定或有争议的名词术语,可采用惯用的名称。
+% \item 特定含义的名词术语或新名词、以及使用外文缩写代替某一名词术语时,首次出现时应在括号内注明其含义,如:OECD(Organization for Economic Co-operation and Development)
+%代替经济合作发展组织。
+% \item 外国人名一般采用英文原名,可不译成中文,英文人名按名前姓后的原则书写。一般很熟知的外国人名(如牛顿、爱因斯坦、达尔文、马克思等)可按通常标准译法写译名。
+% \end{itemize}
+%
+%
+%
+%\subsection{物理量名称、符号与计量}
+%
+%
+%\begin{itemize}
+% \item 论文中某一物理量的名称和符号应统一,一律采用国务院发布的《中华人民共和国法定计量单位》或者国际公认的计量单位。单位名称和符号的书写方式,应采用国际通用符号。
+% \item 在不涉及具体数据表达时允许使用中文计量单位如“千克”。
+% \item 表达时间使用“2014 年 6 月”,不能使用“14 年 6 月”或“2014.6”。不能使用 80 年代,而应为上世纪 80 年代或 20 世纪80 年代。表达时刻应采用中文计量单位,如“下午 3 点 10 分”,不能写成“3h10min”,在表格中可以用“3:10PM”表示。
+% \item 物理量符号、物理量常量、变量符号用斜体,计量单位符号均用正体。
+%\end{itemize}
+%
+% 单位书写推荐用 \verb|siunitx| 宏包。
+%
+% 数学和物理的学生强烈推荐学习使用 \verb|physics| 宏包。
+%
+% \subsection{数字}
+%
+% \begin{enumerate}
+% \item 无特别约定情况下,一般均采用阿拉伯数字表示。
+% \item 小数的表示方法:一般情形下,小于 1 的数,需在小数点之前加 0。但当某些特殊数字不可能大于 1 时(如相关系数、比率、概率值),小数点之前的 0 可去掉,如 $ r=.26,p<.05 $ 。
+% \item 统计符号的格式:一般除 $ \alpha , \beta , \lambda , \epsilon \text{以及} V $ 等符号外,其余统计符号一律以斜体字呈现,如\textit{ANCOVA,ANOVA,MANOVA,N,nl,M,SD,F,p,r } 等。
+% \end{enumerate}
+%
+%
+% \subsection{公式}
+%
+% \begin{enumerate}
+% \item 公式应另起一行缩略书写,居于中央(注意行首无缩进),与周围文字留足够的空间区分开。
+% \item 公式的编号用英文圆括号括起,放在公式右边行末,在公式和编号之间不加虚线。子公式可不编序号,需要引用时可加编 a、b、c……,重复引用的公式不得另编新序号。公式较多时,可分章编号,但应与表格、图的编序方式统一。
+% \item 较长的公式最好在等号处转行,或在运算符号(如“+”、“-”号)处转行,等号或运算符号应在转行后的行首。公式中分数线的横线,其长度应等于或略大于分子和分母中较长的一方。
+% \end{enumerate}
+%
+% \subsection{表格}
+%
+% \begin{enumerate}
+% \item 表格要有:表号,表名,单位。表号和表名居表上方正中(注意行首无缩进);表格只有一个单位时,单位在表右上方。表较多时,可分章编号,但须与插图、公式的编序方式统一。
+% \item 表格应优先采用三线表,三线表头尾两条线宽 1 磅,中间线宽 0.75 磅。也可根据需要使用其他格式。
+% \item 表格如参考其他资料,应标明“作者、来源名称、时间”,置表格左下方。
+% \item 表格允许下页接写,接写时应重复表号,表号后跟表名(可省略)和“(续)”,置于表上方。续表应重复表头。
+% \item 表格应放在离正文首次出现处最近的地方,不应超前和过分拖后。表与上下正文之间各空一行。
+% \end{enumerate}
+%
+% 三段表的示例为
+% \begin{ctexexam}
+% \begin{table}[!ht]
+% \centering
+% \begin{threeparttable}[b]
+% \zihao{5}
+% \caption{表格示例}
+% \begin{tabular}{ccc}
+% \toprule
+% & ABS & CB \\
+% \midrule
+% (Intercept) & 5.482 & 3.4871 \\
+% ABC & 1.1173 & 1.1933 \\
+% DEF & 8.1752* & 2.6836 \\
+% \bottomrule
+% \multicolumn{3}{c}{*p<0.1; **p<0.05; ***p<0.01} \\
+% \bottomrule
+% \end{tabular}%
+% \label{tab:mlogit}%
+% \begin{tablenotes}
+% \zihao{5}\item Note: These are estimates of multinomial logit model.
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}%
+% \end{ctexexam}
+%
+%
+% \subsection{插图}
+%
+% \begin{enumerate}
+% \item 图包括曲线图、构造图、示意图、框图、流程图、记录图、地图、照片等。图应与文字内容相符,技术内容正确。所有制图应符合国家标准和专业标准,对无规定符号的图形应采用该行业的常用画法。
+% \item 图要有:图号,图名,单位。图号和图名要居图下方的正中(注意行首无缩进)。图较多时,可分章编号,但须与表格、公式的编序方式统一。
+% \item 图如参考其他资料,要示明“作者、来源名称、时间”,置图左下方。
+% \item 由若干分图组成的插图,分图用 a、b、c……标序。分图的图名以及图中各种代号的意义,以图注形式写在图题下方,先写分图名,另起行写代号的意义。
+% \item 图与图标题、图序号为一个整体,不得拆开排版为两页。当页空白不够排版该图整体时,可将其后文字部分提前,将图移至次页最前面。
+% \end{enumerate}
+%
+%
+%
+% \subsection{注释}
+%
+% 当文中的字、词或短语需要进一步加以说明,而又没有具体的文献来源时,用注释。注释不宜过多。
+% 篇名、作者注置于当页地脚。对文内有关特定内容的注释可夹在文内(加圆括号),也可排在当页地脚,注释序号以带圈的数字形式标示在被注释词条的右上角。注脚的命令如下\verb|\footnote{注脚内容}|。
+%
+%\subsection{参考文献与引用}
+%
+% 本模板默认引用 \verb|gbt7714| 宏包,可以使用它处理参考文献。
+%
+% 以下是一些参考文献的引用。应该能有合适的。不合适可以修改。
+%
+% \begin{ctexexam}
+% \cite{label1}
+% \cite{label,label2}
+% \citet{label3}
+% \citep{label3}
+% \citealt{label3}
+% \citeauthor{label3}
+% \citeyearpar{label3}
+% \end{ctexexam}
+%
+%
+% \section{代码插入}
+%
+% 模板已加载 \verb|listings| 宏包,并且简单设置过。
+% 可以使用 \verb|lstlisting| 环境来展示代码。
+% 下面是一个Matlab的代码的插入示例,还可以插入其它类型的代码。有额外需求可以添加。
+%
+% \begin{frameverb}
+% \lstinputlisting[language=Matlab]{Plot.m}
+% \end{frameverb}
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+% \end{documentation}
+%
+% \StopEventually{}
+%
+%
+%\begin{implementation}
+% \clearpage
+% \section{代码实现}
+%<*class>
+% \begin{macrocode}
+\ExplSyntaxOn
+\def\IfXeTeXTF#1#2{\csname sys_if_engine_xetex:TF\endcsname{#1}{#2}}
+
+\IfXeTeXTF{
+ % \PassOptionsToClass{fontset=none}{ctexbook}
+ \PassOptionsToPackage{no-math}{fontspec}
+ \PassOptionsToPackage{utf8}{inputenc}
+}{}
+
+\sys_if_engine_pdftex:T {
+ \PassOptionsToClass{UTF8}{ctexbook}
+ \msg_new:nnn { engine } { msg } {
+ Don't~use~pdfLaTeX~to~compile~the~final~TeX~files.
+ }
+ \msg_warning:nn { engine } { msg }
+}
+
+
+
+
+\ProvidesClass{ xmuthesis }[2020/10/04 v0.4.1 XMU thesis]
+
+\PassOptionsToPackage{subfigure}{tocloft}
+\PassOptionsToPackage{noend}{algpseudocode}
+\PassOptionsToPackage{para}{threeparttable}
+\PassOptionsToPackage{sort&compress}{natbib}
+
+\bool_set_false:N \l__xmu_advanced_font_bool
+\bool_set_false:N \l__xmu_overleaf_font_bool
+\bool_set_false:N \l__xmu_undergraduate_bool
+\bool_set_false:N \l__xmu_master_bool
+\bool_set_false:N \l__xmu_doctor_bool
+
+\bool_set_true:N \l__xmu_toc_toc_bool
+\bool_set_true:N \l__xmu_toc_abs_bool
+\bool_set_true:N \l__xmu_toc_ref_bool
+
+\keys_define:nn { xmuthesis }{
+ degree .choice: ,
+ degree .default:n = undergraduate ,
+ degree / undergraduate .code:n = \bool_set_true:N \l__xmu_undergraduate_bool ,
+ degree / master .code:n = \bool_set_true:N \l__xmu_master_bool ,
+ degree / doctor .code:n = \bool_set_true:N \l__xmu_doctor_bool ,
+
+ nottoc .code:n = \bool_set_false:N \l__xmu_toc_toc_bool ,
+ notabs .code:n = \bool_set_false:N \l__xmu_toc_abs_bool ,
+ notbib .code:n = \bool_set_false:N \l__xmu_toc_ref_bool ,
+
+ bibstyle .choice: ,
+ bibstyle .default:n = numerical ,
+ bibstyle / numerical .code:n = ,
+ bibstyle / numbers .code:n =
+ \AfterPackage{gbt7714}{\citestyle{numbers}} ,
+ bibstyle / authoryear .code:n =
+ \AfterPackage{gbt7714}{\bibliographystyle{gbt7714-author-year}} ,
+ bibstyle / unknown .code:n =
+ \msg_error:nnxxx { xmuthesis } { unknown-choice } { bibstyle }
+ { numerical, numbers, authoryear }
+ { The~choice~' #1 '~is~invalid~for~bibstyle} ,
+
+ font .choice: ,
+ font .default:n = empty ,
+ font / adobe .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / fandol .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / founder .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / mac .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / macnew .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / macold .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / windows .code:n = \PassOptionsToClass{fontset = #1}{ctexbook} ,
+ font / ubuntu .code:n = \PassOptionsToClass{fontset = #1}{ctexbook}
+ \msg_new:nnn { ubuntu font } { msg } {
+ You~are~using~the~default~fonts,~so~you~better~change~it~by~font=adobe,
+ ~or~advance.~If~you~choose~them,
+ ~you~should~download~the~necessary~font~and~put~them~in~the~right~place.
+ }
+ \msg_warning:nn { ubuntu font } { msg } ,
+ font / overleaf .code:n = \PassOptionsToClass{fontset =none}{ctexbook}
+ \bool_set_true:N \l__xmu_overleaf_font_bool ,
+ font / advance .code:n = \PassOptionsToClass{fontset =none}{ctexbook}
+ \bool_set_true:N \l__xmu_advanced_font_bool ,
+ font / empty .code:n = \msg_new:nnn { font } { msg } {
+ You~are~using~the~default~fonts,~you~can~change~it~by~font=adobe,
+ ~windows,~mac,~advance~and~so~on.
+ }
+ \msg_warning:nn { font } { msg },
+ font / unknown .code:n = \msg_error:nnxxx { xmuthesis } { unknown-choice }{ font }{
+ empty, adobe, fandol, founder, mac, macnew, macold, ubuntu, windows, advance
+ }{
+ The~choice~' #1 '~is~invalid~for~font
+ },
+}
+
+\ProcessKeysOptions { xmuthesis }
+
+
+\LoadClass [ zihao=-4 , openright, ] {ctexbook}
+
+\sys_if_engine_pdftex:T {
+ \RequirePackage{microtype,amsfonts}
+}
+
+\NewDocumentCommand\degree{ m m m }{
+ \IfBooleanTF{\l__xmu_undergraduate_bool}{
+ #1
+ }{
+ \IfBooleanTF{\l__xmu_master_bool}{
+ #2
+ }{
+ #3
+ }
+ }
+}
+
+\NewDocumentCommand\undergratuateTF{ m m }{
+ \IfBooleanTF{\l__xmu_undergraduate_bool}{
+ #1
+ }{
+ #2
+ }
+}
+
+\undergratuateTF{
+
+}{
+ \RequirePackage{xeCJKfntef}
+}
+\RequirePackage[UseMSWordMultipleLineSpacing,MSWordLineSpacingMultiple=1.5]
+{zhlineskip}
+
+\RequirePackage{
+ amsthm ,
+ physics ,
+ siunitx ,
+ verbatim ,
+ multirow ,
+ geometry ,
+ fancyhdr ,
+ graphicx ,
+ % longtable ,
+ booktabs ,
+ tabularx ,
+ caption ,
+ threeparttable ,
+ subfig ,
+ tocloft ,
+ % tocbibind ,
+ xcolor ,
+ listings ,
+ gbt7714 ,
+ % float ,
+ hyperref ,
+ algorithm ,
+ algpseudocode ,
+ cleveref ,
+}
+
+\IfXeTeXTF{
+\RequirePackage{unicode-math}
+\setmainfont{Times~New~Roman} % Times~New~Roman Source~Serif~Pro
+\setsansfont{Arial} % Arial Source~Sans~Pro
+
+\unimathsetup{
+ math-style = ISO ,
+ bold-style = ISO ,
+ nabla = upright ,
+ partial = upright ,
+ }
+}{}
+
+\geometry{
+ left = 2cm ,
+ right = 2cm ,
+ top = 4cm ,
+ bottom = 3cm ,
+}
+\bool_if:NTF \l__xmu_undergraduate_bool{
+ \captionsetup{font={small,bf}}
+}{
+ \captionsetup{font={normalsize,bf}}
+}
+
+\hypersetup{
+% bookmarks=true ,
+ bookmarksnumbered = false ,
+ linkcolor = black ,
+ citecolor = blue ,
+ urlcolor = green ,
+ colorlinks ,
+}
+
+
+\bool_if:NT \l__xmu_advanced_font_bool{
+ \setmonofont[
+ Extension = .otf ,
+ Path = fonts/ ,
+ UprightFont = *-regular ,
+ BoldFont = *-bold ,
+ ItalicFont = *-it ,
+ BoldItalicFont = *-boldit] {SourceCodePro}
+ \setCJKmonofont[
+ Extension = .otf ,
+ Path = fonts/ ,
+ UprightFont = *-Regular ,
+ BoldFont = *-Bold ,
+ ItalicFont = *-Regular ,
+ BoldItalicFont = *-Bold ,
+ ItalicFeatures = FakeSlant ,
+ BoldItalicFeatures = FakeSlant] {NotoSansMonoCJKsc}
+ \setCJKmainfont[
+ Extension = .otf ,
+ Path = fonts/ ,
+ UprightFont = *-Regular ,
+ BoldFont = *-Bold ,
+ ItalicFont = *-Regular ,
+ BoldItalicFont = *-Bold ,
+ ItalicFeatures = FakeSlant ,
+ BoldItalicFeatures = FakeSlant] {NotoSerifCJKsc}
+ \setCJKsansfont[
+ Extension = .otf ,
+ Path = fonts/ ,
+ UprightFont = *-Regular ,
+ BoldFont = *-Bold ,
+ ItalicFont = *-Regular ,
+ BoldItalicFont = *-Bold ,
+ ItalicFeatures = FakeSlant ,
+ BoldItalicFeatures = FakeSlant] {NotoSansCJKsc}
+ \setmathfont[
+ Extension = .otf ,
+ Path = fonts/ ,
+ BoldFont = XITSMath-Bold ,
+ StylisticSet = 8] {XITSMath-Regular}
+}
+
+\bool_if:NT \l__xmu_overleaf_font_bool{
+ % \setmainfont{Noto~Serif}
+ % \setsansfont{Noto~Sans}
+ % \setmonofont{Noto~Mono}
+ \setCJKmainfont{Noto~Serif~CJK~SC}
+ \setCJKsansfont{Noto~Sans~CJK~SC}
+ \setCJKmonofont{Noto~Sans~Mono~CJK~SC}
+ % \setmathfont{XITSMath}
+}
+
+
+\RenewDocumentCommand\chaptermark{m}{\markboth{#1}{#1}}
+
+\fancyhf{} % cleans original header&footer
+\fancyhead[CE]{\zihao{-5} \l__xmu_title_tl}
+\fancyhead[CO]{\zihao{-5} \leftmark} %\leftmark \chaptermark
+\fancyfoot[C]{\thepage}
+
+\RenewDocumentCommand\headrulewidth{}{0pt}
+
+
+\ctexset{
+ today = big, % format date
+ chapter = {
+ format = \centering\zihao{-3}\sffamily,
+ beforeskip = -15pt,
+ afterskip = 30pt,
+ pagestyle = fancy,},%
+ section = {
+ format = \zihao{4}\sffamily,
+ beforeskip = 10pt,
+ afterskip = 10pt,
+ },
+ subsection = {
+ format = \zihao{4}\sffamily,
+ },
+}
+
+
+\newlistof{indice}{tce}{Table~of~Contents}
+
+\setlength{\cftbeforetcetitleskip}{-30pt}
+\setlength{\cftbeforechapskip}{8pt}
+\setlength{\cftbeforesecskip}{6pt}
+\setlength{\cftbeforesubsecskip}{4pt}
+\setlength{\cftbeforetoctitleskip}{-30pt}
+\setlength{\cftsecnumwidth}{3.2em}
+\setlength{\cftsubsecindent}{4.5em}
+\RenewDocumentCommand\cftchapleader{}{\cftdotfill{\cftdotsep}} % for chapters
+% Add \thispagestyle{plain} to the font setting
+% to force the pagestyle in toc always be plain,
+% or it maybe influence by my slfe-define \cleanrdoublepage
+\bool_if:NTF \l__xmu_undergraduate_bool{
+ \RenewDocumentCommand\cftchapfont{}{
+ \thispagestyle{plain}\zihao{4}\sffamily
+ }% Chapter font
+ \RenewDocumentCommand\cftsecfont{}{
+ \thispagestyle{plain}\zihao{-3}\sffamily
+ }% Section font
+ \RenewDocumentCommand\cftsubsecfont{}{
+ \thispagestyle{plain}\zihao{-3}\rmfamily
+ }%subsection font
+}{
+ \RenewDocumentCommand\cftchapfont{}{
+ \thispagestyle{plain}\zihao{4}\sffamily\bfseries
+ }% Chapter font
+ \RenewDocumentCommand\cftsecfont{}{
+ \thispagestyle{plain}\zihao{-4}\sffamily\bfseries
+ }% Section font
+ \RenewDocumentCommand\cftsubsecfont{}{
+ \thispagestyle{plain}\zihao{-4}\rmfamily
+ }%subsection font
+}
+
+% \RenewDocumentCommand\cfttoctitlefont{}
+% {\hfill\zihao{-3}\sffamily 目\quad 录\hfill}%\phantom{mmmmmmmmm}
+% \RenewDocumentCommand\cftaftertoctitle{}{\hfill}
+\RenewDocumentCommand\cfttoctitlefont{}{\hspace*{\fill}\zihao{-3}\sffamily}
+\RenewDocumentCommand\cftaftertoctitle{}{\hspace*{\fill}}
+% \RenewDocumentCommand\cfttcetitlefont{}{
+% \hfill\zihao{-3}\rmfamily\bfseries Table~of~Contents\hfill}%\phantom{mmmmmmm}
+% \RenewDocumentCommand\cftaftertcetitle{}{\hfill}
+\RenewDocumentCommand\cfttcetitlefont{}{\hspace*{\fill}\zihao{-3}\rmfamily\bfseries}
+\RenewDocumentCommand\cftaftertcetitle{}{\hspace*{\fill}}
+
+\let\oldappendix\appendix
+\bool_set_false:N \l__xmu_appendix_bool
+\RenewDocumentCommand\appendix{}{
+ \oldappendix
+ \bool_set_true:N \l__xmu_appendix_bool
+}
+
+\makeatletter
+\NewDocumentCommand\captce { m } {
+ \if@mainmatter
+ \bool_if:NTF \l__xmu_appendix_bool{
+ \addcontentsline{tce}{chapter}{
+ \rmfamily\bfseries \protect\makebox[5em][l]{Appendix~\thechapter}~\;\;#1}
+ }{
+ \addcontentsline{tce}{chapter}{
+ \rmfamily\bfseries \protect\makebox[5em][l]{Chapter~\thechapter}#1}
+ }
+ \else
+ \addcontentsline{tce}{chapter}{
+ \rmfamily\bfseries\protect\makebox[0em][l]{}#1}
+\fi
+}
+\makeatother
+
+\NewDocumentCommand\sectce { m } {
+ \addcontentsline{tce}{section}{
+ \rmfamily\bfseries\protect\makebox[2.3em][l]{\thesection}#1
+ }
+}
+
+\NewDocumentCommand\ssectce { m } {
+ \addcontentsline{tce}{subsection}{
+ \protect\makebox[2.3em][l]{\thesubsection}#1
+ }
+}
+
+
+\let\oldchapter\chapter
+\RenewDocumentCommand\chapter{ s m g }{
+ \IfBooleanTF {#1} {
+ \oldchapter*{#2}
+ \IfNoValueF {#3} {#3}
+ }{
+ \oldchapter{#2}
+ \IfNoValueF {#3} {
+ \captce{#3}
+ }
+ }
+}
+
+\let\oldsection\section
+\RenewDocumentCommand\section{ s m g }{
+ \IfBooleanTF {#1}{
+ \oldsection*{#2}
+ \IfNoValueF {#3} {#3}
+ }{
+ \oldsection{#2}
+ \IfNoValueF {#3} {
+ \sectce{#3}
+ }
+ }
+}
+
+\let\oldsubsection\subsection
+\RenewDocumentCommand\subsection{ s m g }{
+ \IfBooleanTF {#1}{
+ \oldsubsection*{#2}
+ \IfNoValueF {#3} {#3}
+ }{
+ \oldsubsection{#2}
+ \IfNoValueF {#3} {
+ \ssectce{#3}
+ }
+ }
+}
+
+\let\oldcleardoublepage\cleardoublepage
+\NewDocumentCommand\clearemptydoublepage{}{
+ \clearpage % don't delete it, even it's follewed by \cleardoublepage
+ % {\pagestyle{empty}\origdoublepage}
+ \thispagestyle{empty}\oldcleardoublepage
+}
+
+\let\cleardoublepage\clearemptydoublepage
+
+
+\NewDocumentCommand\xmutableofcontents{}{
+ \cleardoublepage
+ \bool_if:NTF \l__xmu_toc_toc_bool{
+ \addcontentsline{toc}{chapter}{\protect 目录}\captce{目录}
+ \tableofcontents
+ % \pagestyle{plain}
+ \cleardoublepage
+ \addcontentsline{toc}{chapter}{\protect Table~of~Contents}
+ \captce{Table~of~Contents}
+ \listofindice
+ % \pagestyle{plain}
+ }{
+ \tableofcontents
+ % \pagestyle{plain}
+ \cleardoublepage
+ \listofindice
+ % \pagestyle{plain}
+ }
+ \cleardoublepage
+ \mainmatter
+ \RenewDocumentCommand\headrulewidth{}{1pt}
+}
+
+\makeatother
+
+
+% --------------------------- resources settings ----------------------
+\graphicspath{{figs}{Figures/}{../Figures/}} %设定图片的存放路径
+
+% --------------------------- circled text settings ----------------------
+\NewDocumentCommand\circled { m } {
+ \raisebox{.5pt}{
+ \textcircled{\raisebox{-.9pt}{#1}}
+ }
+} % define a new command for circled text since \textcircled is very sloppy
+
+% --------------------------- endnotes settings ----------------------
+\RenewDocumentCommand\thefootnote{}{\protect\circled{\arabic{footnote}}}
+
+\NewDocumentCommand\somewords{}{
+ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxuy
+ \par
+ 中文字体
+ \par
+}
+
+\NewDocumentCommand\showfont{}{
+ {
+ \begin{center}
+ \textbf{字体展示}
+ \end{center}
+ \par
+ \( \hbar ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxuy \)
+ \par
+ % $ \symbf{\hbar ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxuy} $
+
+ \somewords
+
+ {\bfseries \somewords}
+
+ \itshape \somewords
+
+ \sffamily \somewords
+
+ \bfseries \somewords
+ % \newpage
+
+ \itshape \somewords
+
+ \ttfamily \somewords
+
+ \bfseries \somewords
+
+ \itshape \somewords
+ }
+}
+
+% --------------------------- code inserting settings ----------------------
+% required package(s):
+% - listings
+\def\lstbasicfont{\fontfamily{pcr}\selectfont\footnotesize}
+\lstset{%
+ numbers=left,
+ numberstyle=\tiny,
+ basicstyle=\small,
+ backgroundcolor=\color{white}, % choose the background color
+ basicstyle=\footnotesize\ttfamily, % size of fonts used for the code
+ columns=fullflexible,
+ tabsize=4,
+ breaklines=true, % automatic line breaking only at whitespace
+ captionpos=b, % sets the caption-position to bottom
+ commentstyle=\color{green}, % comment style
+ escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
+ keywordstyle=\color{blue}, % keyword style
+ stringstyle=\color{purple}\ttfamily, % string literal style
+ frame=single,
+ rulesepcolor=\color{red!20!green!20!blue!20},
+}
+\lstloadlanguages{C,C++,Java,Matlab,Mathematica} % supported languages
+
+% --------------------------- algorithm inserting settings ----------------------
+% required packages:
+% - algorithm
+% - algpseudocode[noend]
+\makeatletter
+\def\algbackskip{\hskip-\ALG@thistlm}
+%\def\BState{\State\hskip-\ALG@thistlm}
+% both works fine, but latter one redefines \BState
+\makeatother
+
+\DeclareDocumentCommand\maketitle{}{
+\frontmatter
+\pagestyle{empty}
+ \bool_if:NTF \l__xmu_undergraduate_bool{
+% \input{Settings/Contents/undergraduate-titlepage.tex}
+\begin{center}
+ \IfFileExists{figs/xmu-flag.pdf}{
+ \includegraphics[width=8cm]{xmu-flag}
+ }{\xmulogo[0.32]}
+ \par
+ \vspace{1ex}
+
+ {
+ \rmfamily\zihao{-2}\l__xmu_degree_tl
+ \quad 毕\quad 业\quad 论\quad 文\quad
+ (~设\quad 计~)\par\vspace{1ex}
+ }
+
+ {
+ \rmfamily\zihao{3}(\l__xmu_majorordouble_tl)\par
+ }
+
+ {
+ \sffamily\zihao{2}\l__xmu_title_tl \par\vspace{1ex}
+ }
+
+ {
+ \rmfamily\bfseries\zihao{3} \l__xmu_englishtitle_tl\par\vspace{3ex}
+ }
+
+
+ { \rmfamily \zihao{4}
+ \begin{tabular}{rl}
+ 姓 \qquad 名:& \l__xmu_author_tl \\
+ 学 \qquad 号:& \l__xmu_studentnumber_tl \\
+ 学 \qquad 院:& \l__xmu_department_tl \\
+ 专 \qquad 业:& \l__xmu_major_tl \\
+ 年 \qquad 级:& \l__xmu_class_tl \\
+ 校内指导教师:& \l__xmu_advisor_tl \\
+ 校外指导教师:& \l__xmu_otheradvisor_tl \\
+ \end{tabular}%
+ }
+ \vspace{2ex}
+ \rmfamily\zihao{4}
+ \par\vspace{4ex}
+ \l__xmu_date_tl
+ \vspace{2ex}
+\end{center}
+
+% \input{Settings/Contents/undergraduate-commitment.tex}
+\chapter*{厦门大学本科学位论文诚信承诺书}
+\setcounter{page}{1}
+
+{\fontsize{14pt}{21pt}\selectfont
+
+ 本人呈交的学位论文是在导师指导下独立完成的研究成果。
+ 本人在论文写作中参考其他个人或集体已经发表的研究成果,均在文中以适当方式明确标明,
+ 并符合相关法律规范及《厦门大学本科毕业论文(设计)规范》。
+ \par
+ 该学位论文为(\l__xmu_team_tl)课题(组)的研究成果,
+ 获得(\l__xmu_fundteam_tl)课题(组)经费或实验室的资助,
+ 在(\l__xmu_lab_tl)实验室完成。
+ (请在以上括号内填写课题或课题组负责人或
+ 实验室名称,未有此项声明内容的,可以不作特别声明。)
+ \par
+ 另外,本人承诺辅修专业毕业论文(设计)
+ (如有)的内容与主修专业不存在相同与相近情况。
+ \par
+ \vspace{30pt}
+
+ \hfill 学生声明(签名):\hspace*{4cm}
+ \par\vspace{2ex}
+ \hfill 年\hspace{26pt}月\hspace{26pt}日\hspace*{2cm}
+}
+
+ }{
+% \input{Settings/Contents/master-or-doctor-titlepage.tex}
+\begin{center}
+ {
+ \vspace*{-5ex}
+ % \raggedright
+ \rmfamily\bfseries\zihao{-4}
+ 学校编码:10384\hfill 分类号\CJKunderline{\l__xmu_classified_code_tl}
+ \quad 密级 \CJKunderline{\l__xmu_security_classification_tl}\par
+ 学号:\l__xmu_studentnumber_tl\hfill UDC\;
+ \CJKunderline{\l__xmu_UDC_tl}\par\vspace{6ex}
+ \centering\IfFileExists{figs/xmu-flag.pdf}{
+ \includegraphics[width=5cm]{xmu-flag}
+ }{\xmulogon[0.65]}\par\vspace{4ex}
+ }
+ {
+ \rmfamily\bfseries\zihao{-2}
+ \bool_if:NTF \l__xmu_master_bool{
+ 硕\quad 士\quad 学\quad 位\quad 论\quad 文
+ }{
+ 博\quad 士\quad 学\quad 位\quad 论\quad 文
+ }
+ \par\vspace{2ex}
+ }
+ {
+ \sffamily\bfseries\zihao{2}\l__xmu_title_tl\par\vspace{2ex}
+ }
+ {
+ \rmfamily\bfseries\zihao{3}\l__xmu_englishtitle_tl\par\vspace{2ex}
+ }
+ {
+ \ttfamily\zihao{-2}\l__xmu_author_tl\par\vspace{2ex}
+ }
+ {
+ \ttfamily\zihao{4}
+ \begin{tabular}{rl}
+ 指导教师姓名:& \l__xmu_advisor_tl \\
+ 专\hspace{0.66\ccwd} 业\hspace{0.66\ccwd} 名\hspace{0.66\ccwd} 称:
+ & \l__xmu_major_tl \\
+ 论文提交日期:& \l__xmu_submit_date_tl \\
+ 论文答辩时间:& \l__xmu_defense_date_tl \\
+ 学位授予日期:& \l__xmu_conferred_date_tl\\
+ \end{tabular}%
+ \par\vspace{1cm}
+ }
+ {
+ \zihao{4}
+ 答辩委员会主席:\l__xmu_chairman_tl\par
+ 评阅人:\l__xmu_referee_tl\par
+ \l__xmu_date_tl\par
+ }
+\end{center}
+
+% \input{Settings/Contents/Certification-statement.tex}
+\chapter*{厦门大学学位论文原创性声明}
+\setcounter{page}{1}
+% \fontsize{14pt}{21pt}\selectfont
+{
+\zihao{4}
+本人呈交的学位论文是本人在导师指导下,独立完成的研究成果。
+本人在论文写作中参考其他个人或集体已经发表的研究成果,
+均在文中以适当方式明确标明,并符合法律规范和《厦门大学研究生学术活动规范(试行)》。
+\par
+
+另外,该学位论文为(\l__xmu_team_tl)课题(组)的研究成果,
+获得(\l__xmu_fundteam_tl)课题(组)经费或实验室的资助,
+在(\l__xmu_lab_tl)实验室完成。
+(请在以上括号内填写课题或课题组负责人或实验室名称,
+未有此项声明内容的,可以不作特别声明。)
+\par
+
+本人声明该学位论文不存在剽窃、抄袭等学术不端行为,
+并愿意承担因学术不端行为所带来的一切后果和法律责任。
+\par
+
+\vspace{5ex}
+{
+ \raggedleft
+ 声明人\quad (签名):\phantom{六个字的空白}\par
+ 指导教师(签名):\phantom{六个字的空白}\par\vspace{5ex}
+
+ 年\qquad 月\qquad 日\phantom{这七个字的空白}\par
+}
+}
+% \input{Settings/Contents/Copyright-declaration.tex}
+\chapter*{厦门大学学位论文著作权使用声明}{}
+%
+{
+\zihao{4}
+% \fontsize{14pt}{21pt}\selectfont
+本人同意厦门大学根据《中华人民共和国学位条例暂行实施办法》
+等规定保留和使用此学位论文,
+并向主管部门或其指定机构送交学位论文(包括纸质版和电子版),
+允许学位论文进入厦门大学图书馆及其数据库被查阅、借阅。
+本人同意厦门大学将学位论文加入全国博士、硕士学位论文共建单位数据库进行检索,
+将学位论文的标题和摘要汇编出版,采用影印、缩印或者其它方式合理复制学位论文。
+\par
+
+本学位论文属于:\par
+
+(\qquad )1.经厦门大学保密委员会审查核定的涉密学位论文,
+于\qquad 年\qquad 月\qquad 日解密,解密后适用上述授权。\par
+
+(\qquad )2.不保密,适用上述授权。\par
+
+(请在以上相应括号内打“√”或填上相应内容。
+涉密学位论文应是已经厦门大学保密委员会审定过的学位论文,
+未经厦门大学保密委员会审定的学位论文均为公开学位论文。
+此声明栏不填写的,默认为公开学位论文,均适用上述授权。)\par
+
+\vspace{12ex}
+{
+ \raggedleft
+ 声明人(签名):\phantom{六个字的空白}\par
+ 年\qquad 月\qquad 日\phantom{这七个字的空白}\par
+}
+}
+ }
+\cleardoublepage
+}
+
+% --------------------------- reference settings ------------------------
+% required packages:
+% - cleveref
+% \crefname params:
+% first: type
+% second: singular cross reference
+% third: plural cross reference
+\RenewDocumentCommand\citep{m}{{\color{blue}\citeauthor{#1}(\citeyearpar{#1})}}
+\crefformat{figure}{#2图~#1#3}
+\crefrangeformat{figure}{图~(#3#1#4)\;$\sim$\;(#5#2#6)}
+\crefmultiformat{figure}{图~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)}
+
+\crefformat{table}{#2表#1#3}
+\crefrangeformat{table}{表(#3#1#4)\;$\sim$\;(#5#2#6)}
+\crefmultiformat{table}{表~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)}
+
+\crefformat{equation}{~(#2#1#3)}
+\crefrangeformat{equation}{~(#3#1#4)\;$\sim$\;(#5#2#6)}
+\crefmultiformat{equation}{~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)}
+% equation, chapter, section, etc.
+% \creflabelformat{htypei}{hformati}
+
+\bool_if:NT \l__xmu_toc_ref_bool{
+ \AddToHook{env/thebibliography/begin}{
+ \cleardoublepage % with \cleardoublepage will get the right page number
+ \addcontentsline{toc}{chapter}{\protect 参考文献}
+ % \captce{Reference}
+ \addcontentsline{tce}{chapter}{
+ \rmfamily\bfseries\protect\makebox[0em][l]{}Reference}
+ }
+}
+
+\AddToHook{env/thebibliography/end}{
+ \cleardoublepage
+}
+% --------------------------- equations&principles settings ------------------------
+% required packages:
+% - amsthm
+\newtheorem{theory}{定理}[section]
+\newtheorem{law}{定律}[section]
+\theoremstyle{definition}
+
+
+\NewDocumentEnvironment {abstract} { s }{
+ \bool_if:NTF \l__xmu_toc_abs_bool{
+ \IfBooleanTF {#1}{
+ \chapter*{摘要}
+ \addcontentsline{toc}{chapter}{\protect 摘要}
+ \captce{\bfseries 摘要}
+ }{
+ \chapter*{\bfseries Abstract}
+ \addcontentsline{toc}{chapter}{\protect Abstract}
+ \captce{\bfseries Abstract}
+ }
+ }{
+ \IfBooleanTF {#1}{
+ \chapter*{摘要}
+ }{
+ \chapter*{\bfseries Abstract}
+ }
+ }
+}{
+}
+
+%%============================关键词===========================%%
+
+%%关键词。
+
+\NewDocumentCommand\keywords { s m } {
+ \par\vspace{2ex}\noindent{\sffamily \bfseries
+ \IfBooleanTF {#1} {
+ 关键词:
+ }{
+ Keywords:~
+ }
+ } #2
+}
+
+
+\tl_new:N \l__xmu_author_tl
+\tl_new:N \l__xmu_title_tl
+\tl_new:N \l__xmu_date_tl
+\tl_new:N \l__xmu_class_tl
+\tl_new:N \l__xmu_studentnumber_tl
+\tl_new:N \l__xmu_department_tl
+\tl_new:N \l__xmu_major_tl
+\tl_new:N \l__xmu_advisor_tl
+\tl_new:N \l__xmu_otheradvisor_tl
+\tl_new:N \l__xmu_team_tl
+\tl_new:N \l__xmu_fundteam_tl
+\tl_new:N \l__xmu_degree_tl
+\tl_new:N \l__xmu_englishtitle_tl
+\tl_new:N \l__xmu_majorordouble_tl
+\tl_new:N \l__xmu_lab_tl
+\tl_new:N \l__xmu_classified_code_tl
+\tl_new:N \l__xmu_security_classification_tl
+\tl_new:N \l__xmu_UDC_tl
+\tl_new:N \l__xmu_submit_date_tl
+\tl_new:N \l__xmu_defense_date_tl
+\tl_new:N \l__xmu_conferred_date_tl
+\tl_new:N \l__xmu_chairman_tl
+\tl_new:N \l__xmu_referee_tl
+
+\keys_define:nn { xmu }{
+ author .tl_set:N = \l__xmu_author_tl ,
+ title .tl_set:N = \l__xmu_title_tl ,
+ date .tl_set:N = \l__xmu_date_tl ,
+ class .tl_set:N = \l__xmu_class_tl ,
+ studentnumber .tl_set:N = \l__xmu_studentnumber_tl ,
+ department .tl_set:N = \l__xmu_department_tl ,
+ major .tl_set:N = \l__xmu_major_tl ,
+ advisor .tl_set:N = \l__xmu_advisor_tl ,
+ otheradvisor .tl_set:N = \l__xmu_otheradvisor_tl ,
+ team .tl_set:N = \l__xmu_team_tl ,
+ fundteam .tl_set:N = \l__xmu_fundteam_tl ,
+ degree .tl_set:N = \l__xmu_degree_tl ,
+ englishtitle .tl_set:N = \l__xmu_englishtitle_tl ,
+ majorordouble .tl_set:N = \l__xmu_majorordouble_tl ,
+ lab .tl_set:N = \l__xmu_lab_tl ,
+ classified_code .tl_set:N = \l__xmu_classified_code_tl ,
+ security_classification .tl_set:N = \l__xmu_security_classification_tl ,
+ UDC .tl_set:N = \l__xmu_UDC_tl ,
+ submit_date .tl_set:N = \l__xmu_submit_date_tl ,
+ defense_date .tl_set:N = \l__xmu_defense_date_tl ,
+ conferred_date .tl_set:N = \l__xmu_conferred_date_tl ,
+ chairman .tl_set:N = \l__xmu_chairman_tl ,
+ referee .tl_set:N = \l__xmu_referee_tl ,
+}
+
+\NewDocumentCommand \xmusetup { m }{
+\keys_set:nn { xmu } { #1 }}
+
+% \end{macrocode}
+%</class>
+%<*logo>
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xmulogo}[2019/06/07 v0.4.1 xmulogo]
+
+\RequirePackage{xparse,tikz,xcolor}
+\usetikzlibrary{shapes,decorations.pathmorphing}%snakes
+
+\NewDocumentCommand\xmulogon{og}{%
+ \IfNoValueTF {#1}{
+ \IfNoValueTF {#2}{
+ \definecolor{xmucolor}{rgb}{0.09411765,0.15294118,0.30980393}
+ \begin{tikzpicture}[x=.5pt, y=.5pt]
+ \xmuxiamendaxue
+ \end{tikzpicture}
+ }{
+ \definecolor{xmucolor}{rgb}{#2}
+ \begin{tikzpicture}[x=.5pt, y=.5pt]
+ \xmuxiamendaxue
+ \end{tikzpicture}
+ }
+ }{
+ \IfNoValueTF {#2}{
+ \definecolor{xmucolor}{rgb}{0.09411765,0.15294118,0.30980393}
+ \begin{tikzpicture}[x=.5pt, y=.5pt,scale=#1]
+ \xmuxiamendaxue
+ \end{tikzpicture}
+ }{
+ \definecolor{xmucolor}{rgb}{#2}
+ \begin{tikzpicture}[x=.5pt, y=.5pt,scale=#1]
+ \xmuxiamendaxue
+ \end{tikzpicture}
+ }
+ }
+}
+
+\NewDocumentCommand\xmulogo{og}{%
+ \IfNoValueTF {#1}{
+ \IfNoValueTF {#2}{
+ \definecolor{xmucolor}{rgb}{0.09411765,0.15294118,0.30980393}
+ \resizebox{\textwidth}{!}{%
+ \begin{tikzpicture}[x=.5pt, y=.5pt,scale=0.85]
+ \begin{scope}
+ \xmumainpart
+ \end{scope}
+ \begin{scope}[xshift=4.6cm,yshift=5.1cm]
+ \begin{scope}[x=.5pt,y=.5pt,xscale=-1,xshift=-9.5cm]
+ \xmuleftpart
+ \end{scope}
+ \begin{scope}[x=.5pt, y=.5pt,xscale=1]
+ \xmuleftpart
+ \end{scope}
+ \end{scope}
+ \end{tikzpicture}}
+ }{
+ \definecolor{xmucolor}{rgb}{#2}
+ \resizebox{\textwidth}{!}{%
+ \begin{tikzpicture}[x=.5pt, y=.5pt,scale=0.85]
+ \begin{scope}
+ \xmumainpart
+ \end{scope}
+ \begin{scope}[xshift=4.6cm,yshift=5.1cm]
+ \begin{scope}[x=.5pt,y=.5pt,xscale=-1,xshift=-9.5cm]
+ \xmuleftpart
+ \end{scope}
+ \begin{scope}[x=.5pt, y=.5pt,xscale=1]
+ \xmuleftpart
+ \end{scope}
+ \end{scope}
+ \end{tikzpicture}}
+ }
+ }{
+ \IfNoValueTF {#2}{
+ \definecolor{xmucolor}{rgb}{0.09411765,0.15294118,0.30980393}
+ \resizebox{#1\textwidth}{!}{%
+ \begin{tikzpicture}[x=.5pt, y=.5pt,scale=0.85]
+ \begin{scope}
+ \xmumainpart
+ \end{scope}
+ \begin{scope}[xshift=4.6cm,yshift=5.1cm]
+ \begin{scope}[x=.5pt,y=.5pt,xscale=-1,xshift=-9.5cm]
+ \xmuleftpart
+ \end{scope}
+ \begin{scope}[x=.5pt, y=.5pt,xscale=1]
+ \xmuleftpart
+ \end{scope}
+ \end{scope}
+ \end{tikzpicture}}
+ }{
+ \definecolor{xmucolor}{rgb}{#2}
+ \resizebox{#1\textwidth}{!}{%
+ \begin{tikzpicture}[x=.5pt, y=.5pt,scale=0.85]
+ \begin{scope}
+ \xmumainpart
+ \end{scope}
+ \begin{scope}[xshift=4.6cm,yshift=5.1cm]
+ \begin{scope}[x=.5pt,y=.5pt,xscale=-1,xshift=-9.5cm]
+ \xmuleftpart
+ \end{scope}
+ \begin{scope}[x=.5pt, y=.5pt,xscale=1]
+ \xmuleftpart
+ \end{scope}
+ \end{scope}
+ \end{tikzpicture}}
+ }
+ }
+}
+
+
+
+\def \xmulineto(#1,#2)
+(#3,#4)(#5,#6){%
+.. controls (#1,#2) and (#3,#4) .. (#5,#6)}
+
+\def\xmuleftpart{\fill[xmucolor]
+(-198.87168726,580.82143114)
+--(-198.87168726,574.47209795)
+(291.27710014,259.09130201)
+--(291.27710014,252.74196881)
+(420.60109729,87.27663913)
+--(420.60109729,87.27663913)
+(420.32509729,8.74074753)
+--cycle
+(420.59576396,87.27663913)
+--(420.59576396,87.27663913)
+--(428.85176377,85.6511725)
+--(420.60109729,87.27663913)
+--cycle
+(420.32509729,8.74074753)
+ \xmulineto(420.32509729,8.74074753)
+(424.27309721,28.74597375)(423.22109723,40.49544016)
+ \xmulineto(422.13843059,52.61517323)
+(420.1490973,64.76570629)(421.77309726,73.11517277)
+ \xmulineto(422.89843057,78.94850598)
+(425.67976384,81.1203726)(428.85176377,85.6511725)
+--(420.60109729,87.27663913)
+--(420.32509729,8.74074753)
+--cycle
+(53.62270538,252.91263548)
+ \xmulineto(56.10657199,256.54196873)
+(58.5492386,260.18863532)(60.94510522,263.8753019)
+ \xmulineto(60.0653719,271.4899684)
+(48.24763883,277.57396827)(34.97163912,277.57396827)
+ \xmulineto(21.16910609,277.57396827)
+(8.92946636,271.00063508)(8.92946636,262.95930192)
+ \xmulineto(8.92946636,259.15130201)
+(11.6851863,255.68330208)(16.04403954,253.06863547)
+ \xmulineto(17.63310617,252.40730215)
+(19.21070614,252.0166355)(20.78937277,251.8806355)
+--(51.27323876,251.8806355)
+ \xmulineto(52.23723874,251.8806355)
+(52.76283873,252.42730215)(53.62270538,252.91263548)
+--cycle
+(20.78937277,213.09930302)
+ \xmulineto(27.47163929,220.41663619)
+(34.55443913,227.48996937)(40.456039,234.97930254)
+ \xmulineto(43.29977227,238.59396913)
+(46.04923888,242.25530238)(48.72110549,245.9593023)
+--(20.78937277,245.9593023)
+--cycle
+(19.82523946,146.78197115)
+ \xmulineto(33.26803916,131.44330482)
+(50.47163878,116.62037181)(52.20083874,95.11517229)
+ \xmulineto(52.24243874,91.41263904)
+(51.20083877,66.39650626)(53.42523872,64.12610631)
+ \xmulineto(54.44510536,63.09383966)
+(56.39870532,62.00583969)(59.51857192,63.67823965)
+ \xmulineto(59.51857192,63.67823965)
+(65.15337179,67.74077289)(71.29977166,70.85530616)
+ \xmulineto(71.14350499,76.00583938)
+(70.76803833,87.85530578)(70.16377168,100.67823883)
+ \xmulineto(69.68523836,110.83397194)
+(65.73723845,123.07410501)(59.46643858,132.21943814)
+ \xmulineto(53.81590538,140.45930462)
+(52.19563874,151.74997104)(53.21590539,161.33930416)
+ \xmulineto(53.21590539,161.33930416)
+(36.62270575,149.64597109)(19.82523946,146.78197115)
+--cycle
+(56.84097198,174.67797053)
+ \xmulineto(56.87737197,177.77663713)
+(57.07057197,193.69263678)(57.4503053,201.95396993)
+ \xmulineto(57.83577195,210.16196975)
+(62.90910517,217.86996958)(66.37217177,225.88596941)
+ \xmulineto(68.89297171,231.73530261)
+(70.00243835,237.78196914)(70.61177167,244.28730233)
+ \xmulineto(71.32523832,252.0366355)
+(71.10137166,260.37530198)(71.10137166,269.43263511)
+ \xmulineto(71.10137166,269.43263511)
+(59.10657193,249.45930222)(41.74763897,227.54196937)
+ \xmulineto(32.8409725,216.29263628)
+(19.12270614,204.34996988)(11.85185297,192.63130347)
+ \xmulineto(7.57061306,185.71397029)
+(2.64821317,172.95397057)(8.60654637,162.05797081)
+ \xmulineto(10.33570633,158.91263755)
+(12.42529295,155.88063762)(14.74763957,152.89663768)
+--(14.59617291,153.19797101)
+ \xmulineto(14.59617291,153.19797101)
+(40.08617234,152.96463768)(56.84097198,174.67797053)
+--cycle
+(120.80497056,8.74074753)
+ \xmulineto(116.66377066,17.00584068)
+(116.86230399,28.74597375)(117.91430396,40.49544016)
+ \xmulineto(118.99710394,52.61517323)
+(120.98150389,64.76570629)(119.36230393,73.11517277)
+ \xmulineto(118.23203729,78.94850598)
+(115.45603735,81.1203726)(112.28363742,85.6511725)
+ \xmulineto(104.60657092,96.64077226)
+(100.10657102,111.1886386)(108.87737083,122.37517169)
+ \xmulineto(114.5861707,129.66730486)
+(122.55443719,135.97930472)(122.60657053,143.38597122)
+ \xmulineto(122.66910386,151.78730437)
+(120.42523724,169.09397066)(101.42523766,173.05263724)
+--(61.01857188,173.24997057)
+ \xmulineto(59.36750525,165.95930406)
+(57.68003862,147.75530446)(61.50243854,141.22463794)
+ \xmulineto(67.60657174,130.7927715)
+(75.3675049,117.82357179)(76.22630488,102.3178388)
+--(76.9664382,73.31783944)
+ \xmulineto(77.36230486,73.4537061)
+(77.75857151,73.5793061)(78.14923817,73.69277276)
+ \xmulineto(78.14923817,73.69277276)
+(89.55443792,78.02983933)(95.27323779,66.21423959)
+ \xmulineto(99.09150438,58.31783977)
+(99.23723771,48.08863999)(102.03417098,39.47930685)
+ \xmulineto(104.47683759,31.94330701)
+(108.49190417,23.7553072)(113.3148374,17.43810733)
+ \xmulineto(114.8877707,15.37517405)
+(119.1533706,9.44334751)(120.80497056,8.74074753)
+--cycle
+(407.39309758,7.93814754)
+ \xmulineto(410.39843085,6.9537609)
+(413.60643078,6.7980409)(414.95576408,11.60481413)
+ \xmulineto(421.16376394,28.91677375)
+(413.78909744,50.59903994)(414.43976409,67.93237289)
+ \xmulineto(414.61709742,72.56317279)
+(415.37176407,76.88610602)(417.11176403,80.71943927)
+ \xmulineto(316.64376625,103.43810544)
+(224.81576827,103.42197211)(124.02377049,80.71943927)
+ \xmulineto(125.75817046,76.88610602)
+(126.51857044,72.56317279)(126.6904371,67.93237289)
+ \xmulineto(127.34670375,50.59903994)
+(119.97163725,28.91677375)(126.18003711,11.60481413)
+ \xmulineto(127.52897042,6.7980409)
+(130.73723701,6.9537609)(133.74243695,7.93814754)
+ \xmulineto(220.88243503,31.76050702)
+(320.28376617,31.75010702)(407.39309758,7.93814754)
+--cycle
+(420.60109729,87.27663913)
+ \xmulineto(428.85176377,85.6511725)
+(420.60109729,87.27663913)(420.60109729,87.27663913)
+--(420.60109729,87.27663913)
+--(420.32509729,8.74074753)
+ \xmulineto(420.32509729,8.74074753)
+(412.60109746,-0.36342161)(408.22643089,0.89126637)
+ \xmulineto(321.15843281,25.75530715)
+(219.94510171,25.74597382)(132.90910363,0.89126637)
+ \xmulineto(128.53417039,-0.36342161)
+(125.10657047,-0.18217094)(122.15857054,0.74595304)
+ \xmulineto(119.20550393,1.66730768)
+(116.72630399,3.33918765)(113.93470405,6.52200091)
+ \xmulineto(110.0237708,10.96470748)
+(105.28937091,17.36464067)(101.16910433,25.81784048)
+ \xmulineto(96.84150443,34.68344029)
+(94.23203782,44.04184008)(92.61177119,53.49543987)
+ \xmulineto(91.53883788,59.7553064)
+(89.57577125,66.0886396)(83.1065714,67.80330622)
+ \xmulineto(75.71590489,69.74597285)
+(65.01337179,58.41263976)(56.98670531,56.74077313)
+ \xmulineto(53.17430539,55.94330649)
+(49.44510547,56.69650647)(47.52377218,60.45943972)
+ \xmulineto(46.5133722,62.43237301)
+(46.55963887,65.86050627)(46.33577221,69.86050618)
+ \xmulineto(45.82523888,78.67250598)
+(46.12270554,90.26050573)(46.02377221,95.27143895)
+ \xmulineto(45.55963889,120.2298384)
+(4.97685312,143.90197121)(0.54404388,167.95397068)
+ \xmulineto(-1.20543475,177.46463714)
+(1.40914653,186.7553036)(6.31018642,194.70330343)
+ \xmulineto(8.59195971,198.40730334)
+(11.23727965,201.95930327)(14.07577292,205.41263652)
+--(14.08097292,205.47396986)
+--(14.08097292,247.66196893)
+ \xmulineto(7.2107064,251.36996884)
+(2.8305065,256.84996872)(2.8305065,262.95930192)
+ \xmulineto(2.8305065,274.07396834)
+(17.26283951,283.14596814)(34.97163912,283.14596814)
+ \xmulineto(48.64350549,283.14596814)
+(60.3721719,277.74063493)(64.99710513,270.1566351)
+ \xmulineto(68.69563838,275.9539683)
+(72.36750497,281.82330151)(76.06537155,287.74596804)
+--(76.34150488,287.74596804)
+--(77.01337153,247.2926356)
+ \xmulineto(77.13830486,239.7139691)
+(75.4919049,232.43796926)(72.66377163,225.62063608)
+ \xmulineto(68.76803838,216.27130295)
+(63.3252385,207.48996981)(63.57057183,197.33397004)
+--(63.73723849,180.44330374)
+--(96.19043777,180.44330374)
+ \xmulineto(109.23723749,180.44330374)
+(123.00763718,171.01130395)(127.34670375,157.02197092)
+ \xmulineto(129.52377037,149.98997108)
+(130.22110369,142.98997123)(128.54923706,138.69797133)
+ \xmulineto(126.34150378,133.04183812)
+(122.56537053,128.17823823)(118.70083728,123.58863833)
+ \xmulineto(115.06537069,119.27143842)
+(111.26283744,115.30330518)(111.32003744,107.93237201)
+ \xmulineto(111.36230411,101.72463881)
+(113.58617072,94.83917229)(120.6279039,87.11517247)
+ \xmulineto(228.1637682,110.40743862)
+(311.89843302,110.50583862)(420.59576396,87.27663913)
+--(420.60109729,87.27663913);}
+
+\def\xmumainpart{\fill[xmucolor]
+(619.15065115,982.09336173)
+ \xmulineto(618.69731782,982.04669506)
+(618.1879845,981.79736174)(617.70798451,981.41602841)
+ \xmulineto(617.18265119,980.96402842)
+(617.17198452,980.06269511)(617.62531785,978.79736181)
+ \xmulineto(618.10931784,975.17202857)
+(618.1039845,971.66669532)(617.62531785,968.29736207)
+ \xmulineto(617.52131785,965.45336214)
+(616.89598453,961.71336223)(615.67731789,957.12536234)
+ \xmulineto(611.49465132,941.1880294)
+(607.5466514,928.94269637)(603.91198482,920.29736325)
+ \xmulineto(600.82798488,911.81203013)
+(596.78665164,903.754697)(591.63598509,896.25469718)
+ \xmulineto(589.91731846,893.87469724)
+(588.96931848,891.5466973)(588.84398515,889.31203069)
+ \xmulineto(588.78665182,885.53069745)
+(589.12531848,882.77069751)(589.85998513,881.10403089)
+ \xmulineto(590.68798511,879.33336427)
+(591.79731842,879.03603094)(593.16131839,880.17203091)
+ \xmulineto(595.01598501,881.19736422)
+(596.68798498,883.19736417)(598.15598494,886.18269743)
+ \xmulineto(601.4893182,892.32269728)
+(604.24531814,898.93203045)(606.45331809,905.82269694)
+ \xmulineto(609.0519847,914.44803006)
+(611.68265131,922.96402985)(614.32265125,931.47336298)
+ \xmulineto(615.02131791,933.86002959)
+(615.69731789,936.22936286)(616.35465121,938.50002947)
+ \xmulineto(616.74531787,938.38536281)
+(617.13065119,938.27602948)(617.62531785,938.24536281)
+ \xmulineto(621.10931777,938.16136281)
+(626.55731765,937.40669616)(633.96398415,935.8746962)
+ \xmulineto(633.95331749,935.48402955)
+(634.20265082,934.72402956)(634.63998414,933.67202959)
+ \xmulineto(635.88531745,930.12002968)
+(637.83865074,929.35469636)(640.48398401,931.39069631)
+ \xmulineto(642.51598397,932.74936295)
+(643.86931727,934.41202957)(644.54665059,936.38002952)
+ \xmulineto(646.27065055,941.25069607)
+(648.13065051,946.33336261)(650.13065046,951.53602915)
+ \xmulineto(651.86931709,956.0826957)
+(654.09331704,959.60936228)(656.90665031,962.20269555)
+ \xmulineto(658.64531694,963.57869552)
+(659.09331693,965.20802881)(658.17198362,967.02669543)
+ \xmulineto(656.78131698,968.96402872)
+(654.83331703,971.13069533)(652.41598375,973.46402861)
+ \xmulineto(651.05198378,974.48936192)
+(649.56265048,974.82802857)(647.93198385,974.56269525)
+ \xmulineto(641.27598399,974.02669526)
+(634.37998414,974.08802859)(627.2759843,974.81736191)
+ \xmulineto(627.19731764,974.92136191)
+(627.06265097,975.13602857)(626.85465098,975.40669523)
+ \xmulineto(625.04131768,978.09869516)
+(622.8599844,980.23469511)(620.41598445,981.75469507)
+ \xmulineto(619.9893178,982.04136173)
+(619.60398447,982.14536173)(619.15065115,982.09336173)
+-- cycle
+(674.59864992,973.54669527)
+ \xmulineto(674.32798326,973.59869527)
+(674.04664994,973.57336194)(673.74931661,973.46402861)
+ \xmulineto(672.98398329,973.26536195)
+(672.7759833,972.43736197)(673.07331663,971.005362)
+ \xmulineto(673.67198328,967.32269543)
+(673.55198328,963.37469552)(672.73464997,959.06802896)
+ \xmulineto(671.33865,952.86936245)
+(669.5933167,946.65069594)(667.48398342,940.44802942)
+ \xmulineto(666.5626501,937.5160295)
+(666.25998344,934.41602957)(666.55731677,931.13602965)
+ \xmulineto(666.8026501,928.78669638)
+(667.29198342,927.22402975)(668.07865007,926.39602977)
+ \xmulineto(669.42665004,925.2920298)
+(670.63998335,926.03069645)(671.80264999,928.67736305)
+ \xmulineto(671.88531665,928.96936304)
+(671.99998332,929.16136304)(672.05731665,929.35469636)
+ \xmulineto(672.7079833,929.0680297)
+(673.59331661,928.83336304)(674.76531659,928.59336305)
+ \xmulineto(679.37464982,928.19336306)
+(686.53064966,926.74536309)(696.09864945,924.19336316)
+ \xmulineto(689.94264959,901.41203039)
+(684.15598305,882.38003086)(678.7453165,867.2186979)
+ \xmulineto(677.90664985,864.66136463)
+(676.96398321,862.91736467)(675.95331656,861.96936469)
+ \xmulineto(675.22931658,861.5733647)
+(673.98398327,861.9213647)(672.31198331,862.90136467)
+ \xmulineto(669.89598336,864.22936464)
+(667.58398341,865.54136461)(665.1973168,866.96403124)
+ \xmulineto(663.39065017,868.20269787)
+(662.32798353,868.36936454)(662.1506502,867.39069789)
+ \xmulineto(666.16131678,860.86936472)
+(669.20265004,855.37469819)(671.20798333,850.88003163)
+ \xmulineto(671.84931665,848.53603169)
+(672.93198329,846.91203173)(674.42664993,846.05736509)
+ \xmulineto(675.27064991,845.41203177)
+(676.18798322,845.40669844)(677.21864987,846.14003175)
+ \xmulineto(678.87998316,847.21869839)
+(681.04131645,849.01069835)(683.65598306,851.55736495)
+ \xmulineto(685.63998301,853.86403156)
+(687.00531632,856.65069816)(687.71864964,859.85469808)
+ \xmulineto(692.44264953,880.89069756)
+(699.56264937,908.13603022)(709.0519825,941.71336273)
+ \xmulineto(710.63064913,947.55202925)
+(712.46398242,951.60402915)(714.55198238,953.90669576)
+ \xmulineto(716.31731567,955.35469572)
+(716.734649,956.89069568)(715.82264902,958.39069565)
+ \xmulineto(714.24531572,960.80669559)
+(711.82798244,963.31736219)(708.45864918,965.92669546)
+ \xmulineto(706.85464921,967.13069543)
+(705.16664925,967.60936209)(703.46398262,967.36402876)
+ \xmulineto(699.08264939,966.46402878)
+(695.63064946,966.03069546)(693.13598285,966.01069546)
+ \xmulineto(690.29198291,966.12002879)
+(686.21864967,966.51602878)(680.94798312,967.1973621)
+ \xmulineto(679.37998315,969.63069537)
+(677.49998319,971.57869532)(675.35998324,973.12536195)
+ \xmulineto(675.10931658,973.35469528)
+(674.86398325,973.49469527)(674.59864992,973.54669527)
+-- cycle
+(629.13998426,970.58402868)
+ \xmulineto(632.92131751,970.41202868)
+(636.15598411,970.20269536)(638.78665071,970.07336202)
+ \xmulineto(642.5733173,969.90669536)
+(644.96931724,969.26002871)(646.06798389,968.13069541)
+ \xmulineto(646.74931721,967.29736209)
+(646.65065054,965.53069547)(645.72931723,962.70802887)
+ \xmulineto(642.99998395,954.72402907)
+(640.39598401,947.37469592)(637.85998407,940.78669608)
+ \xmulineto(637.51065074,939.86002944)
+(637.07865075,939.13069612)(636.50531743,938.58402947)
+ \xmulineto(636.03065078,939.43202945)
+(635.18798413,940.45336276)(633.96398415,941.63069606)
+ \xmulineto(632.73998418,942.6933627)
+(630.68798423,943.21869602)(627.78665096,943.24002935)
+ \xmulineto(624.29198437,943.21869602)
+(620.92131777,943.17202936)(617.79731784,943.15602936)
+ \xmulineto(618.89065115,946.95869593)
+(620.03598446,950.36936251)(621.1826511,953.22936244)
+ \xmulineto(626.11998433,952.83869578)
+(630.4586509,952.3226958)(634.13598415,951.79202914)
+ \xmulineto(636.39065077,951.74936248)
+(637.15065075,952.41202913)(636.50531743,953.74002909)
+ \xmulineto(635.91198411,955.25469572)
+(634.49465081,956.47869569)(632.18798419,957.464029)
+ \xmulineto(630.11465091,958.16669565)
+(627.1199843,958.42136231)(623.13065106,958.22402898)
+ \xmulineto(623.02665106,958.15069565)
+(622.91731773,958.12536232)(622.7919844,958.05202899)
+ \xmulineto(624.91198435,964.04136217)
+(626.52131765,968.16669541)(627.69731763,970.50002868)
+ \xmulineto(628.11998428,970.47869535)
+(628.61998427,970.52136201)(629.13998426,970.58402868)
+-- cycle
+(364.2599901,964.1506955)
+ \xmulineto(362.45332347,963.97869551)
+(360.92132351,963.36002886)(359.6879902,962.36936222)
+ \xmulineto(357.71865691,960.74936226)
+(358.01599024,959.36936229)(360.53599018,958.14002899)
+ \xmulineto(364.82799009,956.06802904)
+(367.57865669,953.31202911)(368.74532333,949.92669586)
+ \xmulineto(372.82265658,938.30669614)
+(375.97865651,927.96402973)(378.14532313,918.94269662)
+ \xmulineto(368.90665666,913.74536342)
+(359.08799021,908.30669688)(348.68265711,902.52136369)
+ \xmulineto(346.54665716,901.38536372)
+(346.65599049,900.22936375)(349.02132377,899.13603044)
+ \xmulineto(350.93199039,898.44803046)
+(352.95865702,898.13603047)(355.03065697,898.20269713)
+ \xmulineto(357.40132358,898.59336379)
+(359.28665688,899.29203044)(360.70265685,900.31736375)
+ \xmulineto(366.29199006,904.55736364)
+(372.63065658,908.63603021)(379.58398976,912.51069678)
+ \xmulineto(379.77598976,911.63603013)
+(379.96398975,910.71869682)(380.08798975,909.71869685)
+ \xmulineto(382.20265637,899.60403043)
+(382.4999897,890.40669733)(381.02132306,882.12003086)
+ \xmulineto(380.26532308,876.10403101)
+(378.34932312,870.03603116)(375.18265653,863.91736465)
+ \xmulineto(372.43732325,857.91203146)
+(367.25999003,850.31203165)(359.6039902,841.06269854)
+ \xmulineto(358.4426569,839.90669857)
+(357.75465691,839.01069859)(357.65599025,838.43736527)
+ \xmulineto(357.30265692,837.5933653)
+(358.0826569,837.3853653)(360.02665686,837.84403196)
+ \xmulineto(361.51599016,838.35469861)
+(364.86399009,840.89069855)(369.93198998,845.38003177)
+ \xmulineto(373.56265656,848.51069836)
+(377.62532314,853.4893649)(382.11998971,860.2760314)
+ \xmulineto(385.46932297,865.54669794)
+(387.79732291,871.0266978)(389.14532288,876.86936433)
+ \xmulineto(390.73998952,883.50003083)
+(391.18798951,891.2706973)(390.41598952,900.15069708)
+ \xmulineto(390.1826562,901.76003038)
+(389.99998953,903.406697)(389.8226562,905.14536363)
+ \xmulineto(393.06798947,902.1453637)
+(399.91198931,896.58403051)(410.47865575,888.46936404)
+ \xmulineto(422.08798883,879.74003092)
+(431.93198861,873.26003108)(439.8546551,868.82803119)
+ \xmulineto(443.56798835,866.55736458)
+(446.71332162,865.80669793)(449.33865489,866.71336458)
+ \xmulineto(456.82798806,869.94269783)
+(463.93732124,872.88003109)(470.58398776,875.59869769)
+ \xmulineto(473.46398769,876.69336433)
+(474.817321,877.65069764)(474.56265434,878.39603096)
+ \xmulineto(474.35998767,879.29736427)
+(472.43198772,879.90136425)(468.80665446,880.33869757)
+ \xmulineto(464.15065456,880.73469756)
+(459.24532134,881.12536422)(454.07865479,881.44269755)
+ \xmulineto(447.92665492,881.63603088)
+(442.8693217,882.43203086)(438.92132179,883.81203082)
+ \xmulineto(433.61998857,885.45336411)
+(425.89065541,889.14536402)(415.7293223,894.90136388)
+
+ \xmulineto(404.32265588,901.16136373)
+(395.34932275,906.64003026)(388.80665623,911.32269681)
+ \xmulineto(388.5573229,913.22936343)
+(388.23465624,915.10936338)(387.87998958,917.08269667)
+ \xmulineto(396.44798939,921.72936322)
+(408.06798913,927.05202975)(422.67198881,932.91202961)
+ \xmulineto(424.91198876,933.68269626)
+(427.06798872,934.4733629)(429.10398867,935.28136288)
+ \xmulineto(431.13998863,936.09336286)
+(432.1879886,936.97869618)(432.32265527,938.07869615)
+ \xmulineto(432.28665527,939.43736278)
+(431.19732196,940.57336275)(429.02132201,941.37469607)
+ \xmulineto(425.20265542,942.38002938)
+(422.00532216,942.80269603)(419.45332222,942.6453627)
+ \xmulineto(417.28132226,942.54669604)
+(415.31198897,941.81736272)(413.44265568,940.53069609)
+ \xmulineto(406.91732249,936.29736286)
+(397.90665603,930.70802966)(386.52665628,923.8546965)
+ \xmulineto(385.4946563,927.69736307)
+(384.46932299,931.53602964)(383.39065635,935.28136288)
+ \xmulineto(382.38532303,938.51602947)
+(381.57865639,941.45869606)(380.93732307,944.17202933)
+ \xmulineto(379.5413231,948.52669589)
+(378.77598978,953.57869577)(378.73465645,959.24002896)
+ \xmulineto(378.86398978,960.65602892)
+(378.31198979,961.6200289)(376.95865649,962.20269555)
+ \xmulineto(374.30265655,963.28136219)
+(370.72932329,963.90669551)(366.20799006,964.1506955)
+ \xmulineto(365.54132341,964.1826955)
+(364.86399009,964.2026955)(364.2599901,964.1506955)
+-- cycle
+(681.45331644,962.12002889)
+ \xmulineto(682.16131642,962.02136222)
+(683.05198307,961.95336223)(684.07864972,961.94802889)
+ \xmulineto(689.3066496,961.46936224)
+(694.50531615,961.18269558)(699.7399827,961.01602892)
+ \xmulineto(701.94798266,960.80269559)
+(703.10398263,960.09336227)(703.29198263,958.9013623)
+ \xmulineto(703.48398262,956.36402903)
+(703.32798262,953.29202911)(702.70264931,949.6720292)
+ \xmulineto(700.90131601,942.34402938)
+(699.00531605,935.24536288)(697.11464943,928.33869639)
+ \xmulineto(696.66664944,928.89602971)
+(696.12531612,929.58402969)(695.50531613,930.36936301)
+ \xmulineto(694.27064949,931.76536297)
+(692.13064954,932.54669628)(688.98931627,932.74536295)
+ \xmulineto(683.3853164,933.01069627)
+(678.23998318,933.46936293)(673.58398328,934.18269624)
+ \xmulineto(673.84931661,935.45336288)
+(674.13064994,936.86002951)(674.34398326,938.32802948)
+ \xmulineto(675.00531658,940.62002942)
+(675.69331657,943.12002936)(676.45864988,945.78136262)
+ \xmulineto(676.55731655,945.74936263)
+(676.81198321,945.66136263)(677.30664987,945.52669596)
+ \xmulineto(683.1973164,944.54136266)
+(688.28664962,943.69336268)(692.5413162,943.07336269)
+ \xmulineto(694.74931615,942.85469603)
+(695.70264946,943.47336268)(695.25064947,944.84936265)
+ \xmulineto(694.66131615,946.36936261)
+(693.28131618,947.60402925)(691.10398289,948.65602922)
+ \xmulineto(689.08264961,949.53069587)
+(686.05198301,949.98936252)(682.04664976,950.01069585)
+ \xmulineto(680.4426498,949.84936252)
+(678.9733165,949.64536253)(677.55731653,949.42136253)
+ \xmulineto(678.91198316,954.09869575)
+(680.17731647,958.36402898)(681.45331644,962.12002889)
+-- cycle
+(870.56797894,836.57336532)
+ \xmulineto(869.73997896,836.63603199)
+(869.0413123,836.16136533)(868.45331232,835.13603202)
+ \xmulineto(867.23464568,831.75469877)
+(864.29197908,828.53069885)(859.56264585,825.48403226)
+ \xmulineto(840.73464626,813.92669921)
+(825.73997993,806.43736606)(814.61464684,803.05203282)
+-- (813.42664686,802.71336616)
+ \xmulineto(802.8066471,799.70269956)
+(789.85998072,797.80669961)(774.65598105,797.0413663)
+ \xmulineto(773.82264774,797.09869963)
+(773.07331442,797.0213663)(772.45331443,796.78669964)
+ \xmulineto(771.42131446,796.36003298)
+(771.33864779,795.71869966)(772.20264777,795.01069968)
+ \xmulineto(774.57864772,792.70803307)
+(782.83331421,792.01603309)(797.00531389,792.80669973)
+ \xmulineto(800.23464715,793.16669973)
+(803.68798041,793.60936638)(807.33331367,794.16136637)
+ \xmulineto(823.24531331,797.47869962)
+(839.56264629,804.10403279)(856.25997925,813.97336588)
+ \xmulineto(861.17197914,816.92669914)
+(866.55197903,819.55736574)(872.3439789,821.92669902)
+ \xmulineto(873.28664554,819.13069908)
+(876.8119788,814.59336586)(882.92664533,808.30269935)
+ \xmulineto(890.10931184,801.32803286)
+(897.42131168,794.08803304)(904.85464485,786.63069989)
+ \xmulineto(909.17197809,782.61469999)
+(911.85997803,780.48936671)(912.97864467,780.19336671)
+ \xmulineto(913.97331131,779.91736672)
+(914.63997797,780.15070005)(915.01064462,780.8693667)
+ \xmulineto(915.56264461,781.95336667)
+(915.39064462,783.59336663)(914.5053113,785.86403324)
+ \xmulineto(913.50531132,788.28136651)
+(909.36397808,792.31203308)(901.97331158,797.88536628)
+ \xmulineto(890.25064517,808.25469935)
+(881.20264537,817.22403247)(874.96931217,824.89069894)
+ \xmulineto(874.75464551,825.18269894)
+(874.48397885,825.4693656)(874.12531219,825.65603226)
+ \xmulineto(874.37997885,831.25069879)
+(873.53597887,834.7866987)(871.49997892,836.32269866)
+ \xmulineto(871.19731226,836.46403199)
+(870.84397893,836.55203199)(870.56797894,836.57336532)
+-- cycle
+(182.42666078,835.30269869)
+ \xmulineto(180.81732748,835.55736535)
+(177.54666088,834.21869871)(172.52132766,831.32803212)
+ \xmulineto(171.14532769,830.39069881)
+(170.21332771,829.36003217)(169.81199439,828.10936553)
+ \xmulineto(168.16666109,823.48403231)
+(166.09866114,818.41603244)(163.63599452,813.0413659)
+ \xmulineto(162.63066121,811.40136594)
+(162.86399454,810.60936596)(164.22399451,810.58403263)
+ \xmulineto(165.61999448,810.90669929)
+(167.03066112,811.59869927)(168.45866108,812.61469925)
+ \xmulineto(170.03066105,813.87469921)
+(170.99999436,815.33869918)(171.33866102,817.0213658)
+ \xmulineto(172.130661,819.10936575)
+(172.90666099,821.32803236)(173.7079943,823.62003231)
+ \xmulineto(173.9319943,824.19736563)
+(174.19332762,824.48403229)(174.46932762,824.55203228)
+ \xmulineto(175.4373276,825.01069894)
+(176.84399423,824.57336562)(178.70266086,823.19736565)
+ \xmulineto(180.29199416,821.77603235)
+(181.94799412,820.15603239)(183.60932742,818.4586991)
+ \xmulineto(182.68266077,818.30669911)
+(181.76532746,817.71869912)(180.81732748,816.76536581)
+ \xmulineto(179.51066084,815.34936584)
+(178.18266087,813.0213659)(176.92132756,809.56803265)
+ \xmulineto(176.43732757,807.64536604)
+(175.98399425,805.70803275)(175.4013276,803.8120328)
+ \xmulineto(174.82266094,802.67203282)
+(175.52666093,802.2866995)(177.59866088,802.79736615)
+ \xmulineto(178.16132754,802.93203282)
+(178.63999419,803.46403281)(179.20799418,804.40669945)
+ \xmulineto(181.81732746,808.89069934)
+(184.10399407,812.80269924)(185.98399403,816.08803249)
+ \xmulineto(187.74532733,814.20803254)
+(189.81199395,812.13069926)(192.07866056,809.90669931)
+ \xmulineto(191.36932725,809.53069932)
+(190.71866059,808.973366)(190.04666061,808.21336602)
+ \xmulineto(188.78666064,806.74003272)
+(187.63599399,804.30669945)(186.57332735,800.8493662)
+ \xmulineto(186.07332736,798.69736626)
+(185.62532737,796.65603297)(185.30266071,794.75469969)
+ \xmulineto(184.89066072,793.48403305)
+(185.57332737,793.26536639)(187.42132733,793.99469971)
+ \xmulineto(187.96399399,794.14003304)
+(188.57866064,794.77603302)(189.11466063,795.85469966)
+ \xmulineto(191.28666058,800.16136622)
+(193.09866054,803.90136613)(194.70266051,807.11469938)
+ \xmulineto(197.08266045,804.49469945)
+(199.77066039,801.74536618)(202.65599366,798.81736625)
+ \xmulineto(201.60399369,796.8853663)
+(200.68799371,794.80269969)(199.86399372,792.72403307)
+ \xmulineto(195.26532716,783.25069997)
+(189.63066062,770.94803361)(182.9319941,755.72936732)
+ \xmulineto(182.72932744,755.39603399)
+(182.60399411,755.07336733)(182.59332744,754.71336734)
+ \xmulineto(178.1719942,756.2453673)
+(174.18799429,757.63603394)(170.5733277,759.03070057)
+ \xmulineto(170.61999437,759.09870057)
+(170.6613277,759.19736723)(170.6613277,759.19736723)
+ \xmulineto(172.46399433,763.48936713)
+(174.02666096,767.33336703)(175.4013276,770.71336695)
+ \xmulineto(176.03066092,772.5413669)
+(175.66132759,773.38003355)(174.30266096,773.25070022)
+ \xmulineto(172.92666099,772.92136689)
+(171.50532768,771.95870025)(170.06799438,770.37470029)
+ \xmulineto(168.99466107,768.81736699)
+(168.09866109,766.28136706)(167.35999444,762.75470048)
+ \xmulineto(167.21332778,761.79203383)
+(167.21866111,760.93736719)(167.27599444,760.30270054)
+ \xmulineto(165.46399448,760.95336719)
+(163.84399452,761.64003384)(162.44799455,762.24536716)
+ \xmulineto(161.17199458,762.66670048)
+(160.12532793,763.09336714)(159.14532796,763.60403379)
+ \xmulineto(160.73466125,768.70803366)
+(162.15599456,773.05736689)(163.46399453,776.72403347)
+ \xmulineto(164.04666118,778.46403342)
+(163.72932785,779.27070007)(162.44799455,779.09336674)
+ \xmulineto(161.10932791,778.86003341)
+(159.84932794,777.89603344)(158.63999463,776.30270014)
+ \xmulineto(157.55199466,774.71870018)
+(156.80666134,772.36003357)(156.35466135,769.10403365)
+ \xmulineto(156.19332802,767.70803369)
+(156.03066136,766.30270039)(155.93199469,764.95870042)
+ \xmulineto(154.25999473,765.8547004)
+(153.12532809,766.45336705)(152.45866144,766.73470038)
+ \xmulineto(151.45866146,767.34936703)
+(150.50532815,767.59870036)(149.74932816,767.49470036)
+ \xmulineto(149.7026615,769.7347003)
+(149.6826615,771.69336692)(149.58399483,773.25070022)
+ \xmulineto(149.4946615,774.82803351)
+(149.44799484,776.41203347)(149.41199484,778.0787001)
+ \xmulineto(148.96932818,779.84936672)
+(148.83866152,781.70803334)(149.07332818,783.66669996)
+ \xmulineto(149.32266151,785.39603325)
+(148.65599485,786.31736656)(147.04132822,786.37469989)
+ \xmulineto(145.43199492,786.18803323)
+(143.65066163,785.44803325)(141.70799501,784.17203328)
+ \xmulineto(139.85999505,783.05736664)
+(138.79199507,782.06803333)(138.57866174,781.12536669)
+
+ \xmulineto(138.14532842,780.21870005)
+(138.45332841,779.71336672)(139.50532839,779.5160334)
+ \xmulineto(140.78132836,779.10403341)
+(141.859995,777.97336677)(142.63999499,776.21336681)
+ \xmulineto(143.65599496,774.78670018)
+(144.46399495,773.28670022)(145.17732826,771.55736693)
+ \xmulineto(145.74532825,770.0467003)
+(146.3639949,768.48403367)(147.04132822,766.90136704)
+ \xmulineto(144.78666161,765.7027004)
+(142.96399498,764.14003378)(141.45332835,762.24536716)
+ \xmulineto(140.5106617,761.29736718)
+(140.18799504,760.32803387)(140.43732837,759.36936723)
+ \xmulineto(140.6666617,758.42136725)
+(141.47866168,757.9587006)(142.97866165,758.09870059)
+ \xmulineto(146.7599949,758.36936725)
+(150.56799481,758.25070059)(154.40666139,757.67736727)
+ \xmulineto(157.91732798,756.91736729)
+(166.53599446,754.23470069)(180.22399416,749.63603413)
+ \xmulineto(178.32266087,745.76003423)
+(176.45332757,742.02670099)(174.63999428,738.45870108)
+ \xmulineto(174.42666095,738.10936775)
+(174.39599429,737.81203443)(174.46932762,737.5267011)
+ \xmulineto(174.32799429,737.4947011)
+(174.13599429,737.54136777)(173.87466096,737.69736776)
+ \xmulineto(171.48399435,737.99470109)
+(169.61466106,737.87470109)(168.29199442,737.27603444)
+ \xmulineto(166.37466113,736.58803446)
+(166.41599446,735.54136782)(168.37466109,734.14003452)
+ \xmulineto(168.93199441,733.92136786)
+(169.55732773,733.54136786)(170.23466104,733.12536787)
+ \xmulineto(171.80266101,732.0573679)
+(172.91199432,730.8280346)(173.53599431,729.40136797)
+ \xmulineto(174.75466095,726.7760347)
+(175.83332759,723.68803477)(176.8386609,720.17203486)
+ \xmulineto(177.22932756,718.88536823)
+(178.40666086,717.82803492)(180.31199416,717.12536827)
+ \xmulineto(182.81732743,716.07870163)
+(184.89066072,715.60403497)(186.66132735,715.60403497)
+ \xmulineto(189.46399395,715.39070165)
+(190.27599394,716.78136828)(189.03066063,719.74936821)
+ \xmulineto(187.93732732,722.18803481)
+(186.19732736,724.69336808)(183.78132741,727.45336802)
+ \xmulineto(180.87999414,730.74936793)
+(178.65599419,733.56803453)(177.17732756,735.74936781)
+ \xmulineto(180.50532748,736.98403445)
+(182.72932744,739.16670106)(183.78132741,742.27070098)
+ \xmulineto(186.03599403,749.99470079)
+(188.7293273,757.6307006)(191.82266057,765.20803375)
+ \xmulineto(195.44266049,773.66136687)
+(200.45332705,784.37469994)(206.72399357,797.38003296)
+ \xmulineto(210.53599349,805.35469943)
+(213.1826601,810.16669931)(214.76532673,811.77069927)
+ \xmulineto(216.35466003,812.66136591)
+(217.44799334,812.89603257)(217.97865999,812.44803258)
+ \xmulineto(218.38532665,812.32269925)
+(218.87999331,811.65069927)(219.58799329,810.50003263)
+ \xmulineto(221.09865992,808.17203269)
+(222.69732655,805.86003275)(224.24532652,803.39069947)
+ \xmulineto(224.99999317,802.12536617)
+(225.63999316,801.64536618)(226.27599314,801.94803284)
+ \xmulineto(226.98399313,802.32803283)
+(227.33865979,803.44269947)(227.37465978,805.42136609)
+ \xmulineto(227.53599311,811.6400326)
+(228.3959931,816.86403247)(229.9173264,821.08269904)
+ \xmulineto(231.01599304,824.60936562)
+(231.25999303,826.58403223)(230.51065972,826.92136556)
+ \xmulineto(229.60399307,827.36003222)
+(224.93199317,826.01069892)(216.54132669,822.94269899)
+ \xmulineto(214.18266008,822.16669901)
+(212.41599345,820.70269905)(211.29199347,818.4586991)
+ \xmulineto(209.43199351,814.67736586)
+(207.63066022,810.63603263)(205.87466026,806.43736606)
+ \xmulineto(194.51599384,817.70269912)
+(187.379994,826.48936557)(184.45866073,832.84936541)
+ \xmulineto(184.20799407,834.16136538)
+(183.51066075,834.96936536)(182.42666078,835.30269869)
+-- cycle
+(865.99464571,812.53069925)
+ \xmulineto(865.66664571,812.36936592)
+(865.44264572,811.83336593)(865.31731239,811.01069929)
+ \xmulineto(865.17197906,807.8600327)
+(866.53597903,805.22403276)(869.37997896,803.05203282)
+ \xmulineto(871.38531225,801.71336618)
+(873.50531221,799.93736623)(875.64531216,797.80269961)
+ \xmulineto(874.06264553,796.29203298)
+(870.46397894,794.80669969)(864.97864573,793.22936639)
+ \xmulineto(863.40131243,795.21869968)
+(861.85997913,797.00003296)(860.23997917,798.73469959)
+ \xmulineto(860.27064583,800.21869955)
+(859.96397917,801.67203285)(859.39597918,803.05203282)
+ \xmulineto(859.08797919,803.61469947)
+(858.60931253,803.92669946)(857.95331255,803.89603279)
+ \xmulineto(857.60931256,803.75469946)
+(857.2186459,803.26536614)(856.85464591,802.54136616)
+ \xmulineto(852.49997934,795.94269966)
+(845.95864615,790.90669978)(837.13064634,787.30669987)
+ \xmulineto(835.42131305,786.71869989)
+(834.12531307,785.89603324)(833.32264643,784.8493666)
+ \xmulineto(831.94797979,783.04669998)
+(831.20264647,781.50536668)(831.03597981,780.36403338)
+ \xmulineto(830.68264648,779.3120334)
+(831.06264648,778.79736675)(832.21864645,778.75470008)
+ \xmulineto(832.72931311,778.67736675)
+(833.39064642,778.80670008)(834.08264641,779.09336674)
+ \xmulineto(834.48931307,777.93203344)
+(835.15597972,776.70803347)(836.19731303,775.45336683)
+ \xmulineto(830.44264649,771.19736694)
+(819.99998005,770.69336695)(804.87464705,773.9267002)
+ \xmulineto(804.63998039,774.09336686)
+(804.3599804,774.19736686)(804.03064707,774.18270019)
+ \xmulineto(799.6359805,775.09870017)
+(792.75464732,777.32803345)(783.37464753,780.8693667)
+ \xmulineto(782.70798087,781.16670002)
+(782.48398088,780.93736669)(782.69731421,780.19336671)
+ \xmulineto(786.14531413,775.53070016)
+(794.88531394,771.46936693)(808.94264696,768.00536701)
+ \xmulineto(809.28664696,768.14536701)
+(809.70798028,768.08803368)(810.1253136,767.83336702)
+ \xmulineto(813.97864685,767.19336703)
+(819.03064674,766.47870038)(825.27597994,765.8027004)
+ \xmulineto(825.08797994,764.53603377)
+(824.52131329,758.70803391)(823.67197997,748.2813675)
+ \xmulineto(812.64531355,749.93203413)
+(802.58798044,754.18803402)(793.44798064,761.06270052)
+ \xmulineto(792.89064732,761.66136717)
+(792.45864733,761.8387005)(792.093314,761.56803384)
+ \xmulineto(791.80264734,761.35470051)
+(791.78131401,760.91736719)(792.01064734,760.30270054)
+ \xmulineto(797.70264721,750.31736745)
+(808.14531365,744.16670094)(823.33331331,741.76003433)
+ \xmulineto(822.29198,724.43203476)
+(822.46398,714.29736834)(823.83864663,711.36936841)
+ \xmulineto(826.40131324,706.83870186)
+(831.54664646,701.58403532)(839.33331296,695.6253688)
+ \xmulineto(840.59331293,694.52670216)
+(841.35464625,694.04136884)(841.70264624,694.18270217)
+ \xmulineto(842.26531289,694.48936883)
+(842.30264623,695.33336881)(841.78664624,696.64003544)
+ \xmulineto(839.82797962,701.72403532)
+(837.76531299,707.11470185)(835.52131304,712.89603504)
+ \xmulineto(832.95864643,719.55736821)
+(831.24531314,725.74936806)(830.35997982,731.51603458)
+ \xmulineto(829.8546465,734.6360345)
+(829.37997985,737.81203443)(829.00531319,740.91203435)
+ \xmulineto(832.53597978,740.70803435)
+(836.60931302,740.51070103)(841.19331292,740.40670103)
+ \xmulineto(843.91197953,740.3853677)
+(846.44797947,739.86403438)(848.81197942,738.79736773)
+ \xmulineto(849.91197939,737.92136776)
+(850.82264604,737.74003443)(851.60397936,738.20270108)
+ \xmulineto(852.530646,738.7760344)
+(852.99464599,740.41203436)(852.95864599,743.19736763)
+ \xmulineto(853.16664599,746.72936754)
+(852.91197933,748.97336748)(852.28131267,749.97336746)
+ \xmulineto(851.74531269,750.70270077)
+(851.03597937,751.38536742)(850.08264606,751.91736741)
+ \xmulineto(849.14531274,752.57870073)
+(844.63064618,756.5213673)(836.45331302,763.77070045)
+ \xmulineto(836.13064636,764.20803377)
+(835.82264637,764.57870043)(835.60397971,764.86936709)
+ \xmulineto(837.08264634,763.93736711)
+(838.25997965,764.89070042)(839.0786463,767.74936702)
+ \xmulineto(839.63597962,770.19336696)
+(839.55197962,771.86936692)(838.9066463,772.7453669)
+ \xmulineto(845.61997949,766.10403373)
+(851.42131269,759.96936721)(856.34397925,754.37470068)
+ \xmulineto(856.32797925,754.25070069)
+(856.28664592,754.00536736)(856.17731259,753.69736737)
+ \xmulineto(854.96931261,751.67736742)
+(854.62531262,750.42670078)(855.07864595,749.97336746)
+ \xmulineto(855.72397926,749.09870081)
+(857.3386459,748.91736749)(859.98397917,749.29736748)
+ \xmulineto(862.06797913,749.36936747)
+(863.72397909,749.86003413)(864.97864573,750.90136744)
+ \xmulineto(873.51064554,758.56270058)
+(879.81197873,762.34936715)(883.94264531,762.24536716)
+ \xmulineto(885.42664528,762.21870049)
+(886.38531192,762.72403381)(886.73464525,763.77070045)
+ \xmulineto(886.98931191,766.77603371)
+(886.68264525,770.35470029)(885.80664527,774.43736686)
+ \xmulineto(885.54131194,775.70803349)
+(884.56797863,776.92670013)(882.92664533,778.0787001)
+ \xmulineto(879.06797875,780.40670004)
+(875.04664551,783.5520333)(870.9066456,787.47336653)
+ \xmulineto(869.97331228,788.58403317)
+(868.97864564,789.51603315)(867.859979,790.26536646)
+ \xmulineto(868.20264566,790.41203313)
+(868.60931231,790.39603313)(869.0413123,790.26536646)
+ \xmulineto(870.25464561,790.1506998)
+(871.67731225,790.09336647)(873.35997888,790.0986998)
+ \xmulineto(874.01597886,790.1306998)
+(874.87464551,790.05203314)(875.81731216,789.84403314)
+ \xmulineto(877.11997879,789.45336648)
+(877.81197878,789.74936648)(878.01597877,790.69336645)
+ \xmulineto(878.4213121,791.66669976)
+(878.72397876,793.04669973)(878.86397875,794.83869968)
+ \xmulineto(882.02131202,793.0053664)
+(888.47331188,785.9946999)(898.25064499,773.84403354)
+ \xmulineto(900.67197827,770.56803362)
+(902.31731157,768.98403366)(903.24531155,769.10403365)
+ \xmulineto(904.1879782,769.35470031)
+(904.70797818,770.25470029)(904.68264485,771.81203359)
+ \xmulineto(904.49997819,777.08803346)
+(902.06797824,781.28136669)(897.48931168,784.42669994)
+
+ \xmulineto(894.35464508,787.2920332)
+(890.34931183,790.84403312)(885.46931194,795.01069968)
+ \xmulineto(879.88531207,800.12003289)
+(873.86397886,805.71869942)(867.34931234,811.93736593)
+ \xmulineto(866.81197902,812.44269925)
+(866.32797903,812.69336591)(865.99464571,812.53069925)
+-- cycle
+(159.48399462,811.01069929)
+ \xmulineto(158.75999463,811.01603262)
+(157.82266132,810.97336595)(156.69332801,810.83869929)
+ \xmulineto(154.80266138,810.22936597)
+(153.45332808,809.47869932)(152.63066143,808.72403268)
+ \xmulineto(151.91732812,807.74936603)
+(152.20266144,807.07336605)(153.55732808,806.60403273)
+ \xmulineto(154.72932805,806.2186994)
+(155.59866137,805.56269942)(156.09866136,804.66136611)
+ \xmulineto(157.65599466,801.86003284)
+(158.94799463,798.94803292)(159.99466127,795.85469966)
+ \xmulineto(159.76532794,795.66669966)
+(159.44799462,795.42136634)(159.06266129,795.17736634)
+ \xmulineto(155.71332803,792.18803308)
+(153.21332809,789.87469981)(151.52666146,788.23469985)
+ \xmulineto(151.1199948,787.76536653)
+(151.14532813,787.35469987)(151.69732812,787.13603321)
+ \xmulineto(152.34399477,786.86403321)
+(153.03599476,786.91736655)(153.72932808,787.30669987)
+ \xmulineto(156.08799469,788.68269984)
+(158.65599463,790.07336647)(161.34932791,791.45336643)
+ \xmulineto(162.07866122,789.15069983)
+(162.68266121,786.60936655)(163.20799453,783.83336662)
+ \xmulineto(163.2026612,783.03069998)
+(163.29732786,782.50536666)(163.54666119,782.14003333)
+ \xmulineto(163.92666118,781.43736668)
+(164.35466117,781.46403335)(164.81732783,782.22403333)
+ \xmulineto(165.17732782,782.81736665)
+(165.41599448,784.10403328)(165.41199448,786.2026999)
+ \xmulineto(165.45866115,788.05736652)
+(165.33332782,790.37469979)(165.07332783,793.22936639)
+ \xmulineto(167.07866111,794.2186997)
+(169.3799944,795.30669967)(171.92666101,796.44803298)
+ \xmulineto(173.05732765,796.92669963)
+(173.9119943,797.48403295)(174.55199428,798.14003294)
+ \xmulineto(174.76532761,798.48403293)
+(174.68799428,799.06803291)(174.30266096,799.74936623)
+ \xmulineto(173.92132763,800.45869955)
+(172.43199433,800.93203287)(169.89599439,801.18803286)
+ \xmulineto(168.56266108,801.31203286)
+(167.32266111,801.03069953)(166.25466113,800.42669955)
+ \xmulineto(165.59332781,800.11469955)
+(164.99999449,799.7600329)(164.47866117,799.24003291)
+ \xmulineto(164.07866118,800.89069954)
+(163.67732786,802.60936616)(163.29732786,804.48936611)
+ \xmulineto(162.69732788,806.34936607)
+(162.45866122,807.8600327)(162.53066121,808.97869934)
+ \xmulineto(162.41199455,809.89603265)
+(161.87466123,810.55203263)(161.01066125,810.83869929)
+ \xmulineto(160.68799459,810.97336595)
+(160.21332793,811.00536595)(159.48399462,811.01069929)
+-- cycle
+(253.9586592,804.91203277)
+ \xmulineto(253.49465921,804.8493661)
+(252.98399255,804.76536611)(252.43199257,804.57336611)
+ \xmulineto(248.99999264,803.16669948)
+(246.25465937,801.68269952)(244.22399275,800.25469955)
+ \xmulineto(242.54132612,798.82803292)
+(241.29732614,797.09869963)(240.49999283,795.01069968)
+ \xmulineto(237.43732623,786.93736655)
+(233.13065966,776.42670014)(227.63065978,763.51603379)
+ \xmulineto(227.22932645,763.64003379)
+(226.78132646,763.74936712)(226.27599314,763.85470045)
+ \xmulineto(224.61465985,764.02670045)
+(223.02132655,763.88536712)(221.45332658,763.43203379)
+ \xmulineto(221.18799325,767.21870037)
+(220.92132659,771.21336693)(220.68799327,775.45336683)
+ \xmulineto(220.31199327,779.99470005)
+(220.5933266,783.5880333)(221.45332658,786.12003323)
+ \xmulineto(221.91199324,788.05736652)
+(221.36932658,789.17203316)(219.84399328,789.50536648)
+ \xmulineto(218.30265998,790.0826998)
+(214.36932674,788.71869984)(207.98932688,785.36003325)
+ \xmulineto(206.20799358,784.35469994)
+(205.02666028,782.76536665)(204.52132696,780.62003337)
+ \xmulineto(202.97866032,774.40136686)
+(200.8119937,766.77070038)(197.99999377,757.59336727)
+ \xmulineto(197.32266045,755.104034)
+(195.31199383,751.52670075)(191.90666057,746.92670087)
+ \xmulineto(190.67732726,745.09336758)
+(191.09332725,744.03070094)(193.09332721,743.62536762)
+ \xmulineto(194.54132718,743.55203428)
+(196.17199381,743.92136761)(197.99999377,744.80670092)
+ \xmulineto(201.11466036,746.42136755)
+(202.71866033,749.09336748)(202.82799366,752.76536739)
+ \xmulineto(203.37999365,755.00536733)
+(205.08266028,762.02670049)(207.98932688,773.9267002)
+ \xmulineto(208.34932687,775.24536684)
+(209.11999352,776.23470014)(210.2759935,776.80670013)
+ \xmulineto(211.4893268,777.47336678)
+(212.53066011,777.16670012)(213.32266009,775.96403348)
+ \xmulineto(215.00532672,771.79736692)
+(216.87999335,767.2600337)(219.08265997,762.41603382)
+ \xmulineto(217.97332666,761.92136716)
+(216.84399335,761.26536718)(215.78132671,760.30270054)
+ \xmulineto(214.08799341,758.84403391)
+(213.33866009,757.53070061)(213.41199343,756.32270064)
+ \xmulineto(213.33866009,754.82803401)
+(214.19332674,754.36003402)(216.03066004,754.880034)
+ \xmulineto(218.53065998,755.93203398)
+(221.28665992,756.30670064)(224.24532652,756.15070064)
+ \xmulineto(217.64532667,742.27070098)
+(210.54666016,727.29736802)(202.91199366,711.11470175)
+ \xmulineto(201.85466035,709.18803513)
+(202.58799366,708.37470182)(205.03066028,708.74536848)
+ \xmulineto(207.09866023,709.2507018)
+(208.87466019,710.14003511)(210.35999349,711.45336841)
+ \xmulineto(212.09332679,712.96936837)
+(213.19332676,714.64536833)(213.66132675,716.36403496)
+ \xmulineto(216.85999335,726.8120347)
+(221.17732659,737.43736777)(226.6146598,748.2813675)
+ \xmulineto(227.49999312,750.31203412)
+(228.49465976,752.48403406)(229.6613264,754.79736734)
+ \xmulineto(233.68799298,753.15603405)
+(237.4479929,751.14536743)(240.92132615,748.78670082)
+ \xmulineto(244.6826594,746.16670089)
+(247.40665934,743.51070095)(248.96399264,740.91736768)
+ \xmulineto(250.42665928,738.49470108)
+(249.99999262,735.92670114)(247.77599267,733.20803454)
+ \xmulineto(245.80665938,730.76536793)
+(243.87999275,728.50003466)(241.85465947,726.35470138)
+ \xmulineto(240.96399282,725.48403473)
+(241.09865948,724.95870141)(242.35999279,724.91736808)
+ \xmulineto(243.15065944,724.88536808)
+(244.56799274,725.4267014)(246.59332603,726.43736804)
+ \xmulineto(251.59332592,728.30270133)
+(255.48932583,729.17203464)(258.35999244,729.06270131)
+ \xmulineto(260.40665906,728.98403464)
+(261.77599236,729.67203463)(262.33865901,731.17736792)
+ \xmulineto(262.926659,732.34936789)
+(262.72932567,734.80270117)(261.74532569,738.54136774)
+ \xmulineto(260.91199238,741.98403432)
+(258.97332575,745.18270091)(255.98932582,748.1933675)
+ \xmulineto(252.48399256,751.82803408)
+(247.73465934,755.26536733)(241.68265947,758.35470059)
+ \xmulineto(238.63065954,759.88003388)
+(235.86399293,761.04670052)(233.38532632,761.9947005)
+ \xmulineto(237.97865955,770.86403361)
+(243.98932609,781.11470002)(251.41599259,792.72403307)
+ \xmulineto(253.06799255,795.22403301)
+(254.56265919,797.62536628)(255.90665916,799.83336623)
+ \xmulineto(257.08265913,801.57336619)
+(257.41599246,802.91203282)(256.9213258,803.8120328)
+ \xmulineto(256.35999248,804.76536611)
+(255.3439925,805.10403276)(253.9586592,804.91203277)
+-- cycle
+(178.19332754,796.10936632)
+ \xmulineto(177.50532755,796.08803299)
+(176.6146609,796.02669966)(175.56799426,795.85469966)
+ \xmulineto(173.8599943,795.36936634)
+(172.67732766,794.63069969)(172.01599434,793.74003305)
+ \xmulineto(171.40666102,792.9373664)
+(171.71866101,792.29736641)(172.94799432,791.79203309)
+ \xmulineto(174.18799429,791.5160331)
+(175.06799427,790.91736645)(175.56799426,790.01603314)
+ \xmulineto(176.42666091,788.32803318)
+(177.31732756,786.52669989)(178.3639942,784.5933666)
+ \xmulineto(175.1453276,782.36403333)
+(172.78666099,780.47870004)(171.16666102,779.01070008)
+ \xmulineto(170.9013277,778.72403342)
+(170.94799436,778.40136676)(171.42132769,777.9947001)
+ \xmulineto(172.01066101,777.63603344)
+(172.67732766,777.65603344)(173.45332764,777.9947001)
+ \xmulineto(175.46399426,778.97870008)
+(177.65066088,779.92136672)(179.9733275,780.8693667)
+ \xmulineto(180.0053275,780.7293667)
+(180.10399416,780.5573667)(180.22399416,780.36403338)
+ \xmulineto(181.3746608,777.08803346)
+(182.36399411,773.41203355)(183.27066076,769.36003365)
+ \xmulineto(183.26532742,768.55203367)
+(183.40132742,767.96403368)(183.69732741,767.66670036)
+ \xmulineto(184.05199407,767.11470037)
+(184.4533274,767.21870037)(184.87999406,767.91736702)
+ \xmulineto(185.23999405,768.51070033)
+(185.39066071,769.7187003)(185.21866071,771.55736693)
+ \xmulineto(185.31199405,773.62536688)
+(185.05199405,776.09336681)(184.5413274,779.09336674)
+ \xmulineto(184.29199407,780.05203338)
+(184.10932741,781.21336669)(183.94799408,782.47869999)
+ \xmulineto(186.22399403,783.30669997)
+(188.68799397,784.26536661)(191.40132724,785.27069992)
+ \xmulineto(192.68266055,785.66136658)
+(193.63599386,786.2546999)(194.19332718,786.96936655)
+ \xmulineto(194.39066051,787.2920332)
+(194.31732718,787.74936653)(194.02666052,788.40669984)
+ \xmulineto(193.71866053,789.27603316)
+(192.32799389,789.84403314)(189.79199395,790.0986998)
+ \xmulineto(188.56799397,790.39603313)
+(187.31732733,790.29203313)(186.06799403,789.76003314)
+ \xmulineto(185.09332738,789.54669982)
+(184.00532741,788.86003317)(182.68266077,787.81203319)
+ \xmulineto(182.35466078,788.45869984)
+(182.13599412,789.16136649)(182.00532745,789.92669981)
+ \xmulineto(181.36399413,791.72936643)
+(181.07866081,793.24536639)(181.07332747,794.41603303)
+ \xmulineto(180.88532748,795.25069967)
+(180.40132749,795.73469966)(179.71866084,795.93736632)
+ \xmulineto(179.39599418,796.07336632)
+(178.87999419,796.13069965)(178.19332754,796.10936632)
+-- cycle
+(858.37997921,794.58403302)
+ \xmulineto(858.70264587,794.1506997)
+(859.11464586,793.68803305)(859.56264585,793.22936639)
+
+ \xmulineto(866.85997902,787.02136654)
+(872.95331222,781.41203335)(877.84931211,776.4693668)
+ \xmulineto(879.73997874,774.82803351)
+(880.36931205,773.37470021)(879.70797874,771.98403358)
+ \xmulineto(878.96931209,769.63070031)
+(872.84931222,764.86003376)(861.42664581,757.76003393)
+ \xmulineto(860.82797915,757.65603394)
+(860.18797917,757.41203394)(859.47864585,757.00003395)
+ \xmulineto(859.47864585,757.45336727)
+(859.39064585,757.94803393)(859.13997919,758.43736725)
+ \xmulineto(858.71331253,759.47336722)
+(851.33864603,766.74003371)(837.04664634,780.28136671)
+ \xmulineto(839.55197962,781.45870002)
+(841.75464624,782.77069998)(843.64531286,784.17203328)
+ \xmulineto(843.69731286,783.19336664)
+(845.08264617,781.14003336)(847.79731277,778.0787001)
+ \xmulineto(852.67731267,773.46403355)
+(856.98931257,769.24536698)(860.74931249,765.38003375)
+ \xmulineto(861.98931246,764.15603378)
+(862.80664578,764.01070045)(863.28664576,765.04136709)
+ \xmulineto(863.67731242,766.34403372)
+(863.44797909,767.86936702)(862.60931245,769.61470031)
+ \xmulineto(861.85997913,771.08270027)
+(856.06264592,776.29203348)(845.0879795,785.18803326)
+ \xmulineto(847.05197946,786.64003322)
+(849.05731275,788.16669985)(851.09864603,789.67736648)
+ \xmulineto(850.98397937,788.9173665)
+(851.91731268,787.07869988)(853.89064597,784.25469995)
+ \xmulineto(859.07864586,779.53070006)
+(863.62531242,775.34936683)(867.603979,771.64536692)
+ \xmulineto(868.84931231,770.42136695)
+(869.71864562,770.37470029)(870.14531228,771.47336693)
+ \xmulineto(870.53064561,772.77603356)
+(870.20797895,774.27070019)(869.2973123,775.96403348)
+ \xmulineto(868.48931232,777.05203346)
+(862.79197911,781.79736667)(852.19731268,790.1826998)
+ \xmulineto(852.14531268,790.2546998)
+(852.07331268,790.2506998)(851.94264601,790.26536646)
+ \xmulineto(855.00531261,792.53069974)
+(857.12531257,793.99469971)(858.37997921,794.58403302)
+-- cycle
+(828.15597987,765.54670041)
+ \xmulineto(829.25997985,765.57870041)
+(830.53064649,765.52136708)(832.05197979,765.29736708)
+ \xmulineto(831.93197979,764.08270044)
+(832.43197978,762.42136715)(833.48931309,760.3853672)
+ \xmulineto(834.92664639,758.29203392)
+(837.73464633,755.81203398)(841.9533129,752.84936739)
+ \xmulineto(843.27064621,751.68270075)
+(843.86397953,750.60403411)(843.7346462,749.7187008)
+ \xmulineto(843.65597953,749.21336748)
+(841.58397958,748.62003416)(837.469313,747.94270084)
+ \xmulineto(834.69331306,747.57870085)
+(831.69731313,747.55203419)(828.49464653,747.77070085)
+ \xmulineto(828.41597987,749.8547008)
+(828.3173132,751.95336741)(828.23997987,754.03603403)
+ \xmulineto(828.3853132,759.32270056)
+(828.37464653,763.1200338)(828.15597987,765.54670041)
+
+(892.79197845,264.8640461)
+-- (832.44264644,308.79204502)
+-- (843.56797953,324.13604464)
+-- (873.16131221,313.3960449)
+ \xmulineto(876.45331214,312.2507116)
+(879.79731207,310.98404496)(883.18264533,309.62537833)
+ \xmulineto(886.58397858,308.26004503)
+(890.14531184,306.76004507)(893.87997842,305.14004511)
+ \xmulineto(890.57331183,306.9213784)
+(887.32264523,308.81737835)(884.15597864,310.8333783)
+ \xmulineto(880.98931204,312.84937825)
+(877.42664545,315.31204486)(873.44264554,318.20804479)
+-- (851.07864603,334.48937772)
+-- (860.70264582,347.76537739)
+-- (921.05197782,303.83871181)
+-- (910.33331139,289.05204551)
+-- (878.68797876,300.09337857)
+ \xmulineto(875.3746455,301.23471187)
+(872.00531224,302.51071184)(868.58797898,303.91737847)
+ \xmulineto(865.19331239,305.31737844)
+(861.6826458,306.89071173)(858.06797921,308.62004502)
+ \xmulineto(862.86931244,305.74004509)
+(867.33864568,302.93204516)(871.49997892,300.22937856)
+ \xmulineto(875.64531216,297.5360453)
+(879.43731208,294.92671203)(882.86397867,292.43204542)
+-- (902.44797823,278.18271244)
+-- cycle
+(945.74531061,433.78137527)
+-- (948.64531055,450.25070819)
+-- (954.60397708,449.19737488)
+ \xmulineto(957.0826437,448.76004156)
+(958.99464365,448.87470823)(960.35997696,449.55737488)
+ \xmulineto(961.72397693,450.21870819)
+(962.57331024,451.47337483)(962.89064357,453.29204145)
+ \xmulineto(963.1879769,454.97870808)
+(962.87464357,456.41204137)(961.95331026,457.61470801)
+ \xmulineto(961.01064361,458.80670798)
+(959.67731031,459.56270796)(957.90131035,459.87470795)
+ \xmulineto(956.35997705,460.15070795)
+(954.72931042,459.94804129)(953.05731045,459.28137464)
+ \xmulineto(951.35997716,458.59870799)
+(949.57864386,457.44804135)(947.7346439,455.79737472)
+ \xmulineto(946.89064392,455.07870807)
+(945.67197728,453.9947081)(944.10931065,452.55204147)
+ \xmulineto(939.00531076,447.89604158)
+(935.20264418,444.72404166)(932.68797757,443.04670837)
+ \xmulineto(930.40664428,441.46937508)
+(927.88531101,440.42670843)(925.1146444,439.90670845)
+ \xmulineto(922.3439778,439.40670846)
+(919.43197786,439.41204179)(916.34397793,439.95870845)
+ \xmulineto(910.1973114,441.04670842)
+(905.7493115,443.78670835)(902.97331156,448.18270824)
+ \xmulineto(900.19731162,452.5733748)
+(899.42131163,458.17204133)(900.61997828,464.98937449)
+ \xmulineto(901.81731158,471.79204099)
+(904.27064486,476.61470754)(907.99997811,479.51070747)
+ \xmulineto(911.72397803,482.4067074)
+(916.70264459,483.29737404)(922.95864445,482.19337407)
+-- (928.99464432,481.1253741)
+-- (926.22397771,465.38004115)
+-- (921.16131116,466.2707078)
+ \xmulineto(918.80664454,466.68804112)
+(917.01597791,466.57870779)(915.74531127,465.93737447)
+ \xmulineto(914.49464464,465.28670782)
+(913.71331132,464.06804118)(913.40131133,462.27604123)
+ \xmulineto(913.139978,460.8173746)
+(913.42131133,459.5360413)(914.25464464,458.46937466)
+ \xmulineto(915.07864462,457.39604135)
+(916.31197793,456.71870803)(917.95331123,456.43204137)
+ \xmulineto(920.69731117,455.94804138)
+(925.70264439,458.82270798)(932.96397756,465.07337449)
+-- (933.44264422,465.44804115)
+-- (934.68797752,466.52137446)
+ \xmulineto(941.16664405,472.01070765)
+(945.68797728,475.17204091)(948.22931056,476.01604089)
+ \xmulineto(949.93731052,476.58804088)
+(951.75464381,476.91204087)(953.70264377,477.02670753)
+ \xmulineto(955.6453104,477.13070753)
+(957.66664368,476.9893742)(959.79197697,476.61470754)
+ \xmulineto(966.12531016,475.49470757)
+(970.7026434,472.67204097)(973.55197667,468.10404108)
+ \xmulineto(976.3959766,463.54137453)
+(977.19730992,457.71337467)(975.94797661,450.62537485)
+ \xmulineto(974.71330997,443.59337502)
+(971.97864337,438.56270848)(967.77597679,435.54670856)
+ \xmulineto(963.56797689,432.51604196)
+(958.05197701,431.60937532)(951.25064383,432.81204196)
+-- cycle
+(959.62531031,389.17737637)
+-- (888.6826452,412.27070913)
+-- (893.89597842,428.34404207)
+-- (964.83864353,405.2507093)
+-- cycle
+(910.1933114,337.56271097)
+-- (916.98397791,352.8387106)
+-- (922.51064446,350.36937732)
+ \xmulineto(924.81197774,349.34404402)
+(926.69731103,348.99471069)(928.18797767,349.32271068)
+ \xmulineto(929.66131097,349.63604401)
+(930.79197761,350.64537732)(931.54131093,352.33337728)
+ \xmulineto(932.23464424,353.90137724)
+(932.27597758,355.36404387)(931.67197759,356.7547105)
+ \xmulineto(931.04664427,358.1400438)
+(929.93731096,359.19737711)(928.297311,359.93204376)
+ \xmulineto(926.8599777,360.56804374)
+(925.2346444,360.7707104)(923.44264444,360.53071041)
+ \xmulineto(921.63597781,360.28137708)
+(919.62531119,359.5933771)(917.4319779,358.43737713)
+ \xmulineto(916.44797793,357.9480438)
+(915.01064462,357.18804382)(913.139978,356.16671052)
+ \xmulineto(907.0626448,352.88537726)
+(902.60931156,350.73471065)(899.75464496,349.71337734)
+ \xmulineto(897.16131168,348.7347107)
+(894.47331174,348.33871071)(891.65597847,348.50537737)
+ \xmulineto(888.84931187,348.68804403)
+(886.02131193,349.40137735)(883.15064533,350.67737732)
+ \xmulineto(877.45331212,353.22404392)
+(873.7973122,356.9587105)(872.16664557,361.89604371)
+ \xmulineto(870.53597894,366.83337692)
+(871.13064559,372.45871011)(873.94264553,378.77604329)
+ \xmulineto(876.74531213,385.08804313)
+(880.29731206,389.17204303)(884.60931196,391.07870965)
+ \xmulineto(888.92131187,392.98404294)
+(893.96931176,392.64004295)(899.77597829,390.05737634)
+-- (905.3693115,387.55737641)
+-- (898.87997831,372.94804343)
+-- (894.18797842,375.04137672)
+ \xmulineto(892.0053118,376.01604336)
+(890.23464517,376.34937668)(888.84931187,376.02671002)
+ \xmulineto(887.47864523,375.6973767)
+(886.42131192,374.70804339)(885.6879786,373.04137677)
+ \xmulineto(885.08264528,371.6933768)
+(885.05197862,370.3800435)(885.60397861,369.14537686)
+ \xmulineto(886.13597859,367.90671023)
+(887.17197857,366.94804358)(888.69331187,366.2760436)
+ \xmulineto(891.24531182,365.13604363)
+(896.79197836,366.71337692)(905.34397817,371.01604348)
+-- (905.90131149,371.26537681)
+-- (907.36931146,372.00537679)
+ \xmulineto(914.97864463,375.76004336)
+(920.13064451,377.73470998)(922.80264445,377.94270998)
+ \xmulineto(924.59864441,378.07870997)
+(926.44264437,377.94804331)(928.35997766,377.59337665)
+ \xmulineto(930.26531095,377.21871)
+(932.19731091,376.59337668)(934.1666442,375.7133767)
+ \xmulineto(940.03597741,373.09337676)
+(943.80264399,369.24004353)(945.46397729,364.12004365)
+ \xmulineto(947.11997725,359.01071044)
+(946.4893106,353.16137726)(943.56797733,346.57871075)
+ \xmulineto(940.67197739,340.05737758)
+(936.80264414,335.83871102)(931.99464425,333.9320444)
+ \xmulineto(927.18264436,332.01071111)
+(921.61464448,332.47337777)(915.30264462,335.2813777)
+-- cycle
+(851.91197935,217.18271395)
+-- (798.2506472,269.09337933)
+-- (824.47864662,296.30671199)
+-- (834.85464639,286.27071224)
+-- (820.34398004,271.21871261)
+-- (831.01597981,260.90671287)
+-- (843.81197953,274.18271254)
+-- (854.0519793,264.27604612)
+-- (841.25064625,250.99471311)
+-- (853.25464599,239.38004673)
+-- (868.20264566,254.88537968)
+-- (878.57864543,244.84937993)
+-- cycle
+(820.25064671,188.55204799)
+-- (770.33864781,244.08804662)
+-- (782.87998087,255.40137967)
+-- (832.79197977,199.86404771)
+-- cycle
+(744.33864839,201.95338099)
+-- (764.56798127,171.91738173)
+ \xmulineto(765.92131458,169.90138178)
+(767.23998122,168.67204848)(768.54131452,168.21871516)
+ \xmulineto(769.83331449,167.7760485)
+(771.20798113,168.05738183)(772.71864776,169.0733818)
+ \xmulineto(774.2133144,170.07871511)
+(774.97864771,171.25471508)(775.05198104,172.62004838)
+ \xmulineto(775.11464771,173.99471501)
+(774.46931439,175.67738164)(773.11464775,177.69338159)
+-- (752.8906482,207.73471418)
+ \xmulineto(751.53598156,209.7453808)
+(750.19731492,210.98404743)(748.89598162,211.43738075)
+ \xmulineto(747.58798165,211.88004741)
+(746.18264835,211.60938075)(744.67731505,210.59338078)
+ \xmulineto(743.21864841,209.60404747)
+(742.46398176,208.42138083)(742.39598176,207.0467142)
+ \xmulineto(742.3333151,205.67204756)
+(742.98398175,203.97338094)(744.33864839,201.95338099)
+-- cycle
+(731.723982,190.13604795)
+ \xmulineto(727.45864876,196.47871446)
+(725.7866488,202.29204765)(726.72398211,207.57871418)
+ \xmulineto(727.67198209,212.86938072)
+(731.19331534,217.57871394)(737.29198188,221.6933805)
+ \xmulineto(743.45331507,225.86404707)
+(749.13064828,227.39071369)(754.31731483,226.28138039)
+ \xmulineto(759.49998139,225.17204708)
+(764.25464795,221.41604718)(768.56264785,215.026714)
+-- (785.70798081,189.5573813)
+ \xmulineto(789.99464738,183.18804812)
+(791.69731401,177.36004826)(790.7919807,172.07338173)
+ \xmulineto(789.87998072,166.78671519)
+(786.35998079,162.08271531)(780.21331426,157.93204874)
+ \xmulineto(774.13998106,153.82804884)
+(768.46398119,152.33338221)(763.19331464,153.45871552)
+ \xmulineto(757.92131475,154.58804883)
+(753.13998153,158.3227154)(748.86931495,164.66671524)
+-- cycle
+(678.05731652,108.21364997)
+-- (649.49998381,177.25071493)
+-- (673.44798328,187.19738135)
+-- (685.66131635,166.61471519)
+ \xmulineto(687.18264965,164.02671526)
+(688.70798295,161.28138199)(690.25064958,158.36404873)
+ \xmulineto(691.77598288,155.4480488)
+(693.37998284,152.26004888)(695.04664947,148.80671563)
+ \xmulineto(693.63998284,152.9733822)
+(692.44798286,156.67204877)(691.43731622,159.88538203)
+ \xmulineto(690.43731624,163.12538195)
+(689.70264959,165.61471522)(689.2706496,167.38538184)
+-- (683.48398306,191.36404792)
+-- (707.31198254,201.26004767)
+-- (735.86931524,132.22924938)
+-- (720.91198224,126.01098286)
+-- (710.46398247,151.27071557)
+ \xmulineto(708.28131585,156.54671544)
+(706.0573159,162.00004864)(703.80664928,167.64538184)
+ \xmulineto(701.557316,173.2813817)
+(699.29198271,179.08804822)(696.98398276,185.03604807)
+ \xmulineto(698.54131606,178.67738156)
+(699.81731604,173.33871503)(700.84398268,169.03071514)
+ \xmulineto(701.87464932,164.72404857)
+(702.53598264,161.95338198)(702.8066493,160.71871534)
+-- (711.79198244,122.22404962)
+-- (702.01064932,118.16151639)
+-- (681.8639831,150.2027156)
+ \xmulineto(679.02131649,154.75471549)
+(676.51064988,158.88538205)(674.31198326,162.55738196)
+ \xmulineto(672.13598331,166.21338187)
+(670.06798336,169.72938178)(668.15065007,173.1093817)
+ \xmulineto(670.52131668,167.9480485)
+(672.84931663,162.69338196)(675.17198325,157.32804876)
+ \xmulineto(677.48398319,151.96938222)
+(679.93198314,146.1827157)(682.50531642,139.96404919)
+-- (693.06264952,114.44271648)
+-- cycle
+(604.6399848,92.43178369)
+-- (606.81731809,168.40138182)
+-- (629.20265093,171.89071506)
+-- (654.08265038,100.13605017)
+-- (636.33331744,97.36938357)
+-- (632.59865085,110.39071658)
+-- (621.0986511,108.59324996)
+-- (621.4946511,95.05738363)
+-- cycle
+(620.95331777,122.26511629)
+-- (628.9693176,123.51618293)
+-- (622.9119844,145.67738238)
+ \xmulineto(622.48931774,147.15604901)
+(622.07331775,148.74004897)(621.63998443,150.43738226)
+ \xmulineto(621.2026511,152.13071555)
+(620.56798445,154.70804882)(619.73465113,158.1507154)
+ \xmulineto(619.85998447,156.14004879)
+(619.95865113,154.04671551)(620.06265113,151.87471556)
+ \xmulineto(620.15065113,149.69738228)
+(620.22398446,147.47871567)(620.31198446,145.17738239)
+-- cycle
+(518.45865337,112.20271654)
+-- (535.12531967,111.32818323)
+-- (534.80665301,105.27605004)
+ \xmulineto(534.67198634,102.75471677)
+(535.026653,100.86405015)(535.85998632,99.59325018)
+ \xmulineto(536.68265297,98.31725021)
+(538.03065294,97.6255169)(539.86931956,97.5307169)
+ \xmulineto(541.57865286,97.4375169)
+(542.95331949,97.92658356)(544.03598614,98.9948502)
+ \xmulineto(545.10931945,100.07871684)
+(545.69331943,101.49485014)(545.78665276,103.29218342)
+ \xmulineto(545.86931943,104.85991672)
+(545.46931944,106.45365001)(544.60398612,108.04124997)
+ \xmulineto(543.72398614,109.64538327)
+(542.36931951,111.28124989)(540.50531955,112.91724985)
+ \xmulineto(539.69331957,113.6615165)
+(538.47331959,114.74018314)(536.84931963,116.11458311)
+ \xmulineto(531.61465308,120.62551633)
+(528.01065316,124.02138291)(526.03598653,126.32298286)
+ \xmulineto(524.19731991,128.39591614)
+(522.86931994,130.77084941)(522.00531996,133.46404935)
+
+ \xmulineto(521.17731997,136.15604928)
+(520.82265332,139.05738254)(520.98931998,142.19338246)
+ \xmulineto(521.31731997,148.43738231)
+(523.48931992,153.19738219)(527.51065317,156.49471544)
+ \xmulineto(531.51598641,159.78671536)
+(536.97331963,161.24538199)(543.86931947,160.88004867)
+ \xmulineto(550.75465266,160.52138201)
+(555.83865254,158.66671539)(559.16131914,155.31204881)
+ \xmulineto(562.4786524,151.95871556)
+(563.97331903,147.11471568)(563.6359857,140.7653825)
+-- (563.31731904,134.63071598)
+-- (547.37998606,135.46938263)
+-- (547.64531939,140.60404917)
+ \xmulineto(547.77065272,143.00004911)
+(547.44798606,144.7813824)(546.65065275,145.95338237)
+ \xmulineto(545.8599861,147.11471568)
+(544.55198613,147.74538233)(542.73998617,147.84404899)
+ \xmulineto(541.26531953,147.92138232)
+(540.03065289,147.484049)(539.07865291,146.52138236)
+ \xmulineto(538.1093196,145.57871571)
+(537.59331961,144.26538241)(537.49998628,142.60404912)
+ \xmulineto(537.35998628,139.80671586)
+(540.81731954,135.1880493)(547.89598605,128.72404946)
+-- (548.32265271,128.29738281)
+-- (549.54131935,127.1880495)
+ \xmulineto(555.76531921,121.41204964)
+(559.45331913,117.30684975)(560.59865244,114.88031647)
+ \xmulineto(561.36931909,113.25471651)
+(561.91198574,111.47871656)(562.26531907,109.56258327)
+ \xmulineto(562.60398573,107.64538332)
+(562.71331906,105.61458337)(562.60398573,103.45365009)
+ \xmulineto(562.26531907,97.02658358)
+(560.02131912,92.12551703)(555.84931921,88.73498378)
+ \xmulineto(551.67198597,85.3495172)
+(545.99998609,83.84431724)(538.81731959,84.21885056)
+ \xmulineto(531.70265308,84.59325055)
+(526.38531986,86.6932505)(522.89065327,90.51098374)
+ \xmulineto(519.37465335,94.32298365)
+(517.80265338,99.70271685)(518.16132004,106.60938334)
+-- cycle
+(450.59332153,91.86405037)
+-- (470.55198776,165.1773819)
+-- (493.11998726,163.27071528)
+-- (500.45332043,87.66151714)
+-- (482.55198749,89.16671711)
+-- (481.9839875,102.70271677)
+-- (470.38532109,103.68285008)
+-- (467.59332116,90.43178374)
+-- cycle
+(473.45865436,116.99484975)
+-- (481.53065418,116.3229831)
+-- (480.8546542,139.28671587)
+ \xmulineto(480.79198753,140.82271583)
+(480.7546542,142.46404912)(480.72932087,144.21338241)
+ \xmulineto(480.70798753,145.96404904)
+(480.69332087,148.62004897)(480.69732087,152.16138222)
+ \xmulineto(480.34398754,150.1827156)
+(479.95332088,148.12538232)(479.54665423,145.98404904)
+ \xmulineto(479.11465423,143.84938242)
+(478.66665424,141.67204914)(478.21332092,139.4160492)
+-- cycle
+(406.96398916,102.82298344)
+-- (419.42132222,161.80271531)
+-- (408.65065579,164.09338192)
+-- (411.63065572,178.21871491)
+-- (449.63998822,170.14538177)
+-- (446.65065495,156.01604879)
+-- (435.87998852,158.3067154)
+-- (423.42132213,99.32818352)
+-- cycle
+(356.08265695,121.12551632)
+-- (384.53065632,190.20804795)
+-- (400.13065598,183.75471477)
+-- (371.6826566,114.67191648)
+-- cycle
+(308.49999133,175.71871497)
+-- (322.65599102,166.86404852)
+-- (319.44799109,161.71871532)
+ \xmulineto(318.11465778,159.57871537)
+(317.5106578,157.76004875)(317.62532446,156.24004878)
+ \xmulineto(317.72399113,154.72404882)
+(318.56799111,153.46938219)(320.13599107,152.48938221)
+ \xmulineto(321.58399104,151.57871557)
+(323.02665768,151.33871557)(324.48399098,151.74538223)
+ \xmulineto(325.93732428,152.17204888)
+(327.13999092,153.12538219)(328.09332423,154.65604882)
+ \xmulineto(328.92665755,155.98404879)
+(329.3493242,157.57871542)(329.35999087,159.38004871)
+ \xmulineto(329.3693242,161.21338199)
+(328.96399088,163.30271528)(328.13065756,165.63604855)
+ \xmulineto(327.78132424,166.68271519)
+(327.23465758,168.21871516)(326.4786576,170.21338177)
+ \xmulineto(324.08265765,176.69738161)
+(322.57865769,181.41604816)(321.96399103,184.39071476)
+ \xmulineto(321.35999105,187.09338136)
+(321.34399105,189.82271462)(321.90132437,192.59338122)
+ \xmulineto(322.46932436,195.35471449)
+(323.567991,198.05738109)(325.23465763,200.72404769)
+ \xmulineto(328.53599089,206.02671422)
+(332.74532413,209.13071415)(337.84932402,210.06271412)
+ \xmulineto(342.94799057,210.9947141)
+(348.43199045,209.62004747)(354.28665699,205.95338089)
+ \xmulineto(360.13065686,202.29738098)
+(363.67732345,198.20271442)(364.96399008,193.65604786)
+ \xmulineto(366.25065672,189.11471464)
+(365.20265675,184.15071476)(361.83865682,178.76004823)
+-- (358.58799023,173.54671502)
+-- (345.05732386,182.02138148)
+-- (347.77599046,186.38538137)
+ \xmulineto(349.04132377,188.41604799)
+(349.61999042,190.13604795)(349.49465709,191.54671458)
+ \xmulineto(349.35999043,192.95338121)
+(348.53065711,194.13604785)(346.98932381,195.09871449)
+ \xmulineto(345.73465718,195.88004781)
+(344.4426572,196.1040478)(343.13999057,195.72404781)
+ \xmulineto(341.84399059,195.36938115)
+(340.75999062,194.47338117)(339.86932397,193.05738121)
+ \xmulineto(338.39599067,190.68804793)
+(339.18265732,184.96938141)(342.24532392,175.87471497)
+-- (342.41199058,175.29204831)
+-- (342.9373239,173.73471502)
+ \xmulineto(345.59332385,165.65604855)
+(346.82799048,160.27604868)(346.66132382,157.59338208)
+ \xmulineto(346.54665716,155.79738213)
+(346.16132383,153.98404884)(345.54132385,152.13071555)
+ \xmulineto(344.90665719,150.29204893)
+(344.02132388,148.45871564)(342.87999057,146.63071569)
+ \xmulineto(339.47332398,141.16671582)
+(335.13599074,137.97338257)(329.84932419,137.03604926)
+ \xmulineto(324.56265764,136.10404928)
+(318.8639911,137.54138258)(312.7706579,141.35471582)
+ \xmulineto(306.7293247,145.14004906)
+(303.09865812,149.56271562)(301.88532481,154.59338216)
+ \xmulineto(300.64532484,159.6400487)
+(301.87999148,165.10404857)(305.54132473,170.97338175)
+-- cycle
+(280.27065862,217.74004727)
+ \xmulineto(283.25465855,215.47338066)
+(285.55732517,214.29204735)(287.1879918,214.18804735)
+ \xmulineto(288.81199176,214.06804736)
+(290.37999173,214.942714)(291.89065836,216.81738062)
+-- (294.54132497,220.10404721)
+ \xmulineto(296.10932494,222.04138049)
+(296.69732492,223.78138045)(296.3279916,225.32271375)
+ \xmulineto(295.94799161,226.85471371)
+(294.41599164,228.71871366)(291.72932503,230.89604694)
+-- (291.23465838,231.3027136)
+-- cycle
+(239.27065952,193.58404786)
+-- (286.21865849,251.66137976)
+-- (304.98932474,236.4320468)
+ \xmulineto(309.83865797,232.49471357)
+(312.6666579,228.500047)(313.43199122,224.45871377)
+ \xmulineto(314.19732454,220.4120472)
+(312.91732457,216.33338063)(309.57332464,212.19738074)
+-- (309.10932465,211.63071408)
+-- (306.42665804,208.30671417)
+ \xmulineto(303.98399143,205.28671424)
+(301.50532482,203.34938095)(298.97332487,202.52138098)
+ \xmulineto(296.45865826,201.70804766)
+(293.53599166,201.82804766)(290.2346584,202.9067143)
+ \xmulineto(292.13599169,200.0880477)
+(292.93732501,197.36004777)(292.68265835,194.74004783)
+ \xmulineto(292.42132502,192.10938123)
+(291.01065838,189.2293813)(288.47865844,186.09871471)
+-- (277.62532534,172.67204838)
+ \xmulineto(276.36399204,171.11471508)
+(275.45332539,169.79204845)(274.91199207,168.69338181)
+ \xmulineto(274.35999208,167.59338184)
+(274.00532542,166.54138186)(273.87999209,165.50004856)
+-- (260.62532572,176.25471496)
+ \xmulineto(260.80265905,177.13604827)
+(261.20265904,178.13071491)(261.85999236,179.21338155)
+ \xmulineto(262.51065901,180.31204819)
+(263.58799232,181.80271482)(265.09332562,183.66138144)
+-- (274.13599209,194.8547145)
+ \xmulineto(276.69732536,198.02138109)
+(277.85465867,200.46938103)(277.61465868,202.19738098)
+ \xmulineto(277.39065868,203.94271427)
+(275.77599205,206.05204755)(272.82799212,208.52671416)
+-- (252.23999257,183.05738146)
+-- cycle
+(194.26532718,238.76538008)
+-- (248.35465932,290.20804548)
+-- (274.35999208,262.77071282)
+-- (263.89599231,252.8280464)
+-- (249.52132596,268.00004603)
+-- (238.7653262,257.77604628)
+-- (251.45332592,244.38537994)
+-- (241.13065948,234.56804685)
+-- (228.44265976,247.95871319)
+-- (216.33866003,236.4480468)
+-- (231.15599303,220.81204719)
+-- (220.6973266,210.86404744)
+-- cycle
+(158.91199463,287.11471222)
+-- (214.11466008,338.75471094)
+-- (224.06799319,323.99471131)
+-- (200.29732705,304.44804513)
+ \xmulineto(199.11466041,303.50004515)
+(196.69332713,301.59871186)(193.02666054,298.75471193)
+ \xmulineto(189.35999396,295.906712)
+(185.10932738,292.65071208)(180.27599416,288.96937884)
+ \xmulineto(185.7346607,292.04137876)
+(192.25066056,295.60404534)(199.79732706,299.66137858)
+ \xmulineto(201.09332703,300.34937856)
+(202.02666034,300.85471188)(202.61466033,301.17737854)
+-- (229.6933264,315.64004485)
+-- (239.43732619,301.17737854)
+-- (170.8493277,269.40671266)
+-- cycle
+(131.52652856,334.63604438)
+-- (198.57866042,367.4013769)
+-- (205.97332692,352.20271061)
+-- (138.92666173,319.44271142)
+-- cycle
+(104.53599583,402.45337604)
+-- (175.04132761,426.8640421)
+-- (181.22399414,408.93737588)
+-- (155.4839947,390.78137633)
+ \xmulineto(152.66666143,388.74004304)
+(149.71332816,386.71337643)(146.66132823,384.71337648)
+ \xmulineto(143.5933283,382.69737653)
+(140.32799504,380.63070991)(136.85999511,378.49470996)
+ \xmulineto(140.21866171,380.19737659)
+(143.63599496,381.77604322)(147.09332822,383.22404318)
+ \xmulineto(150.55199481,384.66670981)
+(154.61466139,386.18804311)(159.25999462,387.7973764)
+-- (185.39599404,396.84404284)
+-- (190.74532726,381.32804323)
+-- (120.24012881,356.92137716)
+-- (114.28119561,374.19737674)
+-- (141.43199501,393.86937625)
+ \xmulineto(144.26532828,395.93204287)
+(147.24532822,397.96404282)(150.34932815,399.96404277)
+ \xmulineto(153.43732808,401.95337605)
+(156.73999468,403.937376)(160.2239946,405.91204262)
+ \xmulineto(155.11999471,403.62004268)
+(150.25466149,401.56270939)(145.66666159,399.68804277)
+ \xmulineto(141.08799502,397.82804282)
+(136.78132845,396.20804286)(132.7811952,394.81737623)
+-- (109.90159571,386.89604309)
+-- cycle
+(165.88532781,465.76537448)
+-- (110.82812902,459.5680413)
+ \xmulineto(108.39066241,459.2920413)
+(106.67186245,458.70270798)(105.69732913,457.80270801)
+ \xmulineto(104.71879582,456.89604136)
+(104.32292916,455.56270806)(104.52132916,453.81737477)
+ \xmulineto(104.71359582,452.04137481)
+(105.41612914,450.80270818)(106.60412911,450.10937486)
+ \xmulineto(107.79212909,449.41204155)
+(109.58386238,449.20270822)(111.95306233,449.47337488)
+-- (167.01599445,455.67204139)
+-- (168.89599441,438.86937514)
+-- (116.59839556,432.97870862)
+ \xmulineto(108.9734624,432.12537531)
+(103.03066253,433.30270861)(98.78119595,436.5213752)
+ \xmulineto(94.53066271,439.74937512)
+(92.0051961,445.00004166)(91.18799612,452.31204147)
+ \xmulineto(90.38026281,459.5360413)
+(91.69732944,465.17737449)(95.15052937,469.27604106)
+ \xmulineto(98.59839596,473.36004095)
+(104.11452917,475.82270756)(111.70786234,476.68270754)
+-- (164.00532785,482.56270739)
+%盾牌
+(415.70265563,791.96403309)
+-- (330.45332418,717.80270159)
+ \xmulineto(354.11999032,715.06803499)
+(369.92665664,689.29736896)(369.98932331,667.01070284)
+-- (370.15598997,615.54137078)
+ \xmulineto(370.27065663,569.55737191)
+(371.91732326,488.10937392)(422.05198883,467.90137442)
+ \xmulineto(431.06798863,464.27070785)
+(477.52132094,453.36004145)(499.93198711,442.33870839)
+ \xmulineto(526.53598652,428.2813754)
+(529.42665313,416.90670902)(533.28131971,414.7400424)
+ \xmulineto(537.13998629,416.90670902)
+(539.94798623,428.2813754)(566.55198564,442.33870839)
+ \xmulineto(588.96398515,453.36004145)
+(635.41198412,464.27070785)(644.43198392,467.90137442)
+ \xmulineto(694.56798282,488.10937392)
+(696.21331611,569.55737191)(696.32264945,615.54137078)
+-- (696.49464944,667.01070284)
+ \xmulineto(696.55198277,689.29736896)
+(712.35998243,715.06803499)(736.02664857,717.80270159)
+-- (650.78131712,791.96403309)
+ \xmulineto(610.29198468,766.80670038)
+(582.98398528,755.21870066)(533.28131971,755.21870066)
+ \xmulineto(483.57865414,755.21870066)
+(456.19332141,766.80670038)(415.70265563,791.96403309)
+-- cycle
+(416.96932227,780.78670003)
+ \xmulineto(454.8959881,757.23470061)
+(486.74932073,747.26536753)(533.28131971,747.26536753)
+ \xmulineto(579.81731868,747.26536753)
+(611.58398465,757.23470061)(649.51065048,780.78670003)
+-- (719.5213156,721.27603483)
+ \xmulineto(717.92131564,721.54136816)
+(700.08264936,712.21870172)(691.66664955,686.3120357)
+ \xmulineto(688.28664962,675.88536929)
+(688.02664963,662.94803627)(688.19731629,649.9120366)
+ \xmulineto(688.35464962,637.66137023)
+(687.9173163,625.3120372)(688.02664963,614.86403746)
+ \xmulineto(687.36931631,572.06803852)
+(687.11998298,496.02670706)(641.13065066,475.6880409)
+ \xmulineto(632.63065085,472.27070765)
+(588.34398516,462.19737456)(567.22931896,451.81737482)
+ \xmulineto(541.73998619,439.28670846)
+(537.9693196,431.96937531)(533.28131971,428.95870872)
+
+ \xmulineto(528.59865314,431.96937531)
+(524.73998656,439.28670846)(499.25465379,451.81737482)
+ \xmulineto(478.13598759,462.19737456)
+(433.85465523,472.27070765)(425.34932209,475.6880409)
+ \xmulineto(379.35998977,496.02670706)
+(379.11465644,572.06803852)(378.45332312,614.86403746)
+ \xmulineto(378.56265645,625.3120372)
+(378.12532313,637.66137023)(378.28665646,649.9120366)
+ \xmulineto(378.45332312,662.94803627)
+(378.19732313,675.88536929)(374.81198987,686.3120357)
+ \xmulineto(366.40132339,712.21870172)
+(348.55732378,721.54136816)(346.96399048,721.27603483)
+%xmu 止于至善
+(434.93732188,370.32271017)
+ \xmulineto(434.01598856,370.24537683)
+(433.66665524,369.74537685)(433.90665523,368.8387102)
+ \xmulineto(433.98398856,367.91204356)
+(433.8853219,367.20804358)(433.61998857,366.71871025)
+ \xmulineto(433.48398857,366.54671026)
+(433.20265525,366.1360436)(432.78665526,365.47871029)
+ \xmulineto(431.36932195,363.95337699)
+(430.37465531,362.86004368)(429.80665532,362.19337703)
+ \xmulineto(429.10398867,361.35471039)
+(428.82798868,360.9427104)(428.98932201,360.9587104)
+ \xmulineto(429.15065534,360.81204373)
+(429.81732199,361.09871039)(430.99998863,361.82271038)
+ \xmulineto(431.43732195,362.1720437)
+(432.70265526,362.90671035)(434.78665521,364.01071032)
+ \xmulineto(436.12532185,364.74937697)
+(437.00532183,365.29737696)(437.44265515,365.64004361)
+ \xmulineto(437.73465515,365.82804361)
+(438.3333218,366.1040436)(439.23998845,366.49471026)
+ \xmulineto(440.43732175,367.06271025)
+(440.85998841,367.56804357)(440.50532175,368.00004356)
+ \xmulineto(438.66132179,369.55204352)
+(436.80665517,370.3280435)(434.93732188,370.32271017)
+-- cycle
+(508.55198692,374.04137674)
+ \xmulineto(508.38532026,374.03071007)
+(508.15598693,373.93737674)(507.84398693,373.75471008)
+ \xmulineto(503.5466537,372.07337679)
+(496.06798719,370.70804349)(485.41598743,369.66137685)
+ \xmulineto(482.52132083,369.34404352)
+(482.2919875,368.8387102)(484.77065411,368.16137689)
+ \xmulineto(487.38532072,367.81204356)
+(489.978654,367.87471023)(492.54665394,368.33337688)
+ \xmulineto(493.42665392,367.07871025)
+(493.18798726,365.19737696)(491.86932062,362.69737702)
+ \xmulineto(489.33332068,358.34937713)
+(486.56265407,355.6093772)(483.53598747,354.47337722)
+ \xmulineto(483.05732081,354.28137723)
+(482.74532082,354.10937723)(482.58798749,353.93737724)
+ \xmulineto(482.14532083,353.10404392)
+(482.04665417,351.95871062)(482.28132083,350.51604399)
+ \xmulineto(482.49465416,349.54671068)
+(482.92132082,349.07871069)(483.57865414,349.12004402)
+ \xmulineto(483.57865414,349.12004402)
+(484.29732079,349.32271068)(485.73465409,349.72404401)
+ \xmulineto(487.81198738,350.31737733)
+(495.24532055,352.41204394)(508.0306536,356.00004385)
+ \xmulineto(508.20798693,355.84937719)
+(508.36932026,355.69737719)(508.54665359,355.53604386)
+ \xmulineto(510.61465354,353.38004392)
+(512.03065351,352.47871061)(512.83332016,352.84404393)
+ \xmulineto(514.51598679,354.54671056)
+(514.32798679,356.7347105)(512.23998684,359.3853771)
+ \xmulineto(510.86398687,360.77604373)
+(508.53065359,361.95337704)(505.24532033,362.91204368)
+ \xmulineto(502.11465373,363.72404366)
+(501.14532042,363.51071033)(502.35998706,362.27071036)
+ \xmulineto(503.55732036,361.03604373)
+(505.02132033,359.41204377)(506.74532029,357.39071048)
+ \xmulineto(498.55198714,355.83337719)
+(492.11998728,354.67737722)(487.45865405,353.95337724)
+ \xmulineto(489.77598733,356.01604385)
+(492.86398726,359.17737711)(496.69732051,363.437377)
+ \xmulineto(496.99998717,363.77604366)
+(497.39065383,364.12004365)(497.85998715,364.46937698)
+ \xmulineto(500.21332044,365.89071027)
+(499.81732044,367.33337691)(496.66132051,368.7867102)
+ \xmulineto(503.58398703,369.80271018)
+(508.48398692,370.63071016)(511.37998686,371.25471014)
+ \xmulineto(512.97332015,371.6773768)
+(513.42665348,372.34404345)(512.72398683,373.28137676)
+ \xmulineto(512.04665351,373.89071008)
+(510.65598687,374.15071007)(508.55198692,374.04137674)
+-- cycle
+(579.06265203,374.78137672)
+ \xmulineto(578.24531872,374.67737672)
+(578.13598538,374.19337674)(578.7493187,373.34937676)
+ \xmulineto(579.51598535,372.48404345)
+(579.41598536,370.63071016)(578.45865204,367.76004356)
+ \xmulineto(575.8066521,357.51071048)
+(572.43198551,350.31737733)(568.32265227,346.14537743)
+ \xmulineto(566.93731897,344.59337747)
+(567.16665229,344.34404414)(569.00531892,345.38004411)
+ \xmulineto(573.89065215,348.86004403)
+(577.77598539,354.74004388)(580.63998533,363.02137701)
+ \xmulineto(581.69731864,361.51604372)
+(583.4733186,358.33337713)(585.98398521,353.50004391)
+ \xmulineto(587.17198519,351.4893773)
+(587.99465183,350.06271067)(588.44265182,349.22937735)
+ \xmulineto(588.95331848,346.77604408)
+(591.66665175,345.82271077)(596.55731831,346.37471076)
+ \xmulineto(597.0413183,346.34937742)
+(597.44265163,346.32804409)(597.77598495,346.30671076)
+ \xmulineto(599.39598492,346.38004409)
+(600.45865156,346.57337742)(600.96398488,346.87471074)
+ \xmulineto(601.4693182,347.16671074)
+(601.24531821,347.51071073)(600.28665156,347.88004405)
+ \xmulineto(592.5733184,352.50004394)
+(587.54131851,356.82804383)(585.1506519,360.84404373)
+ \xmulineto(583.4733186,362.86937702)
+(582.24531863,364.24004365)(581.47331864,364.93204363)
+ \xmulineto(582.0679853,367.16137691)
+(582.82265195,369.0787102)(583.7133186,370.65071016)
+ \xmulineto(583.91198526,371.12537681)
+(583.99998526,371.52671014)(584.01065192,371.84937679)
+ \xmulineto(583.42665193,372.8547101)
+(581.7759853,373.83337675)(579.06265203,374.78137672)
+-- cycle
+(641.53598399,343.54137749)
+ \xmulineto(642.97331729,343.2133775)
+(645.40665057,343.08804417)(648.83865049,343.18271084)
+ \xmulineto(651.11465044,343.08804417)
+(652.57865041,342.98937751)(653.21331706,342.91737751)
+ \xmulineto(655.15065035,342.68804418)
+(656.17198366,343.06271084)(656.281317,344.02671081)
+ \xmulineto(656.27065033,345.33871078)
+(655.38531702,346.1720441)(653.63065039,346.54137742)
+ \xmulineto(652.51065041,346.67204408)
+(650.46398379,346.58404408)(647.47865052,346.27604409)
+ \xmulineto(644.99998391,345.9120441)
+(643.09865062,345.72937744)(641.79198398,345.70804411)
+ \xmulineto(642.42665063,351.18271064)
+(643.13998395,355.17737721)(643.92131727,357.69737714)
+ \xmulineto(644.19331726,358.64537712)
+(644.45865059,359.51604377)(644.70265058,360.30271041)
+ \xmulineto(644.94265058,360.92137706)
+(645.08265058,361.39604372)(645.11998391,361.71337704)
+ \xmulineto(644.50531726,363.42671034)
+(642.19331731,364.66671031)(638.21331739,365.45871029)
+ \xmulineto(637.21331742,365.24004362)
+(637.10931742,364.34937698)(637.90665073,362.80271035)
+ \xmulineto(638.41198406,361.59337705)
+(638.70265072,360.58804374)(638.77598405,359.76004376)
+ \xmulineto(639.16665071,354.65604389)
+(637.9693174,342.96937751)(635.20265079,324.69737796)
+-- (625.942651,325.03604462)
+ \xmulineto(625.958651,326.50004458)
+(626.01598433,328.4587112)(626.12531766,330.89071114)
+ \xmulineto(626.37465099,337.22937765)
+(626.66665098,341.10937755)(626.98931764,342.53071085)
+ \xmulineto(627.06265097,343.1773775)
+(627.2399843,343.97337748)(627.5159843,344.92137746)
+ \xmulineto(627.75465096,345.54137744)
+(627.80665096,346.02671077)(627.68265096,346.36404409)
+ \xmulineto(626.54131765,347.80271072)
+(624.55198436,348.93204403)(621.71331776,349.74937734)
+ \xmulineto(620.58398445,349.88537734)
+(620.48931778,349.07871069)(621.43731776,347.33871073)
+ \xmulineto(622.10931775,346.11471076)
+(622.48931774,345.17204412)(622.57331774,344.51604414)
+ \xmulineto(622.9999844,341.19737755)
+(622.9119844,334.76537771)(622.29731774,325.21337795)
+ \xmulineto(618.51598449,325.00537795)
+(614.78131791,325.10937795)(611.08265133,325.54137794)
+ \xmulineto(609.12531804,325.59871127)
+(608.36931805,325.36937794)(608.80265138,324.82804462)
+ \xmulineto(609.69731802,324.22937797)
+(611.33865132,323.63071132)(613.7239846,323.03071133)
+ \xmulineto(621.41598443,323.28137799)
+(629.47865092,323.161378)(637.9013174,322.67737801)
+ \xmulineto(641.78131732,322.39071135)
+(645.64531723,321.94271136)(649.48931715,321.33337804)
+ \xmulineto(653.1826504,320.90671139)
+(656.70798365,320.32804473)(660.05731691,319.61471142)
+ \xmulineto(662.77598352,319.1453781)
+(663.90665016,319.74537808)(663.44265017,321.42671137)
+ \xmulineto(662.36398353,323.34404466)
+(660.55198357,324.53604463)(657.99465029,324.98937795)
+ \xmulineto(657.18265031,325.08271128)
+(654.81198369,325.03604462)(650.87465045,324.84404462)
+ \xmulineto(645.6559839,324.79204462)
+(641.65065065,324.76537796)(638.87465071,324.76537796)
+-- cycle
+(558.21865249,371.7453768)
+ \xmulineto(560.7973191,368.20804355)
+(563.03598572,366.21871027)(564.96931901,365.79204361)
+ \xmulineto(567.43198562,366.47871026)
+(567.75998561,368.00004356)(565.93198565,370.36937683)
+ \xmulineto(560.39598578,373.0827101)
+(557.82798583,373.55204342)(558.21865249,371.7453768)
+-- cycle
+(567.16131896,361.29737706)
+ \xmulineto(566.8386523,361.31737705)
+(565.69731899,361.12537706)(563.7239857,360.74004374)
+ \xmulineto(556.51065253,359.17737711)
+(549.81731934,358.47337712)(543.65598615,358.63604379)
+ \xmulineto(542.52665284,358.53071046)
+(542.41598617,358.13071047)(543.35998615,357.43737715)
+ \xmulineto(544.59331946,356.22937718)
+(545.93198609,355.43204387)(547.36398606,355.03604388)
+ \xmulineto(547.85465272,355.01071054)
+(550.72398599,355.66671053)(555.98398587,357.01604383)
+ \xmulineto(556.4533192,350.33337733)
+(551.75998597,342.79204418)(541.90131952,334.38537772)
+ \xmulineto(540.55731955,333.48404441)
+(540.53598621,333.16137775)(541.84931952,333.41604441)
+ \xmulineto(543.00531949,333.68271107)
+(544.3386528,334.34404439)(545.8439861,335.40137769)
+ \xmulineto(551.56798597,339.15604427)
+(555.54131922,343.82271082)(557.7706525,349.37471068)
+ \xmulineto(557.93731916,349.36404402)
+(558.25998582,349.27071069)(558.73465248,349.07871069)
+
+ \xmulineto(560.79198577,348.16671071)
+(561.90131908,347.53071073)(562.04131907,347.20804407)
+ \xmulineto(562.31198573,346.05737743)
+(561.77598575,343.73471082)(560.45865244,340.22937758)
+ \xmulineto(559.15065247,336.89071099)
+(558.07865249,335.0053777)(557.24531918,334.56271105)
+ \xmulineto(557.07865252,334.57337771)
+(556.36398586,334.76537771)(555.08798589,335.1613777)
+ \xmulineto(552.70798595,336.09871101)
+(551.8173193,336.22937767)(552.42665262,335.54137769)
+ \xmulineto(553.80265259,333.84937773)
+(554.67731924,332.10404444)(555.07331923,330.29204449)
+
+ \xmulineto(555.05198589,329.97337783)
+(555.12531923,329.80271117)(555.29198589,329.79737783)
+ \xmulineto(556.56265253,329.24004451)
+(558.04131916,329.73471117)(559.74931912,331.2653778)
+ \xmulineto(561.13065243,332.80671109)
+(562.29731907,335.10404437)(563.27065238,338.13604429)
+ \xmulineto(564.44265235,341.96937753)
+(565.56798566,344.74937746)(566.63598564,346.47871075)
+ \xmulineto(566.81198563,346.95871074)
+(566.91731897,347.27071073)(566.92131897,347.4373774)
+ \xmulineto(566.34931898,348.76537736)
+(565.34398567,349.79737734)(563.91731903,350.51604399)
+ \xmulineto(563.59331904,350.53071065)
+(563.19731905,350.63604398)(562.71865239,350.82271065)
+ \xmulineto(561.42665242,350.89071065)
+(560.21865245,351.03071064)(559.09865247,351.25471064)
+ \xmulineto(559.2759858,351.73471062)
+(559.63065246,352.28671061)(560.15065245,352.9067106)
+ \xmulineto(560.6773191,353.68271058)
+(560.87465243,354.24537723)(560.72398577,354.57871055)
+ \xmulineto(560.90665243,354.88537721)
+(559.81198579,355.75471053)(557.45865251,357.17737716)
+ \xmulineto(561.87465241,357.92137714)
+(565.62531899,358.29737713)(568.70798559,358.29737713)
+ \xmulineto(570.32265222,358.21337713)
+(570.99998554,358.65604379)(570.73465221,359.65071043)
+ \xmulineto(570.13065223,360.6507104)
+(568.94265225,361.20271039)(567.16131896,361.29737706)
+-- cycle
+(576.0786521,345.49471078)
+ \xmulineto(576.22398543,345.33337745)
+(576.45331876,344.98937746)(576.74931875,344.48404414)
+ \xmulineto(579.48398536,341.09871089)
+(581.27065198,339.46937759)(582.08265196,339.58404426)
+ \xmulineto(584.41198525,340.60404423)
+(584.81731857,342.20271086)(583.31198527,344.39071081)
+ \xmulineto(578.07331872,346.60404408)
+(575.66131877,346.97871074)(576.0786521,345.49471078)
+-- cycle
+(574.06798547,335.13071103)
+ \xmulineto(577.54131873,330.25071115)
+(580.46398533,327.25471123)(582.84398528,326.15604459)
+ \xmulineto(585.32798523,327.1613779)
+(585.59865189,329.09871118)(583.63998526,331.96404445)
+ \xmulineto(582.22931863,333.00537775)
+(579.86398535,334.18804439)(576.51598542,335.49471103)
+ \xmulineto(574.2813188,336.09871101)
+(573.46931882,335.98404435)(574.06798547,335.13071103)
+-- cycle
+(501.75465374,341.31204422)
+ \xmulineto(504.17198702,341.59871087)
+(506.73998696,342.05737753)(509.47332023,342.68804418)
+ \xmulineto(511.88532018,342.97871084)
+(513.06798682,343.53071083)(513.02665349,344.33871081)
+ \xmulineto(512.80665349,345.30671078)
+(511.57865352,345.71871077)(509.31732024,345.59871078)
+ \xmulineto(508.82798691,345.57337744)
+(508.0986536,345.45871078)(507.13998695,345.24537745)
+ \xmulineto(506.17198697,345.19737745)
+(504.40665368,344.86404413)(501.83865373,344.24537748)
+ \xmulineto(501.77065374,345.53071078)
+(501.9373204,346.84404408)(502.35998706,348.16137738)
+ \xmulineto(502.49998705,348.65604403)
+(502.47865372,349.06271069)(502.29732039,349.36937735)
+ \xmulineto(499.46932045,350.84937731)
+(497.32265383,351.5413773)(495.8599872,351.46404396)
+ \xmulineto(495.20798721,351.43204397)
+(495.24532055,350.79204398)(495.9639872,349.53071068)
+ \xmulineto(497.04665384,347.4733774)
+(497.64532049,345.40137745)(497.75465382,343.28671083)
+ \xmulineto(496.30265386,343.05737751)
+(494.36932057,342.70804418)(491.96398728,342.26004419)
+ \xmulineto(489.22932068,341.7920442)
+(487.78132071,341.55204421)(487.61998738,341.54671088)
+ \xmulineto(485.22398743,340.93204422)
+(485.65065409,340.3907109)(488.92132069,339.90671092)
+ \xmulineto(491.52665396,339.72404425)
+(494.51598723,339.96937758)(497.89598715,340.6307109)
+-- (498.56798714,332.38537777)
+ \xmulineto(491.96398728,331.39071113)
+(485.67732076,330.56804448)(479.71332089,329.93737783)
+ \xmulineto(478.74532091,329.71871117)
+(478.02665426,329.60937784)(477.54132094,329.57871117)
+ \xmulineto(475.28132099,329.30271118)
+(474.40665434,328.93204452)(474.92132099,328.46937787)
+ \xmulineto(475.74532098,328.19337787)
+(477.4639876,327.87471121)(480.07865421,327.52671122)
+ \xmulineto(480.24532088,327.53071122)
+(480.81198753,327.64537789)(481.76532084,327.85471121)
+ \xmulineto(495.25065388,330.66137781)
+(509.14532024,331.79737778)(523.45331992,331.25471113)
+ \xmulineto(526.2026532,331.24004446)
+(527.13998651,332.02137778)(526.2506532,333.58804441)
+ \xmulineto(525.02131989,335.15604437)
+(522.86931994,336.00537768)(519.77598667,336.18271101)
+ \xmulineto(519.30265335,336.15071101)
+(518.4159867,336.02671101)(517.1306534,335.79204435)
+ \xmulineto(512.94798682,334.92671104)
+(507.96932027,334.01071106)(502.18798706,333.06804442)
+-- cycle
+(417.14532227,365.77604361)
+ \xmulineto(416.35998895,365.85471028)
+(416.16665562,365.45337695)(416.55198895,364.55204364)
+ \xmulineto(417.10932227,363.51071033)
+(418.06265558,362.43204369)(419.40132222,361.30271039)
+ \xmulineto(420.25065553,360.43737708)
+(421.04132218,360.19737708)(421.7866555,360.57337707)
+ \xmulineto(422.53598882,360.9427104)
+(422.85465548,361.67737705)(422.76532214,362.75471035)
+ \xmulineto(422.13065549,364.7187103)
+(420.25998887,365.72404361)(417.14532227,365.77604361)
+-- cycle
+(429.84398865,351.00004398)
+ \xmulineto(433.83865523,351.49471063)
+(436.50532184,352.04137728)(437.85998848,352.6307106)
+ \xmulineto(439.16665512,353.66137724)
+(438.27598847,354.1360439)(435.17198854,354.02671057)
+ \xmulineto(434.71332188,353.98937724)
+(433.78665523,353.82804391)(432.4159886,353.55204391)
+ \xmulineto(431.35998862,353.15604392)
+(430.52132197,352.92137726)(429.90665532,352.86404393)
+ \xmulineto(429.88532199,353.18271059)
+(429.99998865,353.65604391)(430.25465531,354.30271056)
+ \xmulineto(430.35998864,354.78137722)
+(430.41198864,355.16671054)(430.38532198,355.47871053)
+ \xmulineto(430.34398864,355.93737719)
+(429.91198865,356.45337717)(429.093322,357.00004383)
+ \xmulineto(434.59332188,358.09337713)
+(438.18265514,358.86937711)(439.8546551,359.32271044)
+ \xmulineto(440.74932175,359.70804376)
+(440.93732174,360.27071041)(440.40665509,361.00537706)
+ \xmulineto(439.74532177,361.41204372)
+(438.72932179,361.55204372)(437.33865516,361.43204372)
+ \xmulineto(437.18798849,361.42137705)
+(436.64532184,361.29204372)(435.73465519,361.06804373)
+ \xmulineto(429.96932198,359.32804377)
+(423.4119888,357.98937714)(416.03065563,357.04137716)
+ \xmulineto(414.65065566,356.77604383)
+(414.52665566,356.37471051)(415.66665563,355.84937719)
+ \xmulineto(416.62532228,355.46404387)
+(418.03598891,355.35471054)(419.89598887,355.51071053)
+ \xmulineto(421.13065551,355.62004386)
+(422.42132215,355.81204386)(423.80265545,356.07871052)
+ \xmulineto(424.6453221,355.3693772)
+(425.30265542,354.0360439)(425.78665541,352.04671062)
+ \xmulineto(423.63998879,351.5573773)
+(421.35465551,351.13071064)(418.90132223,350.76004398)
+ \xmulineto(418.01065558,350.21871066)
+(418.5159889,349.79737734)(420.40665553,349.49471068)
+ \xmulineto(421.8066555,349.45871068)
+(423.73465546,349.70271067)(426.17732207,350.21871066)
+-- (426.51598873,346.28671076)
+ \xmulineto(421.30265551,345.37471078)
+(417.46932226,344.8067108)(414.99998898,344.5987108)
+ \xmulineto(413.79198901,344.18804414)
+(413.83332234,343.72404416)(415.11465565,343.2133775)
+ \xmulineto(416.06265562,342.97337751)
+(417.69332226,342.96937751)(420.01598887,343.16671084)
+ \xmulineto(421.85998883,343.32271083)
+(423.47332213,343.54671083)(424.85465543,343.80671082)
+ \xmulineto(425.60932208,344.03604415)
+(426.22932207,344.16671081)(426.69732206,344.20271081)
+-- (427.18798871,335.61471102)
+ \xmulineto(426.72398872,335.56804436)
+(426.03598874,335.44271103)(425.11998876,335.20271103)
+ \xmulineto(413.45332235,333.57871107)
+(406.4533225,332.74937776)(404.11998922,332.71337776)
+ \xmulineto(403.04132258,332.62004443)
+(402.83865592,332.28137777)(403.50532257,331.72937779)
+ \xmulineto(404.67732254,330.74004448)
+(405.97332251,330.06271116)(407.40665582,329.7240445)
+ \xmulineto(407.56798915,329.7400445)
+(408.17198913,329.8600445)(409.24532244,330.11471116)
+ \xmulineto(413.44265568,331.88004445)
+(423.4639888,333.74537774)(439.30665511,335.72937769)
+ \xmulineto(443.31732169,336.06804434)
+(448.20265492,336.16671101)(453.96932146,336.04671101)
+ \xmulineto(454.43198811,336.08804434)
+(454.66665477,336.10937768)(454.66665477,336.10937768)
+ \xmulineto(456.3493214,336.41204434)
+(456.42665473,337.26004432)(454.9119881,338.69737761)
+ \xmulineto(453.41598813,339.80671092)
+(451.66132151,340.27604424)(449.66132155,340.10404424)
+ \xmulineto(448.8906549,340.04137758)
+(446.82265495,339.63604426)(443.46932169,338.87471094)
+ \xmulineto(440.72932175,338.17204429)
+(438.89065512,337.78671097)(437.96932181,337.7080443)
+ \xmulineto(440.13065509,339.76004425)
+(441.63065506,341.28137755)(442.47865504,342.28671086)
+ \xmulineto(443.03598836,342.96404417)
+(442.83865503,343.48937749)(441.86932172,343.87471082)
+ \xmulineto(440.41598842,344.5267108)
+(439.00532179,344.71337746)(437.63065515,344.43737747)
+ \xmulineto(437.0159885,344.38004414)
+(436.89065517,343.98404415)(437.25998849,343.24004417)
+ \xmulineto(437.64532182,342.33871086)
+(437.78132181,341.65071087)(437.67732181,341.18271088)
+ \xmulineto(437.0359885,339.57337759)
+(436.30665518,338.18804429)(435.46398853,337.02671099)
+-- (430.40665531,336.13071101)
+-- (430.16132198,344.50537747)
+ \xmulineto(431.38532195,344.7547108)
+(433.22398858,345.07871079)(435.67732186,345.43204411)
+ \xmulineto(439.19732178,346.05737743)
+(441.49465506,346.47871075)(442.56265504,346.72937741)
+ \xmulineto(443.77598835,347.14004407)
+(444.03598834,347.63604406)(443.36398836,348.19337738)
+ \xmulineto(442.55732171,348.58804404)
+(441.22932174,348.7187107)(439.37465511,348.55737737)
+ \xmulineto(439.06798845,348.5267107)
+(438.06798847,348.36404404)(436.37998851,348.05737738)
+ \xmulineto(434.08265523,347.71337739)
+(431.93198861,347.37471073)(429.94265532,347.04137741)
+-- cycle
+(422.16132216,339.84937758)
+ \xmulineto(421.31198884,340.70804423)
+(419.80265554,341.19737755)(417.60932226,341.32804421)
+ \xmulineto(416.83332227,341.26004422)
+(416.90132227,340.48937757)(417.80265559,339.00537761)
+
+ \xmulineto(419.05198889,337.09337765)
+(420.07865554,336.09337768)(420.85998885,336.00537768)
+ \xmulineto(422.49998882,336.77604433)
+(422.94265547,338.0520443)(422.16132216,339.84937758)
+-- cycle
+(438.4693218,331.92137778)
+ \xmulineto(438.00532181,331.88537778)
+(436.32798851,331.50004446)(433.43198858,330.78137781)
+ \xmulineto(428.71865535,329.6040445)
+(424.68265543,328.64004453)(421.32798884,327.89071121)
+ \xmulineto(420.16665553,328.72404453)
+(419.05198889,329.01604452)(417.98398892,328.76537786)
+ \xmulineto(417.22932227,328.54137786)
+(417.27598893,328.00537788)(418.11998891,327.14004457)
+ \xmulineto(418.66132223,326.41604458)
+(419.25065555,324.83337796)(419.92665554,322.40671135)
+ \xmulineto(420.3853222,320.73471139)
+(420.81732219,319.28671143)(421.22932218,318.07871146)
+ \xmulineto(421.81198883,316.74004482)
+(422.48932215,316.02137817)(423.28665547,315.92671151)
+ \xmulineto(423.88532212,316.14004484)
+(424.05732212,316.92671148)(423.77598879,318.29737812)
+ \xmulineto(424.23998878,318.33871145)
+(426.0826554,318.57871144)(429.30665533,319.01071143)
+ \xmulineto(436.21865518,320.07337807)
+(440.74932175,320.68271139)(442.91198837,320.86937805)
+ \xmulineto(443.52132169,321.08804471)
+(443.57332168,321.39604471)(443.06798836,321.82271136)
+ \xmulineto(442.55198837,322.39604468)
+(441.80665506,322.80271134)(440.86398841,323.03604467)
+ \xmulineto(441.90132172,325.45337794)
+(443.22932169,327.12004457)(444.86398832,328.03071121)
+ \xmulineto(445.59332164,328.5627112)
+(445.21865498,329.30671118)(443.73465501,330.27604449)
+ \xmulineto(441.78665506,331.35471113)
+(440.0266551,331.89604445)(438.4693218,331.92137778)
+-- cycle
+(421.91198883,326.53071125)
+ \xmulineto(422.21865549,326.56271125)
+(423.21865547,326.72937791)(424.89598876,327.02671123)
+ \xmulineto(429.32265533,328.02671121)
+(433.45332191,328.68804453)(437.31732182,329.02137785)
+ \xmulineto(437.93732181,329.07337785)
+(438.23465514,328.3227112)(438.20798847,326.76537791)
+ \xmulineto(438.05732181,324.89071129)
+(437.63598848,323.45871132)(436.94265516,322.45871135)
+-- (423.42132213,319.67204475)
+;
+%三个圆
+\path [draw=xmucolor,line width=3mm] (540,535) circle (9cm);
+\path [draw=xmucolor,line width=1mm] (540,535) circle (8.5cm);
+\path [draw=xmucolor,line width=1mm] (537,535) circle (5.7cm);
+%两颗八角星
+\node[star,star points=8,star point height=.3cm,minimum size=1.65cm,
+star point ratio=1.7,fill=xmucolor]at (140,595) { } ;
+\node[star,star points=8,star point height=.3cm,minimum size=1.65cm,
+star point ratio=1.7,fill=xmucolor]at (934,595) { } ;
+%%三颗五角星
+\path [draw=xmucolor,line width=1mm] (537,535) circle (5.7cm);
+%三颗五角星
+\node [star, star point height=.2cm, minimum size=0.6cm,
+line width=0.5mm, draw=xmucolor]
+at (533,474) { };
+\node [star, star point height=.2cm, minimum size=0.6cm,
+line width=0.5mm, draw=xmucolor]
+at (418,730) { };
+\node [star, star point height=.2cm, minimum size=0.6cm,
+line width=0.5mm, draw=xmucolor]
+at (648,730) { };
+%横线
+%真正的
+\draw [line width=1mm, xmucolor ](390,510) -- (680,510);
+\draw [line width=1mm, xmucolor ](470,510) -- (500,539);
+\draw [line width=1mm, xmucolor ](600,510) -- (567,539);
+\draw [line width=1mm, xmucolor ](376,568) -- (452,568);
+\draw [line width=1mm, xmucolor ](615,568) -- (694,568);
+\draw [line width=1mm, xmucolor ](502,568) -- (562,568);
+\draw [line width=1mm, xmucolor ](645,623) -- (693,623);
+\draw [line width=1mm, xmucolor ](373,623) -- (422,623);
+\draw [line width=1mm, xmucolor ](373,691) -- (483,691);
+\draw [line width=1mm, xmucolor ](582,691) -- (697,691);
+
+%城堡
+\draw [line width=1mm, xmucolor ](482,713)--(483,679)
+ --(582,679)--(582,710)--(567.8,710)--(567.8,691)
+ --(553.6,691)--(553,710)--(539.4,710)--(539.4,691)
+ --(525.2,691)--(525.2,710)--(511,710)--(511,691)
+ --(496.8,691)--(496.8,710)--(482.6,710);
+
+\draw [line width=1mm, xmucolor ](483,659)--(483,679) ;
+
+% 城堡左顶
+\draw [line width=0.75mm, xmucolor ](422,641)--(422,672)--(434,672)
+ --(434,656)--(446,656)--(446,672)--(458,672)--(458,656)
+ --(470,656)--(470,672)--(482,672);
+
+% 城堡右顶
+\draw [line width=0.75mm, xmucolor ](645,641)--(645,672)
+ --(633,672)--(633,656)--(621,656)--
+(621,672)--(609,672)--(609,656)--(597,656)--(597,672)--(585,672);
+
+\draw [line width=1mm, draw=xmucolor] (582,679) rectangle (483,659);
+\draw [line width=1mm, draw=xmucolor] (508,679)--(508,659);
+\draw [line width=1mm, draw=xmucolor] (533,679)--(533,659);
+\draw [line width=1mm, draw=xmucolor] (558,679)--(558,659);
+
+\draw [line width=1mm, draw=xmucolor] (575,641) rectangle (490,659);
+\draw [line width=1mm, draw=xmucolor] (518,641) rectangle (546,659);
+
+\draw [line width=1mm, draw=xmucolor] (422,641) rectangle (645,625);
+\draw [line width=0.75mm, draw=xmucolor] (438,641) rectangle (460,625);
+\draw [line width=0.75mm, draw=xmucolor] (607,641) rectangle (629,625);
+\draw [line width=0.75mm, draw=xmucolor] (485.6,641) rectangle (511.3,625);
+\draw [line width=0.75mm, draw=xmucolor] (562.7,641) rectangle (588.4,625);
+\draw [line width=0.75mm, draw=xmucolor] (534,641) -- (534,625);
+
+\draw [line width=0.75mm, draw=xmucolor] (422,606) rectangle (492.4,625);
+\draw [line width=0.75mm, draw=xmucolor] (442,606) rectangle (467,625);
+\draw [line width=0.75mm, draw=xmucolor] (575,606) rectangle (645.4,625);
+\draw [line width=0.75mm, draw=xmucolor] (600,606) rectangle (625.4,625);
+
+\draw [line width=0.75mm, draw=xmucolor]
+ (450,606) --(450,539)--(615.4,539)--(615.4,606);
+
+\draw [line width=0.75mm, draw=xmucolor] (450,539) rectangle (490,595);
+\draw [line width=0.75mm, draw=xmucolor] (450,578) rectangle (465,595);
+\draw [line width=0.75mm, draw=xmucolor] (490,578) rectangle (475,558);
+\draw [line width=0.75mm, draw=xmucolor] (450,578) rectangle (475,558);
+\draw [line width=0.75mm, draw=xmucolor] (475,605) --(475,595);
+\draw [line width=0.75mm, draw=xmucolor] (465,539) --(465,558);
+
+\draw [line width=0.75mm, draw=xmucolor] (575.4,539) rectangle (615.4,595);
+\draw [line width=0.75mm, draw=xmucolor] (603,578) rectangle (615.4,595);
+\draw [line width=0.75mm, draw=xmucolor] (575.4,578) rectangle (595,558);
+\draw [line width=0.75mm, draw=xmucolor] (575.4,578) rectangle (615.4,558);
+\draw [line width=0.75mm, draw=xmucolor] (590,605) --(590,595);
+\draw [line width=0.75mm, draw=xmucolor] (603,539) --(603,558);
+
+\draw [line width=0.75mm, draw=xmucolor] (504,539) rectangle (490,595);
+\draw [line width=0.75mm, draw=xmucolor] (504,553) --(490,553);
+\draw [line width=0.75mm, draw=xmucolor] (504,567) --(490,567);
+\draw [line width=0.75mm, draw=xmucolor] (504,581) --(490,581);
+
+
+\draw [line width=0.75mm, draw=xmucolor] (561.4,539) rectangle (575.4,595);
+\draw [line width=0.75mm, draw=xmucolor] (561.4,553) --(575.4,553);
+\draw [line width=0.75mm, draw=xmucolor] (561.4,567) --(575.4,567);
+\draw [line width=0.75mm, draw=xmucolor] (561.4,581) --(575.4,581);
+
+\draw [xmucolor,line width=0.75mm] (562,595)
+ arc [start angle=25, end angle=155, radius=0.55cm];
+\draw [xmucolor,line width=0.75mm] (575,592)
+ arc [start angle=13, end angle=165, radius=0.75cm];
+
+\draw [line width=0.5mm, draw=xmucolor] (534.5,611) --(534.5,622);
+\draw [line width=0.5mm, draw=xmucolor] (525,609) --(519,621);
+\draw [line width=0.5mm, draw=xmucolor] (517,605.5) --(506,615);
+\draw [line width=0.5mm, draw=xmucolor] (509,598) --(495,607);
+
+%\draw [line width=0.5mm, draw=xmucolor] (534.5,606) --(534.5,620);
+\draw [line width=0.5mm, draw=xmucolor] (542,610) --(550,620);
+\draw [line width=0.5mm, draw=xmucolor] (552,605) --(562,615);
+\draw [line width=0.5mm, draw=xmucolor] (558.5,596) --(573,607);
+}
+
+\def\xmuxiamendaxue{
+\fill[xmucolor]
+(2.54164114,5.90998736)
+ \xmulineto(6.23538773,12.32717387)
+(9.70830765,19.47877369)(13.08852091,25.31730688)
+ \xmulineto(18.02757413,34.29130666)
+(22.33957404,43.55690643)(26.02237396,51.98397289)
+ \xmulineto(31.85570716,66.47357253)
+(36.52757372,79.23970555)(40.24117364,92.63917188)
+ \xmulineto(40.99064029,95.35423848)
+(41.02237363,97.1913051)(40.88117363,97.44743843)
+ \xmulineto(40.09370698,98.84277173)
+(40.39170697,103.63557161)(41.49584028,108.17090483)
+ -- (42.44837359,112.09223807)
+ -- (43.91304023,112.09223807)
+ \xmulineto(45.60984019,112.09223807)
+(45.84477352,111.89023808)(48.67810679,107.92037151)
+ \xmulineto(51.58490673,103.84903827)
+(52.36450671,103.50943828)(57.59943993,104.04130494)
+ \xmulineto(67.79317304,104.98917158)
+(76.68383951,108.26463816)(86.53637262,111.0730381)
+ \xmulineto(91.63170584,112.46357139)
+(95.91303908,116.07303797)(101.46503896,116.16050464)
+ \xmulineto(106.13170552,116.11930464)
+(107.52757216,115.71317131)(109.48437212,113.83237136)
+ \xmulineto(111.75517207,111.64957141)
+(112.13690539,110.33237145)(111.03637208,108.45263816)
+ \xmulineto(109.50103878,105.81623823)
+(107.47397216,105.18757157)(100.36090565,105.12503824)
+ \xmulineto(92.58490582,105.05690491)
+(91.90783917,104.77557158)(89.38637256,100.52463836)
+ \xmulineto(86.90783928,96.85797178)
+(87.08850594,96.86837178)(89.2817059,93.04650521)
+ -- (94.36450578,93.04650521)
+ \xmulineto(99.27130567,93.04130521)
+(99.55837234,92.98290521)(102.5885056,91.47250525)
+ \xmulineto(106.27650552,89.63557196)
+(106.55303885,89.04650531)(104.85050555,84.91517207)
+ \xmulineto(103.48437225,81.59797216)
+(103.72503891,72.13917239)(104.52757223,68.62463914)
+ \xmulineto(105.13690555,65.95263921)
+(104.57970556,63.15583928)(102.97023893,60.869306)
+ \xmulineto(101.88117228,59.32250604)
+(101.15103897,58.85370605)(98.2145057,57.82250608)
+ \xmulineto(93.48437247,56.16570612)
+(88.24637258,53.23917286)(88.24637258,52.25943955)
+ \xmulineto(88.24637258,51.07250624)
+(92.15730583,49.71837294)(96.59943907,49.36930629)
+ \xmulineto(100.14063899,49.09277296)
+(100.56877231,48.95797296)(101.62650562,47.75423966)
+ \xmulineto(103.05303892,46.11930637)
+(105.50103887,41.63503981)(105.50103887,40.64543983)
+ \xmulineto(105.50103887,39.62463986)
+(103.90783891,36.48917327)(102.29317227,34.07250666)
+ \xmulineto(101.35570563,32.68704003)
+(100.45410565,31.2339734)(98.91303902,29.7646401)
+ \xmulineto(96.35570574,27.24904016)
+(98.83437235,26.72877351)(103.24637225,24.26464024)
+ \xmulineto(105.17810554,23.12464027)
+(107.0417055,22.17610696)(112.38117205,20.24384034)
+ \xmulineto(116.18903864,18.86410704)
+(120.01717188,17.79650706)(122.12077184,17.09797375)
+ \xmulineto(126.50623841,15.65584045)
+(130.94837164,15.39024046)(134.61997156,12.96312052)
+ -- (135.59330487,12.05686721)
+ -- (134.55863823,10.95842723)
+ \xmulineto(129.42183834,7.10374733)
+(124.20303846,6.07665402)(119.00103857,4.00998741)
+ \xmulineto(116.22503863,3.06780076)
+(114.03637202,3.00998743)(111.08850541,2.7704141)
+ -- (107.0745055,6.16102735)
+ \xmulineto(101.39170563,10.55165391)
+(96.31770574,14.05690716)(92.3035725,17.04650708)
+ \xmulineto(90.25517254,18.35744038)
+(87.89690593,20.96317365)(85.49583931,21.01464032)
+ \xmulineto(83.51143936,21.01464032)
+(77.73023948,17.31210708)(74.68903955,15.2079738)
+ \xmulineto(72.71450626,13.84277383)
+(71.68903962,13.37464051)(69.536373,12.41572053)
+ \xmulineto(65.91303974,10.96208057)
+(62.56357315,9.54645394)(58.19783991,9.09280061)
+ \xmulineto(55.90210663,9.28082728)
+(55.53637331,10.67665391)(57.40783993,12.11416054)
+ \xmulineto(58.09943992,12.64541386)
+(59.77650655,13.94744049)(61.13170652,15.00424047)
+ \xmulineto(62.48437315,16.06210711)
+(65.26610642,18.06730706)(67.30357305,19.46317369)
+ \xmulineto(72.47397293,22.9891736)
+(75.15103954,25.03077355)(74.70303955,27.26464016)
+ \xmulineto(74.40210622,28.74904013)
+(74.40210622,28.84277346)(73.14063958,30.71317341)
+ \xmulineto(71.33957296,33.39544001)
+(70.59943964,33.89024)(68.98437301,33.48397334)
+ \xmulineto(67.76037304,33.17610669)
+(67.30730638,32.77557336)(63.47397313,28.63504013)
+ \xmulineto(61.21450651,26.18704019)
+(55.9431733,23.0203736)(53.47024002,22.62464028)
+ \xmulineto(51.84477339,22.36410695)
+(51.71970672,22.42090695)(51.71970672,23.42090693)
+ \xmulineto(51.71970672,24.00944024)
+(52.47397337,25.43704021)(53.40210669,26.59277351)
+ \xmulineto(54.32397333,27.74384015)
+(56.29317329,30.34797342)(57.77130659,32.37984004)
+ \xmulineto(59.25157322,34.40583999)
+(61.30357318,37.06730659)(62.33957316,38.28597323)
+ \xmulineto(65.37503976,41.86410647)
+(65.37503976,43.95263975)(62.34477316,43.96837309)
+ \xmulineto(60.65103986,43.97877309)
+(56.40210662,47.15063967)(56.01143996,48.69077297)
+ \xmulineto(55.48437331,50.78597292)
+(56.10463996,51.5203729)(60.00103987,53.40583952)
+ \xmulineto(62.05837316,54.40063949)
+(63.88117312,55.56210613)(64.05303978,55.97877279)
+ \xmulineto(64.22503978,56.40063945)
+(64.42703978,63.36410594)(64.50623977,71.44743907)
+ \xmulineto(64.66250644,87.99903867)
+(64.57450644,87.56730534)(68.06357303,89.34903863)
+ \xmulineto(70.56357297,90.6250386)
+(75.5849062,95.46357181)(76.57970618,97.5621051)
+ \xmulineto(77.35570616,99.01570506)
+(76.9130395,101.26463834)(75.06357288,101.33757167)
+ \xmulineto(71.99583961,101.05690501)
+(57.85050659,95.05170516)(57.63170659,94.13557185)
+ \xmulineto(54.57450666,87.36837201)
+(49.89690676,73.44743902)(46.64064017,61.91570598)
+ \xmulineto(43.39170691,50.38503959)
+(41.09370696,41.50943981)(34.01717378,29.68130677)
+ \xmulineto(30.45410719,23.77037358)
+(28.7603739,20.69744033)(24.50624066,14.18130715)
+ \xmulineto(21.93797405,10.25426725)
+(15.25157419,3.97821407)(12.76664092,2.7704141)
+ \xmulineto(10.28226764,1.5678008)
+(7.18904104,0.37978216)(4.3176811,0.1141575)
+ \xmulineto(-1.8630521,-0.46969648)
+(-0.42033746,1.14488614)(2.54164114,5.90998736)
+ -- cycle
+(87.35570594,33.95264)
+ \xmulineto(90.21970587,35.85370662)
+(91.21450585,36.90063993)(92.10983917,38.96837321)
+ \xmulineto(94.16770579,43.71837309)
+(92.32917249,46.62983969)(86.79317262,47.36410633)
+ \xmulineto(85.01143932,47.597973)
+(84.23023934,47.483973)(83.13690603,46.84277301)
+ \xmulineto(81.3750394,45.50423971)
+(80.31250609,43.44223977)(79.05837279,42.06730647)
+ \xmulineto(77.57970615,40.45263984)
+(76.36970618,38.84797321)(76.36970618,38.49903989)
+ \xmulineto(76.36970618,37.41570658)
+(83.07450603,32.79130669)(84.667706,32.77557336)
+ \xmulineto(85.16770599,32.77037336)
+(86.37503929,33.30170668)(87.35570594,33.95264)
+ -- cycle
+(83.98437268,60.17610602)
+ \xmulineto(92.31250583,62.42610596)
+(92.42183916,62.28597263)(92.59370582,64.11930592)
+ \xmulineto(92.89690582,67.25943918)
+(91.95983917,67.46317251)(88.38637258,66.80690585)
+ \xmulineto(86.78743928,66.5094392)
+(84.631706,65.76463921)(83.04170603,65.29130589)
+ \xmulineto(81.94837272,64.96837257)
+(80.39170609,64.14543925)(79.74997277,64.01463926)
+ \xmulineto(77.02757283,63.45263927)
+(74.82917288,61.33757266)(77.36450616,59.28597271)
+ \xmulineto(78.03637281,58.74383939)
+(78.88637279,58.79650605)(83.98437268,60.17610602)
+ -- cycle
+(89.35570589,71.80583906)
+ \xmulineto(92.74997249,71.59223907)
+(93.31250581,72.08183906)(93.5937058,72.36837238)
+ \xmulineto(94.56877245,73.33757236)
+(94.07450579,75.69650564)(94.07970579,78.41517224)
+ \xmulineto(94.08330579,79.60890554)
+(93.53117247,81.0209055)(93.38117247,81.92037215)
+ \xmulineto(93.22503914,82.81623879)
+(92.75517249,84.62503875)(92.39690583,84.92037207)
+ \xmulineto(91.41303918,85.73970539)
+(80.76610608,86.19650538)(77.62077282,86.06210538)
+ \xmulineto(74.73023955,85.99903871)
+(74.93277288,85.57823872)(74.92703954,84.00423876)
+ \xmulineto(74.91823955,82.12503881)
+(74.62650622,81.80583882)(77.46503949,81.71317215)
+ -- (82.17290605,81.68237215)
+ \xmulineto(89.46503922,81.63023882)
+(91.15730585,81.58703882)(91.15730585,79.66050554)
+ \xmulineto(91.15730585,77.59223892)
+(88.81250591,76.73970561)(82.09370605,75.67090564)
+ \xmulineto(77.01717283,74.86317232)
+(76.08330619,75.05690565)(76.20837285,72.52983905)
+ \xmulineto(76.28743951,70.90637242)
+(77.32397283,70.42090577)(81.62650606,70.94223909)
+ \xmulineto(84.317706,71.17090575)
+(86.62077262,71.66050574)(89.35570589,71.80583906)
+ -- cycle
+(464.61063095,7.22353399)
+ \xmulineto(461.22929769,10.93708057)
+(459.74529773,12.17665387)(457.44396444,14.69077381)
+ \xmulineto(455.71463115,16.57717376)
+(453.44396453,20.59277366)(451.23996458,24.34797357)
+ \xmulineto(455.40663116,21.97877363)
+(462.23463101,18.89544037)(467.92796421,18.11410706)
+ \xmulineto(473.84929742,17.80690706)
+(475.51063071,25.9938402)(475.9386307,31.30170673)
+ \xmulineto(476.76129735,41.10370649)
+(476.47463069,41.8574398)(474.93329739,43.10370644)
+ \xmulineto(472.01063079,45.82717304)
+(470.33463083,46.20797303)(463.65729764,43.84797309)
+ \xmulineto(458.99063108,42.2026398)
+(453.90663119,40.75423983)(449.47996462,38.47357322)
+ \xmulineto(447.93863132,37.68130657)
+(443.64129808,37.75943991)(442.54796477,38.81730655)
+ \xmulineto(438.1412982,43.05170644)
+(434.01596496,46.0146397)(434.01596496,46.50423969)
+ \xmulineto(434.01596496,47.468373)
+(435.96929825,48.44743964)(437.84929821,48.43130631)
+ \xmulineto(443.22529809,48.37983964)
+(458.87596441,49.39543962)(461.50663102,49.96837294)
+ \xmulineto(466.55329758,50.69077292)
+(471.71996413,50.80170625)(476.45863069,52.52410621)
+ \xmulineto(478.03196399,53.11930619)
+(478.9332973,55.32717281)(478.57329731,57.72877275)
+
+ \xmulineto(478.70929731,60.10370602)
+(477.90129733,60.920906)(476.02129737,61.50423932)
+ \xmulineto(475.39596405,61.89023931)
+(475.35463072,62.64023929)(475.69863071,65.91050588)
+ \xmulineto(475.9746307,68.51463915)
+(475.94929737,69.88503911)(475.61996404,70.28077244)
+ \xmulineto(472.41196411,73.0517057)
+(468.13596421,67.89023916)(466.96396423,66.59277253)
+ \xmulineto(465.5012976,64.96317257)
+(465.38663094,64.34277258)(463.43329765,64.63503924)
+ \xmulineto(460.66796437,65.72877255)
+(455.35463116,69.1193058)(454.77729784,72.39023905)
+ \xmulineto(454.90663117,72.73397238)
+(456.23996447,73.1965057)(457.84396444,73.45837236)
+ \xmulineto(465.57863093,75.47250564)
+(470.23463083,76.73970561)(477.72529733,78.23397224)
+ \xmulineto(479.61596396,78.5870389)
+(479.67729729,78.89543889)(481.78263057,78.22877224)
+ \xmulineto(484.77196384,77.28597226)
+(485.85463049,76.92557227)(487.45863045,75.43130564)
+ \xmulineto(489.23996374,73.77037235)
+(489.05863041,72.51570571)(486.81863046,71.00423908)
+ \xmulineto(483.43863054,68.72877247)
+(479.1052973,64.34277258)(479.42263063,63.51463927)
+ \xmulineto(479.58396396,63.10370595)
+(481.05863059,62.16050597)(482.70396389,61.42090599)
+ \xmulineto(485.99596382,59.94743936)
+(487.18263046,59.29130604)(487.11063046,57.08757276)
+ \xmulineto(487.01063046,53.94223951)
+(487.74529711,54.65063949)(492.46929701,55.14023948)
+ \xmulineto(498.7506302,55.96837279)
+(504.19329675,58.22357273)(510.63062994,56.75423944)
+ \xmulineto(513.58929654,54.34797283)
+(514.09462986,50.85743958)(516.16262982,47.94743965)
+ \xmulineto(517.33462979,46.32717303)
+(516.84929647,44.96837306)(514.99596318,44.6657064)
+ \xmulineto(508.07863,43.65063976)
+(502.40129679,45.12463972)(495.7719636,45.86410637)
+ \xmulineto(493.60529698,46.09797303)
+(492.26129701,46.0146397)(490.18796372,44.49383974)
+ \xmulineto(488.76129709,43.44743976)
+(487.96929711,42.42090646)(487.67729711,41.49903981)
+ \xmulineto(486.94929713,39.15063987)
+(486.15729715,33.39024001)(485.96396382,28.47357347)
+ \xmulineto(485.81863049,25.05690689)
+(485.44396383,22.58237361)(485.06796384,20.09277367)
+ \xmulineto(484.46929718,16.08757377)
+(481.83463057,10.9730139)(478.67729731,7.69697398)
+ \xmulineto(476.62529736,5.80113403)
+(473.19863076,3.25946742)(470.82396415,3.18602743)
+ \xmulineto(468.7199642,3.18602743)
+(468.59463087,3.27041409)(464.61063095,7.22353399)
+ -- cycle
+(237.41330263,16.66570709)
+ \xmulineto(235.39596934,16.85744042)
+(233.02263606,17.32717374)(232.40130274,17.6558404)
+ \xmulineto(231.78263609,17.97877373)
+(230.07996946,19.56730702)(228.35063616,21.22877365)
+ \xmulineto(226.7026362,22.92090694)
+(224.82930291,23.88504025)(223.46530294,25.14544022)
+ \xmulineto(219.70930302,27.75944015)
+(215.89596977,30.70264008)(213.0626365,33.73397334)
+ \xmulineto(210.33996989,37.12463992)
+(212.44930318,36.6089066)(215.21996979,35.75423995)
+ \xmulineto(216.13196977,35.13503997)
+(217.7826364,34.40583999)(218.8919697,34.12464)
+ \xmulineto(220.00130301,33.84797334)
+(222.31730296,33.12464002)(224.04263626,32.52037337)
+ \xmulineto(225.75996955,32.17610671)
+(230.63196945,31.50424006)(232.86130273,31.2183734)
+ \xmulineto(233.22530272,31.58237339)
+(233.16796939,34.87983998)(233.16796939,34.87983998)
+ \xmulineto(233.43863605,39.67090652)
+(233.83463604,44.24383975)(233.86130271,48.19077298)
+ \xmulineto(233.88130271,53.11930619)
+(233.77196938,59.15063938)(233.86130271,61.00423933)
+ \xmulineto(234.29863603,70.62983909)
+(233.81730271,75.33237231)(227.62530285,74.14957234)
+ \xmulineto(221.66263631,73.00943904)
+(219.65063635,71.29170574)(215.16796979,72.83757237)
+ \xmulineto(213.29863649,73.44743902)
+(211.28663654,74.25890567)(210.70263655,74.64437233)
+ \xmulineto(209.13730325,75.67090564)
+(207.34396996,79.6495722)(207.31730329,82.25370547)
+ \xmulineto(207.27730329,87.14437202)
+(207.62530329,91.13023859)(207.04796997,96.1875718)
+ \xmulineto(206.73463664,98.92557173)
+(206.46530331,101.11410501)(205.66797,103.57823828)
+ \xmulineto(205.31197,104.19650493)
+(205.02263668,105.72357156)(205.01063668,106.97250486)
+ \xmulineto(205.00130334,108.78597149)
+(205.20930334,109.44743814)(206.03196999,110.22357145)
+ \xmulineto(207.58530329,111.68237141)
+(210.64530322,111.56730475)(212.74663651,109.96890479)
+ \xmulineto(214.68930313,108.48917149)
+(215.30396978,106.97250486)(215.30796978,103.62503828)
+ \xmulineto(215.31196978,102.24490498)
+(215.49063645,100.84277168)(215.70263644,100.50943836)
+ \xmulineto(216.88130308,98.64957174)
+(223.72530293,99.60890505)(226.5746362,99.97770504)
+ \xmulineto(229.8693028,100.40637169)
+(229.5853028,101.84903832)(229.50663614,107.89543817)
+ \xmulineto(229.4653028,111.22357142)
+(229.15730281,114.60890467)(228.91330282,114.874638)
+ \xmulineto(228.67730282,115.125038)
+(226.28663621,115.19130466)(223.40130294,114.77557134)
+ \xmulineto(218.10530305,114.00943802)
+(217.4386364,114.31103802)(217.4386364,115.14437133)
+ \xmulineto(217.4386364,115.82717131)
+(221.66796964,117.5465046)(223.13730294,118.09797126)
+ \xmulineto(227.62530285,120.3579712)
+(228.00130284,122.49903781)(233.91330271,124.23970444)
+ \xmulineto(234.30396936,124.2859711)
+(236.54263598,123.0870378)(238.56796927,121.73397117)
+ \xmulineto(240.59330256,120.37463787)
+(243.2413025,118.83757124)(244.45330247,118.31623792)
+ \xmulineto(246.36930243,117.49383794)
+(246.81196909,117.04130461)(247.85596907,114.849038)
+ \xmulineto(247.85596907,114.849038)
+(248.47863572,113.12503804)(248.48396905,111.98290474)
+ \xmulineto(248.49063572,110.84277143)
+(247.6773024,108.15583817)(247.6773024,108.15583817)
+ \xmulineto(246.71996909,100.74850502)
+(246.67330243,95.01570516)(246.68930242,89.63917196)
+ \xmulineto(246.72530242,78.56730556)
+(246.98396908,68.48397248)(247.32396908,65.25943923)
+ \xmulineto(247.69463574,53.64543951)
+(247.79196907,42.07717313)(247.35596908,30.53077342)
+ \xmulineto(247.5853024,26.85744017)
+(246.86130242,23.37984026)(245.52263578,20.45797367)
+ \xmulineto(244.04796915,17.27557374)
+(243.58930249,16.97877375)(241.96530253,16.50424043)
+ \xmulineto(241.64130254,16.5413071)
+(239.42663592,16.46837376)(237.41330263,16.66570709)
+ -- cycle
+(225.76663622,81.60890549)
+ \xmulineto(229.76663613,81.77557215)
+(232.16796941,79.9115722)(232.09996941,82.45837214)
+ \xmulineto(232.00663608,84.82250541)
+(231.91863608,87.85423867)(231.72930275,90.35797194)
+ \xmulineto(231.47063609,93.87983852)
+(229.99596946,92.48917189)(228.66796949,92.63557188)
+ \xmulineto(227.59996951,92.74850521)
+(225.21996956,92.28077189)(223.36930294,92.16050523)
+ \xmulineto(218.22530305,91.8271719)
+(216.31196976,91.45263858)(215.61063644,90.64957193)
+ \xmulineto(213.96530315,88.77037198)
+(214.14530314,83.06730545)(215.88663644,81.84277215)
+ \xmulineto(216.80796975,81.1965055)
+(219.91330302,80.91517217)(225.76663622,81.60890549)
+ -- cycle
+(375.75063291,18.20264039)
+ \xmulineto(365.9532998,26.08757353)
+(357.56796665,36.83757326)(350.08396681,46.38503969)
+ \xmulineto(346.44930023,51.02037291)
+(340.32396703,59.84797269)(336.94930043,62.97357262)
+ \xmulineto(334.96930048,63.7287726)
+(331.49063389,62.27557263)(329.45863393,59.84277269)
+ \xmulineto(326.266634,55.36930614)
+(323.31863407,50.47357292)(320.18263414,46.29130636)
+ \xmulineto(317.78663419,43.04130644)
+(308.56796773,33.47877334)(304.85463448,30.55690675)
+ \xmulineto(302.91196785,29.03077345)
+(297.5533013,26.58237351)(294.18263471,25.68130687)
+ \xmulineto(289.09996816,24.47877357)
+(279.85996836,24.24384024)(276.70396843,27.31730683)
+ \xmulineto(280.94396834,30.75424008)
+(287.38130153,32.71837336)(291.81330143,37.00423992)
+ \xmulineto(297.61996797,42.47357312)
+(304.00663449,47.98917299)(308.54796773,54.05690617)
+ \xmulineto(310.57863435,57.12983943)
+(315.96396756,61.75943931)(316.14130089,64.42610591)
+ \xmulineto(316.32930089,67.20263918)
+(311.53730099,68.48397248)(306.38663444,68.47877248)
+ \xmulineto(304.18796782,68.49383915)
+(301.26130122,68.45263915)(300.32930124,68.68703914)
+ \xmulineto(297.59463464,69.37463912)
+(294.74530137,71.65583907)(293.91863472,73.81623902)
+ \xmulineto(289.61596814,81.91157215)
+(290.07330147,82.5870388)(298.99596794,81.79690548)
+ \xmulineto(305.56263446,82.42037214)
+(319.62530082,84.50943875)(325.1253007,87.23397202)
+ \xmulineto(325.84930068,87.68237201)
+(326.75596733,89.75370529)(327.49063398,92.62503855)
+ \xmulineto(328.01063397,98.41157174)
+(327.53730064,102.95837163)(327.42796731,108.29170483)
+ \xmulineto(327.67330064,116.2859713)
+(322.25596743,120.4635712)(319.0479675,120.88503785)
+ \xmulineto(319.05330083,121.10370451)
+(322.22530076,122.63917114)(322.85996741,124.68757109)
+ \xmulineto(324.13063405,128.73970433)
+(324.44396738,130.69130428)(328.55863395,130.30223762)
+ \xmulineto(336.7919671,129.08183765)
+(337.58530042,128.97770432)(340.05330037,128.31103767)
+ \xmulineto(343.60530029,127.35797103)
+(344.85463359,118.13917125)(344.67730026,114.811038)
+ \xmulineto(344.28263361,107.45837152)
+(343.90130028,102.51570497)(343.68263362,101.86317166)
+ \xmulineto(343.34930029,100.86317168)
+(344.12530028,94.74850517)(344.76130026,94.22357184)
+ \xmulineto(350.30796681,94.24850518)
+(355.61063336,96.98290511)(361.52129989,97.31103844)
+ \xmulineto(365.02129982,98.11930508)
+(370.57329969,94.64437183)(373.33463297,93.18757187)
+ \xmulineto(376.89596622,91.46357191)
+(376.58929956,91.8427719)(376.54796623,88.10370533)
+ \xmulineto(376.51596623,84.89543874)
+(376.45329956,84.71317208)(374.9012996,83.15583878)
+
+ \xmulineto(372.20929966,80.45263885)
+(370.49063303,80.21837219)(367.1626331,80.79690551)
+ \xmulineto(361.84929989,81.59223882)
+(357.12529999,82.30223881)(351.54263345,80.17610552)
+ \xmulineto(348.78663351,79.10370555)
+(347.20930021,78.15583891)(346.76663355,77.2917056)
+ \xmulineto(343.18796696,73.47770569)
+(345.14130025,71.7859724)(347.13063354,69.20263913)
+ \xmulineto(351.77196677,63.35370594)
+(354.58930005,60.77037267)(359.60529994,56.32250611)
+ \xmulineto(367.64129976,49.19077296)
+(371.19329968,46.1350397)(379.18263284,41.06730649)
+ \xmulineto(385.10529937,37.30690658)
+(391.77729923,33.39544001)(398.38129908,28.98397346)
+ \xmulineto(399.46929906,28.14024014)
+(400.3079657,27.2859735)(400.46929903,26.75944018)
+ \xmulineto(396.64129912,23.53597359)
+(391.20396591,22.95264027)(388.58396596,21.73397363)
+ \xmulineto(384.35996606,19.77557368)
+(381.18796613,18.92610704)(377.28663288,17.7542404)
+ \xmulineto(376.69329956,17.57250707)
+(376.14129957,17.73397373)(375.75063291,18.20264039)
+ -- cycle
+(157.67330439,23.58237359)
+ \xmulineto(153.74663781,25.7594402)
+(154.06797113,30.93704007)(154.13197113,35.65063996)
+ \xmulineto(154.29330446,37.39543991)
+(154.46530446,44.16570641)(154.51063779,50.69743959)
+ \xmulineto(154.58930446,62.07250597)
+(156.08397109,75.55690564)(156.13730442,77.13917227)
+ \xmulineto(156.36130442,83.61410544)
+(156.63197108,88.79170531)(156.99063774,95.06730516)
+ \xmulineto(157.75597105,101.42037167)
+(155.7719711,104.51570492)(152.25597117,109.26463814)
+ \xmulineto(151.05330453,110.79170477)
+(151.42663786,112.16570474)(152.75597116,113.41517137)
+ \xmulineto(156.50663775,114.86837134)
+(160.115971,117.4689046)(163.44397093,115.18237133)
+ \xmulineto(165.54797088,113.6761047)
+(165.60530421,113.63557137)(167.38130417,112.45837139)
+ \xmulineto(168.28663749,111.85423808)
+(169.54797079,110.43130478)(170.18397078,110.43130478)
+ \xmulineto(173.19463738,110.7646381)
+(175.69863732,112.66570472)(178.15730394,113.92557136)
+ \xmulineto(179.36530391,114.56730468)
+(180.77730388,115.35423799)(181.65730386,116.02463797)
+ \xmulineto(184.29863713,118.04650459)
+(186.18397043,119.26463789)(186.67730375,119.26463789)
+ \xmulineto(186.93330374,119.26463789)
+(188.18397038,118.58183791)(189.45863702,117.7537046)
+ \xmulineto(190.72930366,116.92037128)
+(191.97463696,116.16050464)(192.22530363,116.06730464)
+ \xmulineto(193.97463692,115.38503799)
+(196.06797021,113.59223803)(196.71463686,112.2287714)
+ \xmulineto(197.35597018,110.8798381)
+(197.39597018,110.34277145)(196.96530352,108.99903815)
+ \xmulineto(196.67730353,108.11410484)
+(195.94930354,104.46357159)(195.34397022,100.89023835)
+ \xmulineto(194.74130357,97.31623844)
+(194.01730359,93.38503853)(193.72930359,92.1495719)
+ \xmulineto(193.4333036,90.84277193)
+(193.2293036,86.27557204)(193.25197027,81.1965055)
+ \xmulineto(193.28663694,71.6823724)
+(192.92663694,69.77037245)(191.01730365,69.29130579)
+ \xmulineto(190.40797033,69.13503913)
+(189.10530369,69.41050579)(187.90797039,69.93703911)
+ \xmulineto(185.54797044,70.98290575)
+(182.50663717,71.19650575)(180.61997055,70.45797243)
+ \xmulineto(178.2199706,69.80690578)
+(175.99597065,69.02037247)(173.7599707,67.97357249)
+ \xmulineto(170.00130412,66.22357254)
+(170.07463745,67.67090583)(170.19463744,62.22877263)
+ \xmulineto(169.99597078,58.64543939)
+(169.83463745,53.29130619)(170.08397078,50.2490396)
+ \xmulineto(171.16263742,37.56730658)
+(171.01063743,34.87983998)(170.8653041,33.97877333)
+ \xmulineto(170.11997078,29.52410678)
+(167.5746375,21.59277364)(163.2466376,21.81730697)
+ \xmulineto(160.75597099,21.9422403)
+(159.40797102,22.61930695)(157.67330439,23.58237359)
+ -- cycle
+(177.06797063,75.82250563)
+ \xmulineto(179.44397057,76.72877228)
+(182.93863716,79.35797221)(183.88130381,80.96357217)
+ \xmulineto(184.5013038,82.00943881)
+(184.82930379,83.33237211)(184.82930379,84.77037208)
+ \xmulineto(184.82930379,86.63557203)
+(184.65063713,87.09223869)(183.69863715,87.71837201)
+ \xmulineto(182.64530384,88.40637199)
+(181.87597052,88.66050532)(179.99063723,87.94223867)
+ \xmulineto(178.87597059,87.51570534)
+(176.7026373,87.37463868)(174.77730401,87.05170536)
+ \xmulineto(170.06263745,86.24850537)
+(169.58930412,85.32717206)(169.58930412,82.23397214)
+ \xmulineto(169.58930412,80.13557219)
+(171.36130409,76.81103894)(172.87597072,76.06730563)
+ \xmulineto(174.56797068,75.23397231)
+(175.38663733,75.18757231)(177.06797063,75.82250563)
+ -- cycle
+(180.74663721,94.99383849)
+ \xmulineto(181.80397052,95.46890515)
+(183.28663716,96.71317178)(184.21463714,97.90637175)
+ \xmulineto(185.67730377,99.78077171)
+(185.81730377,100.19650503)(185.6106371,102.03503832)
+ \xmulineto(185.03197045,103.94743827)
+(184.16263714,107.0042382)(183.30797049,107.96357151)
+ \xmulineto(182.14130385,109.27037147)
+(182.27730384,109.91157146)(175.89597065,108.54130482)
+ \xmulineto(174.14130402,108.16570483)
+(172.75997072,107.97250484)(170.85597076,107.73397151)
+ \xmulineto(169.56263746,107.57823818)
+(169.75597079,107.18757152)(169.75063745,104.78077158)
+ \xmulineto(169.75063745,103.37463829)
+(169.57997079,101.20170501)(169.59330412,99.81623837)
+ \xmulineto(169.61997079,97.34903843)
+(170.10530411,96.85797178)(173.06797071,95.31623848)
+ \xmulineto(175.63197066,93.97770518)
+(178.24130393,93.86837185)(180.74663721,94.99383849)
+ -- cycle
+(427.64129844,64.04130592)
+ \xmulineto(426.07329847,65.33757256)
+(424.40663184,68.09277249)(423.55863186,69.41050579)
+ \xmulineto(421.93329856,71.94223906)
+(421.11596525,79.31103888)(421.21996524,80.97770551)
+ \xmulineto(421.34929857,83.09223879)
+(422.12529856,85.55170539)(423.77729852,86.5094387)
+ \xmulineto(424.9012985,87.15583869)
+(425.27729849,87.31103868)(426.56796513,85.45263873)
+ \xmulineto(429.1052984,81.81103882)
+(432.37063166,78.91157222)(434.62529828,76.83757227)
+ \xmulineto(437.82396488,73.98290568)
+(437.75063155,72.16050572)(436.21463158,69.15063913)
+ \xmulineto(435.3186316,67.10890585)
+(435.92263159,65.0517059)(434.22929829,64.33237258)
+ \xmulineto(431.71463168,63.28077261)
+(429.0372984,63.16570594)(427.64129844,64.04130592)
+ -- cycle
+(521.57329636,76.27557229)
+ \xmulineto(520.43329639,77.18237227)
+(517.87062978,77.23397226)(515.35996317,77.00943894)
+ \xmulineto(511.94396324,76.70170561)
+(510.25062995,76.20797229)(512.74529656,78.43130557)
+ \xmulineto(513.31862988,78.94743889)
+(514.64662985,80.39023885)(514.90662984,81.33757216)
+ \xmulineto(515.3652965,82.99903879)
+(514.71996318,83.20797212)(513.22529655,84.51570542)
+ \xmulineto(509.94929662,87.37983868)
+(507.03196335,88.79170531)(504.37596341,88.79170531)
+ \xmulineto(493.80263031,88.86317198)
+(484.17329719,88.68757198)(473.99063075,86.69650536)
+ \xmulineto(467.43863089,85.86317205)
+(461.30796436,84.14957209)(458.68796442,83.40063878)
+ \xmulineto(454.85463117,82.31103881)
+(452.59996455,79.54130554)(449.46929795,79.13557222)
+ \xmulineto(445.49596471,78.63917223)
+(443.22929809,79.08183889)(440.49596482,80.90063884)
+ \xmulineto(437.83996488,82.66050546)
+(437.41729822,83.64957211)(439.05863152,84.17090543)
+ \xmulineto(442.28263145,85.1913054)
+(442.03196478,85.1089054)(444.58929806,86.10890538)
+ \xmulineto(448.8186313,88.097972)
+(447.68263133,91.68757191)(447.53196466,93.85423852)
+ \xmulineto(446.85996468,99.03503839)
+(446.76663135,104.13023827)(446.19329803,109.00423815)
+ \xmulineto(445.60529804,114.00423802)
+(445.6879647,118.8490379)(444.13596474,122.22877115)
+ \xmulineto(443.59463142,123.27037113)
+(442.97996476,124.49903776)(442.97996476,124.91157109)
+ \xmulineto(442.97996476,126.10370439)
+(444.83996472,128.05170434)(445.6679647,129.12503765)
+ \xmulineto(447.51063133,131.52090426)
+(448.17729798,132.55170423)(450.3079646,135.27557083)
+ \xmulineto(451.14129792,136.3435708)
+(452.89596455,138.11957076)(454.20396452,139.92623738)
+ \xmulineto(455.72529782,142.024904)
+(456.65196446,140.33823737)(461.29729769,140.6355707)
+ \xmulineto(462.03729768,140.79690403)
+(463.93863097,141.07823735)(464.62529762,140.81157069)
+ \xmulineto(465.77729759,140.37423737)
+(465.85463093,140.20223738)(465.58396427,138.65023741)
+ \xmulineto(465.20396427,136.52090413)
+(465.6412976,136.4475708)(462.01596434,135.03557084)
+ \xmulineto(460.01596439,134.25957086)
+(457.34396445,132.58703756)(456.18796447,131.71317092)
+ \xmulineto(454.33463118,130.30223762)
+(450.76129793,127.99903768)(451.15196458,125.40637107)
+ \xmulineto(452.40129789,121.90637116)
+(454.50663118,121.64957117)(459.36529774,121.45263784)
+ \xmulineto(465.30796427,121.21317118)
+(466.50663091,120.06210454)(465.23996427,117.62503793)
+ \xmulineto(464.72929762,116.63917129)
+(463.46929765,116.49383796)(461.71463102,116.07823797)
+ \xmulineto(459.01063108,115.36317132)
+(457.09463112,114.23397135)(454.59463117,113.02463805)
+ -- (454.58929784,110.06730479)
+ \xmulineto(454.57863117,107.04130486)
+(455.38129782,106.13557155)(456.51596447,105.07823824)
+ \xmulineto(457.66796444,104.00943827)
+(459.85463106,104.20170493)(462.458631,105.09223824)
+ \xmulineto(467.73463088,106.8902382)
+(467.66796422,106.8798382)(468.62529753,105.92037156)
+ \xmulineto(469.42796418,105.11930491)
+(469.15196419,104.77557158)(468.60529753,103.63557161)
+ \xmulineto(466.70929757,101.93130499)
+(463.64129764,100.42037169)(461.73463102,99.40637172)
+ \xmulineto(460.40663105,98.73397173)
+(459.26663107,97.96890509)(457.64129777,97.01570511)
+ \xmulineto(456.25063114,96.87983845)
+(456.64663113,96.58183845)(456.5212978,94.11930518)
+ \xmulineto(456.4532978,92.73397188)
+(456.61063113,91.05170526)(456.86529779,90.37983861)
+ \xmulineto(457.31863111,89.18757197)
+(457.04796445,88.90637198)(459.78263106,89.1605053)
+
+ \xmulineto(463.46396431,89.48917196)
+(473.1159641,90.91517193)(478.43863065,91.73397191)
+ \xmulineto(486.04796381,92.90637188)
+(489.27196374,93.2449052)(498.10529688,93.71837186)
+ \xmulineto(503.75596342,93.39543853)
+(504.37596341,93.78077186)(504.81863007,98.11930508)
+ \xmulineto(505.60529672,103.42557162)
+(503.78263009,103.15583829)(501.20929681,104.02463827)
+ \xmulineto(500.31329683,104.2755716)
+(498.8346302,104.80583825)(498.50663021,105.20170491)
+ \xmulineto(497.99596355,105.81623823)
+(498.05863022,106.04650489)(498.95329686,106.77037153)
+ \xmulineto(501.57329681,108.43130483)
+(503.96396342,106.73970487)(506.90129669,107.73397151)
+ \xmulineto(507.56796334,107.94223817)
+(507.78663,109.13557148)(508.05329666,110.49903811)
+ \xmulineto(508.53196332,112.99903805)
+(508.71996331,113.52983803)(508.17329666,114.67610467)
+ \xmulineto(507.66796334,115.73397131)
+(507.51063001,116.43703796)(504.46929674,117.63557127)
+ \xmulineto(501.15196348,118.9474379)
+(500.72529682,119.45837122)(501.11063015,120.46890453)
+ \xmulineto(501.29196348,120.94223785)
+(502.14129679,121.01570452)(505.0159634,120.80583786)
+ \xmulineto(509.35462997,120.48290453)
+(509.43329663,120.54130453)(510.40662994,124.67090443)
+ \xmulineto(511.81862991,130.64957095)
+(510.9852966,133.55157087)(507.83463,133.65557087)
+ \xmulineto(506.33463003,133.9369042)
+(501.24529681,133.06730422)(500.88663015,134.59823751)
+ \xmulineto(500.78263016,135.1302375)
+(501.12529682,135.46357083)(501.99596346,135.67157082)
+ \xmulineto(504.72529674,136.83823746)
+(507.83996333,137.82757077)(510.13596328,139.43157073)
+ \xmulineto(512.78262989,141.35423735)
+(514.99596318,141.26490402)(519.23462975,139.0782374)
+ \xmulineto(525.22929628,135.98357081)
+(525.46396295,135.61957082)(523.42796299,132.61410423)
+ \xmulineto(517.90662978,122.25370449)
+(513.8239632,107.79170484)(512.44929657,95.96890513)
+ \xmulineto(511.53196325,90.86317193)
+(517.55862979,90.21317194)(520.1572964,89.52983863)
+ \xmulineto(522.69329634,88.87463864)
+(525.68796294,87.88503867)(526.87062958,88.31623866)
+ \xmulineto(530.7346295,89.78077195)
+(529.40129619,84.60370542)(532.40129613,80.85797217)
+ \xmulineto(534.8706294,77.77557225)
+(531.8759628,76.31103895)(529.90662951,75.70170564)
+ \xmulineto(526.73462958,75.17090565)
+(524.33462964,74.56730566)(521.57329636,76.27557229)
+ -- cycle
+(471.69329746,96.55170512)
+ \xmulineto(471.77729746,97.4689051)
+(472.18796412,98.86837173)(472.90129744,99.9063717)
+ \xmulineto(473.50129742,100.77037168)
+(474.08929741,102.39023831)(474.57863073,103.29690495)
+ \xmulineto(475.89196404,105.71317156)
+(474.99063072,106.37463821)(474.04263075,108.32250483)
+ \xmulineto(471.93863079,112.63023806)
+(469.84396417,109.04130481)(467.99596421,113.6657047)
+ \xmulineto(467.48529756,115.61930465)
+(467.90129755,116.43703796)(470.0532975,117.6965046)
+ \xmulineto(472.71463077,119.25890456)
+(474.15196408,118.9422379)(475.35996405,116.57823796)
+ \xmulineto(476.57863069,114.18757135)
+(481.53196391,111.0782381)(483.4852972,110.74850477)
+ \xmulineto(484.31329719,110.74850477)
+(486.90129713,113.84277136)(486.90129713,114.83237134)
+ \xmulineto(486.90129713,116.07823797)
+(487.99596377,116.57823796)(490.42263038,116.4255713)
+ \xmulineto(493.06263033,116.26463797)
+(493.50663032,115.96890464)(493.84929698,114.09797135)
+ \xmulineto(494.13596364,112.54130473)
+(493.87063031,112.11410474)(492.05329702,111.18237143)
+ \xmulineto(490.83463038,110.56210477)
+(490.02663039,110.14437145)(489.9066304,107.85797151)
+ \xmulineto(489.77196373,105.36317157)
+(490.46929705,105.42557157)(493.15196366,102.22357165)
+ \xmulineto(495.72529693,99.15583839)
+(495.7919636,97.61930509)(495.7919636,97.61930509)
+ \xmulineto(493.15196366,97.69130509)
+(490.55863038,97.79170509)(488.31863043,98.8058384)
+ \xmulineto(479.25063063,103.74850494)
+(478.03196399,97.05170511)(471.69329746,96.55170512)
+ -- cycle
+(44.21450689,119.26463789)
+ \xmulineto(41.44317362,120.19650454)
+(42.0583736,121.91157116)(41.18904029,124.04130444)
+ \xmulineto(40.26037364,126.25890439)
+(40.33437364,128.80223766)(41.36090695,130.07303763)
+ \xmulineto(42.13170693,131.02090427)
+(42.66770692,131.13917093)(47.29837349,131.37463759)
+ \xmulineto(51.81250672,131.89023758)
+(57.1573066,132.83810422)(61.13170652,133.8329042)
+ \xmulineto(65.89690641,134.20757086)
+(69.76610633,136.63023746)(74.12650623,137.18223745)
+ \xmulineto(79.10463945,138.59290408)
+(84.27130601,138.65023741)(88.91823924,140.27557071)
+ \xmulineto(93.83957246,141.23423735)
+(97.92703904,141.70757067)(103.03637226,139.84890405)
+ \xmulineto(104.26610556,139.37957073)
+(106.11503886,138.79157074)(107.14063883,138.54090408)
+ \xmulineto(110.31250543,137.71823744)
+(111.7661054,135.13957083)(111.7765054,132.96357089)
+ \xmulineto(111.33437208,125.98917106)
+(109.97917211,127.29690436)(104.82917222,125.98917106)
+ \xmulineto(101.07970563,125.03503775)
+(98.47397236,124.64437109)(95.88117242,124.64437109)
+ \xmulineto(91.91823917,124.68757109)
+(87.91823926,123.41517112)(84.21450601,123.11930446)
+ \xmulineto(79.21970612,122.73970447)
+(73.51143958,121.28597118)(70.56357297,119.64437122)
+ \xmulineto(60.99583985,116.05690464)
+(52.97024003,115.48863799)(44.21450689,119.26463789)
+ -- cycle
+(479.39196396,120.90637119)
+ \xmulineto(478.49063065,121.27037118)
+(478.97996397,122.67610448)(480.60529727,125.26463775)
+ \xmulineto(482.96929722,129.03503765)
+(481.86529724,129.72357097)(479.37063063,130.85423761)
+ \xmulineto(476.69863069,132.06730424)
+(475.11596406,132.89023756)(474.92263073,133.46357088)
+ \xmulineto(474.69863073,134.13023753)
+(476.03196403,135.40090416)(476.94929735,135.40090416)
+ \xmulineto(477.35996401,135.40090416)
+(478.61063064,134.66623751)(479.88129728,134.13557086)
+ \xmulineto(482.55863056,133.02983755)
+(484.43863052,133.55690421)(484.91729717,135.05690417)
+ \xmulineto(486.28663048,140.09290405)
+(484.46929718,140.19157071)(486.02663048,142.10357066)
+ \xmulineto(488.93863042,146.32757056)
+(489.40663041,146.36890389)(491.94396368,144.37957061)
+ \xmulineto(493.61063031,143.07290397)
+(493.90663031,141.20757068)(494.23996363,139.66623739)
+ \xmulineto(494.73996362,137.33823745)
+(493.65196365,135.78090415)(492.34396368,133.42090421)
+ \xmulineto(490.83463038,130.69130428)
+(490.52663038,130.72357094)(492.40663034,129.14957098)
+ \xmulineto(493.69863031,127.84277101)
+(494.0786303,127.36837103)(494.44929696,125.49903774)
+ \xmulineto(494.44929696,125.49903774)
+(492.19863035,125.32717108)(491.65196369,125.49903774)
+ \xmulineto(489.7506304,126.10370439)
+(489.79729706,126.69130438)(488.53729709,125.80583773)
+ \xmulineto(487.21996379,124.87463775)
+(485.81863049,123.86317111)(482.83996388,122.07303782)
+ \xmulineto(481.31329725,121.15530451)
+(480.29729727,120.54130453)(479.39196396,120.90637119)
+ -- cycle
+;
+}
+% \end{macrocode}
+
+%</logo>
+% \end{implementation}
+% \Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/xmuthesis/xmuthesis.pdf b/macros/latex/contrib/xmuthesis/xmuthesis.pdf
new file mode 100644
index 0000000000..0ccb3a1e9e
--- /dev/null
+++ b/macros/latex/contrib/xmuthesis/xmuthesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref/README.md b/macros/latex/contrib/zref/README.md
index cc622b0ae3..f2d0325508 100644
--- a/macros/latex/contrib/zref/README.md
+++ b/macros/latex/contrib/zref/README.md
@@ -1,6 +1,6 @@
-# zref
+# zref packages for LaTeX
-zref packages for LaTeX
+Version: 2020-07-03 v2.32
Package zref tries to get rid of the restriction
@@ -10,3 +10,10 @@ system, where properties are handled in a more flexible way.
It offers an interface for macro programmers for the access
to the system and some applications that uses the new
reference scheme.
+
+## Copyright (C)
+* 2007, 2009-2011 Heiko Oberdiek
+* 2016-2020 Oberdiek Package Support Group
+
+## License
+LATEX Project Public License, version 1.3c or later.
diff --git a/macros/latex/contrib/zref/zref.dtx b/macros/latex/contrib/zref/zref.dtx
index ea33ef2e88..a74626aa7d 100644
--- a/macros/latex/contrib/zref/zref.dtx
+++ b/macros/latex/contrib/zref/zref.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: zref.dtx
-% Version: 2020-05-28 v2.31
+% Version: 2020-07-03 v2.32
% Info: A new reference scheme for LaTeX
%
% Copyright (C)
@@ -112,7 +112,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: zref 2020-05-28 v2.31 A new reference scheme for LaTeX (HO)}
+\Msg{* Package: zref 2020-07-03 v2.32 A new reference scheme for LaTeX (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -124,7 +124,7 @@
This is a generated file.
Project: zref
-Version: 2020-05-28 v2.31
+Version: 2020-07-03 v2.32
Copyright (C)
2006-2012 Heiko Oberdiek
@@ -230,7 +230,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{zref.drv}%
- [2020-05-28 v2.31 A new reference scheme for LaTeX (HO)]%
+ [2020-07-03 v2.32 A new reference scheme for LaTeX (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\setlength{\emergencystretch}{1em}
@@ -245,7 +245,7 @@ and the derived files
% \GetFileInfo{zref.drv}
%
% \title{The \xpackage{zref} package}
-% \date{2020-05-28 v2.31}
+% \date{2020-07-03 v2.32}
% \author{Heiko Oberdiek\thanks
% {Please report any issues at \url{https://github.com/ho-tex/zref/issues}}}
%
@@ -1663,7 +1663,7 @@ the height difference of the two baselines is
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref}
- [2020-05-28 v2.31 A new reference scheme for LaTeX (HO)]%
+ [2020-07-03 v2.32 A new reference scheme for LaTeX (HO)]%
% \end{macrocode}
%
% \subsubsection{Load basic module}
@@ -1750,12 +1750,13 @@ the height difference of the two baselines is
%<*base>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
- [2020-05-28 v2.31 Module base for zref (HO)]%
+ [2020-07-03 v2.32 Module base for zref (HO)]%
% \end{macrocode}
%
% \subsubsection{Utilities}
%
% \begin{macrocode}
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\RequirePackage{ltxcmds}[2010/12/02]
\RequirePackage{infwarerr}[2010/04/08]
\RequirePackage{kvsetkeys}[2010/03/01]
@@ -3057,7 +3058,7 @@ the height difference of the two baselines is
%<*user>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-user}%
- [2020-05-28 v2.31 Module user for zref (HO)]%
+ [2020-07-03 v2.32 Module user for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3148,7 +3149,7 @@ the height difference of the two baselines is
%<*abspage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspage}%
- [2020-05-28 v2.31 Module abspage for zref (HO)]%
+ [2020-07-03 v2.32 Module abspage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3196,7 +3197,7 @@ the height difference of the two baselines is
%<*counter>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-counter}%
- [2020-05-28 v2.31 Module counter for zref (HO)]%
+ [2020-07-03 v2.32 Module counter for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3241,7 +3242,7 @@ the height difference of the two baselines is
%<*lastpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-lastpage}%
- [2020-05-28 v2.31 Module lastpage for zref (HO)]%
+ [2020-07-03 v2.32 Module lastpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\RequirePackage{zref-abspage}[2019/11/29]
\RequirePackage{atveryend}[2009/12/07]
@@ -3313,7 +3314,7 @@ the height difference of the two baselines is
%<*thepage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-thepage}%
- [2020-05-28 v2.31 Module thepage for zref (HO)]%
+ [2020-07-03 v2.32 Module thepage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3388,7 +3389,7 @@ the height difference of the two baselines is
%<*nextpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-nextpage}%
- [2020-05-28 v2.31 Module nextpage for zref (HO)]%
+ [2020-07-03 v2.32 Module nextpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3492,7 +3493,7 @@ the height difference of the two baselines is
%<*totpages>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-totpages}%
- [2020-05-28 v2.31 Module totpages for zref (HO)]%
+ [2020-07-03 v2.32 Module totpages for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3534,7 +3535,7 @@ the height difference of the two baselines is
%<*pagelayout>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pagelayout}%
- [2020-05-28 v2.31 Module pagelayout for zref (HO)]%
+ [2020-07-03 v2.32 Module pagelayout for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3619,13 +3620,17 @@ the height difference of the two baselines is
% \end{macrocode}
%
% \begin{macrocode}
-\zref@newprop*{outputboxwd}[0pt]{\AtBeginShipoutBoxWidth}
-% \end{macrocode}
-% \begin{macrocode}
-\zref@newprop*{outputboxht}[0pt]{\AtBeginShipoutBoxHeight}
-% \end{macrocode}
-% \begin{macrocode}
-\zref@newprop*{outputboxdp}[0pt]{\AtBeginShipoutBoxDepth}
+\IfFormatAtLeastTF{2020/10/01}
+ {
+ \zref@newprop*{outputboxwd}[0pt]{\ShipoutBoxWidth}
+ \zref@newprop*{outputboxht}[0pt]{\ShipoutBoxHeight}
+ \zref@newprop*{outputboxdp}[0pt]{\ShipoutBoxDepth}
+ }
+ {
+ \zref@newprop*{outputboxwd}[0pt]{\AtBeginShipoutBoxWidth}
+ \zref@newprop*{outputboxht}[0pt]{\AtBeginShipoutBoxHeight}
+ \zref@newprop*{outputboxdp}[0pt]{\AtBeginShipoutBoxDepth}
+ }
% \end{macrocode}
% \begin{macrocode}
\zref@addprops{thepage}{outputboxwd,outputboxht,outputboxdp}
@@ -3762,7 +3767,7 @@ the height difference of the two baselines is
%<*pageattr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-pageattr}%
- [2020-05-28 v2.31 Module pageattr for zref (HO)]%
+ [2020-07-03 v2.32 Module pageattr for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -3994,7 +3999,7 @@ the height difference of the two baselines is
%<*marks>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-marks}%
- [2020-05-28 v2.31 Module marks for zref (HO)]%
+ [2020-07-03 v2.32 Module marks for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -4100,7 +4105,7 @@ the height difference of the two baselines is
%<*runs>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-runs}%
- [2020-05-28 v2.31 Module runs for zref (HO)]%
+ [2020-07-03 v2.32 Module runs for zref (HO)]%
% \end{macrocode}
%
% \begin{macro}{\zruns}
@@ -4132,7 +4137,7 @@ the height difference of the two baselines is
%<*perpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-perpage}%
- [2020-05-28 v2.31 Module perpage for zref (HO)]%
+ [2020-07-03 v2.32 Module perpage for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -4314,7 +4319,7 @@ the height difference of the two baselines is
%<*titleref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-titleref}%
- [2020-05-28 v2.31 Module titleref for zref (HO)]%
+ [2020-07-03 v2.32 Module titleref for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -4727,7 +4732,7 @@ the height difference of the two baselines is
%<*xr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-xr}%
- [2020-05-28 v2.31 Module xr for zref (HO)]%
+ [2020-07-03 v2.32 Module xr for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -5263,7 +5268,7 @@ the height difference of the two baselines is
%<*hyperref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-hyperref}%
- [2020-05-28 v2.31 Module hyperref for zref (HO)]%
+ [2020-07-03 v2.32 Module hyperref for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -5293,7 +5298,7 @@ the height difference of the two baselines is
%<*savepos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-savepos}%
- [2020-05-28 v2.31 Module savepos for zref (HO)]%
+ [2020-07-03 v2.32 Module savepos for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -5466,7 +5471,7 @@ the height difference of the two baselines is
%<*abspos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspos}%
- [2020-05-28 v2.31 Module abspos for zref (HO)]%
+ [2020-07-03 v2.32 Module abspos for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -6120,7 +6125,7 @@ the height difference of the two baselines is
%<*dotfill>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-dotfill}%
- [2020-05-28 v2.31 Module dotfill for zref (HO)]%
+ [2020-07-03 v2.32 Module dotfill for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -6220,7 +6225,7 @@ the height difference of the two baselines is
%<*env>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-env}%
- [2020-05-28 v2.31 Module env for zref (HO)]%
+ [2020-07-03 v2.32 Module env for zref (HO)]%
\RequirePackage{zref-base}[2019/11/29]
\ifx\ZREF@base@ok Y%
\else
@@ -6749,6 +6754,10 @@ the height difference of the two baselines is
% \item Adapted module zref-counter to use \cs{@currentcounter} in the next
% \LaTeX version (issue 5)
% \end{Version}
+% \begin{Version}{2020-07-03 v2.32}
+% \item Changed in zref-pagelayout the names of the shipout box dimensions
+% to adapt to the new hook management.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/macros/latex/contrib/zref/zref.pdf b/macros/latex/contrib/zref/zref.pdf
index 1a7415cc28..cd49923f05 100644
--- a/macros/latex/contrib/zref/zref.pdf
+++ b/macros/latex/contrib/zref/zref.pdf
Binary files differ
diff --git a/macros/latex/required/firstaid/changes.txt b/macros/latex/required/firstaid/changes.txt
index 1b3472c88f..ef734a335a 100644
--- a/macros/latex/required/firstaid/changes.txt
+++ b/macros/latex/required/firstaid/changes.txt
@@ -1,3 +1,8 @@
+2020-10-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ Fix for gh400 taken out and moved into the kernel instead for PL1.
+
2020-10-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 03f962904e..78f52ca78a 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -99,8 +99,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2020/10/03}
-\def\LaTeXFirstAidVersion{v1.0d}
+\def\LaTeXFirstAidDate{2020/10/04}
+\def\LaTeXFirstAidVersion{v1.0e}
% \end{macrocode}
%
% \begin{macrocode}
@@ -342,56 +342,6 @@
%
%
%
-% \subsection{Fixing a problem with \BibTeX{}}
-%
-% This will become a patch release for the kernel but for the moment
-% we put it here in case some other issues show up. \BibTeX{}
-% expects \texttt{.aux} files to contain lines
-% \verb=\@input{filename.aux}= but the new new \LaTeX{}
-% unnecessarily writes \verb=\@input{"filename.aux"}= and this
-% upsets \BibTeX{} greatly. As it isn't necessary we take it out.
-%
-% \begin{macrocode}
-\def\@include#1 {%
- \clearpage
- \if@filesw
- \immediate\write\@mainaux{\string\@input{#1.aux}}%
- \fi
- \@tempswatrue
- \if@partsw
- \@tempswafalse
- \edef\reserved@b{#1}%
- \@for\reserved@a:=\@partlist\do
- {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
- \fi
- \if@tempswa
- \let\@auxout\@partaux
- \if@filesw
- \immediate\openout\@partaux "#1.aux"
- \immediate\write\@partaux{\relax}%
- \fi
- \@filehook@set@CurrentFile
- \UseHook{include/before}%
- \UseHook{include/before/#1}%
- \@input@{#1.tex}%
- \UseHook{include/end/#1}%
- \UseHook{include/end}%
- \clearpage
- \UseHook{include/after/#1}%
- \UseHook{include/after}%
- \clearpage
- \@writeckpt{#1}%
- \if@filesw
- \immediate\closeout\@partaux
- \fi
- \else
- \deadcycles\z@
- \@nameuse{cp@#1}%
- \fi
- \let\@auxout\@mainaux}
-% \end{macrocode}
-%
-%
%
% \begin{macrocode}
%</kernel>
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
index ece887663a..7e9157f792 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/polyglossia/README.md b/macros/unicodetex/latex/polyglossia/README.md
index 79b922ef93..780c3929cc 100644
--- a/macros/unicodetex/latex/polyglossia/README.md
+++ b/macros/unicodetex/latex/polyglossia/README.md
@@ -1,10 +1,9 @@
-# THE POLYGLOSSIA PACKAGE v1.49
+# THE POLYGLOSSIA PACKAGE v1.50
## Multilingual typesetting with XeLaTeX and LuaLaTeX
-This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
-(with a few languages incompletely supported for the latter). This version
-includes support for over 70 different languages, some of which in different
-regional or national varieties, or using a different writing system.
+This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX.
+This version includes support for over 70 different languages, some of which in
+different regional or national varieties, or using a different writing system.
Polyglossia makes it possible to automate the following tasks:
diff --git a/macros/unicodetex/latex/polyglossia/polyglossia.dtx b/macros/unicodetex/latex/polyglossia/polyglossia.dtx
index 246c37edb0..d8c35b3242 100644
--- a/macros/unicodetex/latex/polyglossia/polyglossia.dtx
+++ b/macros/unicodetex/latex/polyglossia/polyglossia.dtx
@@ -8,13 +8,12 @@
\iffalse
%</internal>
%<*README>
-# THE POLYGLOSSIA PACKAGE v1.49
+# THE POLYGLOSSIA PACKAGE v1.50
## Multilingual typesetting with XeLaTeX and LuaLaTeX
-This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
-(with a few languages incompletely supported for the latter). This version
-includes support for over 70 different languages, some of which in different
-regional or national varieties, or using a different writing system.
+This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX.
+This version includes support for over 70 different languages, some of which in
+different regional or national varieties, or using a different writing system.
Polyglossia makes it possible to automate the following tasks:
@@ -95,6 +94,21 @@ to track the issues and follow progress.
\endpostamble
\let\MetaPrefix\DoubleperCent
\askforoverwritefalse
+\generate{\file{polyglossia.sty}{\from{polyglossia.dtx}{polyglossia.sty}}}
+\generate{\file{farsical.sty}{\from{polyglossia.dtx}{farsical.sty}}}
+\generate{\file{hebrewcal.sty}{\from{polyglossia.dtx}{hebrewcal.sty}}}
+\generate{\file{hijrical.sty}{\from{polyglossia.dtx}{hijrical.sty}}}
+\generate{\file{polyglossia-french.lua}{\from{polyglossia.dtx}{polyglossia-french.lua}}}
+\generate{\file{polyglossia-korean.lua}{\from{polyglossia.dtx}{polyglossia-korean.lua}}}
+\generate{\file{polyglossia-latin.lua}{\from{polyglossia.dtx}{polyglossia-latin.lua}}}
+\generate{\file{polyglossia-punct.lua}{\from{polyglossia.dtx}{polyglossia-punct.lua}}}
+\generate{\file{polyglossia-sanskrit.lua}{\from{polyglossia.dtx}{polyglossia-sanskrit.lua}}}
+\generate{\file{polyglossia-tibt.lua}{\from{polyglossia.dtx}{polyglossia-tibt.lua}}}
+\generate{\file{polyglossia.lua}{\from{polyglossia.dtx}{polyglossia.lua}}}
+\generate{\file{babel-hebrewalph.def}{\from{polyglossia.dtx}{babel-hebrewalph.def}}}
+\generate{\file{babelsh.def}{\from{polyglossia.dtx}{babelsh.def}}}
+\generate{\file{cal-util.def}{\from{polyglossia.dtx}{cal-util.def}}}
+\generate{\file{xgreek-fixes.def}{\from{polyglossia.dtx}{xgreek-fixes.def}}}
\generate{\file{gloss-acadien.ldf}{\from{polyglossia.dtx}{gloss-acadien.ldf}}}
\generate{\file{gloss-aeb.ldf}{\from{polyglossia.dtx}{gloss-aeb.ldf}}}
\generate{\file{gloss-af.ldf}{\from{polyglossia.dtx}{gloss-af.ldf}}}
@@ -346,11 +360,11 @@ to track the issues and follow progress.
%<*internal>
\generate{\file{polyglossia.ins}{\from{polyglossia.dtx}{batchfile}}}
\nopreamble\nopostamble
-\generate{\file{../README.md}{\from{polyglossia.dtx}{../README.md}}}
\generate{\file{Changelog}{\from{polyglossia.dtx}{Changelog}}}
\generate{\file{examples.tex}{\from{polyglossia.dtx}{examples.tex}}}
\generate{\file{example-arabic.tex}{\from{polyglossia.dtx}{example-arabic.tex}}}
\generate{\file{example-thai.tex}{\from{polyglossia.dtx}{example-thai.tex}}}
+\generate{\file{README.md}{\from{polyglossia.dtx}{README}}}
\endgroup
%</internal>
%
@@ -424,6 +438,12 @@ to track the issues and follow progress.
\xpgvalue{=} \meta{code} (default value: \texttt{#3})\par%
}
+% arguments: #1 version number, #2 key name, #3 value type, #4 default value
+\NewDocumentCommand\xpgoptkey{ommo}{%
+ \xpgoption{#2}\IfValueT{#1}{\new{#1}}
+ \xpgvalue{=} \meta{#3} (default value: \texttt{#4})\par%
+}
+
%% Sidenotes << copied from fontspec.dtx
\newcommand\new[1]{%
\edef\thisversion{v#1}%
@@ -509,7 +529,7 @@ to track the issues and follow progress.
% \section{Introduction}
%
% \pkg{Polyglossia} is a package for facilitating multilingual typesetting with
-% \XeLaTeX\ and (with some exceptions) \LuaLaTeX. Basically, it
+% \XeLaTeX\ and \LuaLaTeX. Basically, it
% can be used as an alternative to \pkg{babel} for performing the following
% tasks automatically:
%
@@ -908,11 +928,19 @@ to track the issues and follow progress.
% option \xpgoption{nolocalmarks} which used to switch off the previous default, and
% now equals the default, is still available.
%
-% \item \xpgoption{quiet} turns off most info messages and some of the warnings issued
-% by \LaTeX, \pkg{fontspec} and \pkg{polyglossia}.
+% \item \xpgoptkey[1.50]{luatexrenderer}{renderer}[Harfbuzz] determines which font renderer is used
+% with \LuaTeX\ output. The correct font renderer is essential particularly for non-Latin scripts.
+% By default, \pkg{polyglossia} uses the \xpgvalue{Harfbuzz} renderer that has been introduced to
+% \LuaTeX\ in 2019 (\TeX Live 2020), as this gives the best results generally. If you want to use
+% a different renderer, you can specify this here (or individually for specific fonts via the optional
+% argument of the font selection commands). Please refer to the \pkg{fontspec} manual for supported
+% values and for details on how to change the renderer for individual fonts.\\
+% \xpgoption{luatexrenderer=none} disables \pkg{polyglossia}'s automatic renderer setting.
+%
+% \item \xpgboolkeytrue{verbose} determines whether info messages and (some of the) warnings issued
+% by \LaTeX, \pkg{fontspec} and \pkg{polyglossia} are output.
% \end{itemize}
%
-% \pagebreak
% \section{Language-switching commands}\label{languageswitching}
%
% \subsection{Recommended commands}\label{sec:langcmds}
@@ -977,17 +1005,22 @@ to track the issues and follow progress.
% \item \DescribeMacro{\foreignlanguage}\cmd{\foreignlanguage\oarg{options}\marg{lang}\marg{…}}
% \item \DescribeEnv{otherlanguage}\cmd{\begin\{otherlanguage\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage\}}
% \item \DescribeEnv{otherlanguage*}\cmd{\begin\{otherlanguage*\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{otherlanguage*\}}
+% \item \DescribeEnv{hyphenrules}\cmd{\begin\{hyphenrules\}\oarg{options}\marg{lang}} \dots{} \cmd{\end\{hyphenrules\}}\new{1.50}
% \end{itemize}
% ^^A
% \cmd\selectlanguage\marg{lang} and the ¦otherlanguage¦ environment are identical to the
-% the \meta{lang} environment, except that \cmd\selectlanguage\marg{lang}
+% \meta{lang} environment, except that \cmd\selectlanguage\marg{lang}
% does not need to be explicitly closed. The command \cmd\foreinlanguage\marg{lang}\marg{…} and the ¦otherlanguage*¦
% environment are identical with the use of the \cmd\text\meta{lang} or \cmd\textlang\ command, with the one
% notable exception that they do not translate the date with \cmd\today.
%
+% The \meta{hyphenrules} environment only switches the hyphenation patterns to the one associated with the language \meta{lang}
+% (or the language variety as specified via \meta{options}). It does no further language-specific change.
+%
% Since the \XeLaTeX\ and \LuaLaTeX\ format incorporate \pkg{babel}’s \file{hyphen.cfg},
-% the low-level commands for hyphenation and language switching
-% defined there are also accessible.
+% the low-level commands for hyphenation and language switching defined there are in principal also accessible.
+% Note, however, that the availability of such low-level commands is not guaranteed, as \file{hyphen.cfg}, which is
+% out of \pkg{polyglossia}'s control, is (or at least has been) subject to regular change.
%
% \subsection{Other commands}
% The following commands are probably of lesser interest to the end user, but
@@ -1075,25 +1108,49 @@ to track the issues and follow progress.
% which override the hyphenation patterns for specified words. The command takes as argument a space-separated
% list of words where hyphenation points are marked by a dash (if no dash is used, the respective word is not
% hyphenated at all):
-% \begin{Verbatim}
+% \begin{quote}
+% \begin{minipage}{\textwidth}
+% \begin{verbatim}
% \hyphenation{%
% po-ly-glos-sia
% LaTeX
% }
-% \end{Verbatim}
+% \end{verbatim}
+% \end{minipage}
+% \end{quote}
% ^^A
% These exceptions, however, apply to all languages. In addition to this, \pkg{polyglossia} provides
% the command\new{1.45}
-% \displaycmd{\xpghyphenation\oarg{options}\marg{lang}\marg{exceptions}}{\xpghyphenation}
+% \displaycmd{\pghyphenation\oarg{options}\marg{lang}\marg{exceptions}}{\pghyphenation}
% which can be used to define exceptions that only apply to a specific language or language variant,
% respectively.
%
+% \subsection{Hyphenation thresholds}
+%
+% \pkg{Polyglossia} sets reasonable defaults for the hyphenation thresholds of each language,
+% \ie the number of characters that must at least be there at the beginning or end of a
+% word before it is hyphenated (\cmd\lefthyphenmin\ and \cmd\righthyphenmin\ in \TeX).
+% For instance, with English, this threshold is 2 at the beginning (`left') and 3 at the end (`right'),
+% so a word will not be hyphenated within the first two characters at the beginning and the last three
+% characters at the end.
+%
+% To change this value, \pkg{polyglossia} provides the command\new{1.50}
+% \displaycmd{\setlanghyphenmins\oarg{options}\marg{lang}\marg{l}\marg{r}}{\setlanghyphenmins}
+% ^^A
+% where \meta{lang} is to be replaced with the respective language name or alias, \meta{options}
+% can be used to delimit the modification to a particular variety (\eg via \texttt{variant} or \texttt{spelling}),
+% \meta{l} with the left threshold value (\eg \texttt{3}), and \meta{r} with the right
+% threshold value (\eg \verb|\setlanghyphenmins[spelling=old]{german}{4}{4}|).
+% This setting can be changed repeatedly in the preamble and the document body.
+% It applies to all subsequent text in the respective language (variety), but only after the
+% next language switch.
+%
% \subsection{Hyphenation disabling}
%
-% In some very specific contexts (such as music score creation), \TeX{} hyphenation
-% is something to avoid as it may cause troubles. \pkg{polyglossia} provides two
-% functions: \Cmd\disablehyphenation\ and \Cmd\enablehyphenation. Note that if
-% you select a new language while hyphenation is disabled, it will remain disabled.
+% In some very specific contexts (such as music score creation), \TeX\ hyphenation
+% is something to avoid completely as it may cause troubles.
+% \pkg{Polyglossia} provides two functions: \Cmd\disablehyphenation\ and \Cmd\enablehyphenation.
+% Note that if you select a new language while hyphenation is disabled, it will remain disabled.
% If you re-enable it, the hyphenation patterns of the currently selected language
% will be activated.
%
@@ -1143,15 +1200,23 @@ to track the issues and follow progress.
% as well as the form of the numerals (unless overriden by the following option).
% \item \xpgchoicekey{numerals}{\xpgpresetvalue{mashriq} or \xpgvalue{maghrib}}
% The latter is the default when \xpgvalue{locale=algeria}, \xpgvalue{tunisia}, or \xpgvalue{morocco}.
+% \item \xpgboolkeyfalse[1.50]{abjadalph}
+% Set this to true if you want the alphabetic counters to be output using \cmd\abjadalph\ rather than \cmd\abjad.
+% Note that this limits the counter scope to 28 (see \cmd\abjadalph\ below).
% \item \xpgboolkeyfalse[1.0.3]{abjadjimnotail}
% Set this to true if you want the \textit{abjad} form of the number three to be \textarabic{ج‍} – as in the manuscript tradition – instead of the modern usage \textarabic{ج}.
% \end{itemize}
% \paragraph*{Commands:}
% \begin{itemize}
-% \item \Cmd\abjad and \Cmd\abjadmaghribi (see section \ref{abjad})
-% \item \Cmd\aemph to emphasize text with \cmd\overline.\new{1.2.0}
-% ¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}.
-% This command is also available for Farsi, Urdu, etc.
+% \item \Cmd\abjad outputs Arabic \textit{abjad} numbers according to the Mashriq varieties.
+% Example: ¦\abjad{1863}¦ yields \textarabic{\abjad{1863}}.
+% \item \Cmd\abjadmaghribi outputs Arabic \textit{abjad} numbers according to the Maghrib varieties.
+% Example: ¦\abjadmaghribi{1863}¦ yields \textarabic{\abjadmaghribi{1863}}.
+% \item \Cmd\abjadalph\new{1.50} steps through the Arabic alphabet, thus it can only be used up to 28.
+% Example: ¦\textarabic{\abjadalph{18}}¦ yields \textarabic{\abjadalph{18}}.
+% \item \Cmd\aemph to emphasize text with \cmd\overline.\new{1.2.0}
+% ¦\textarabic{\aemph{اب}}¦ yields \textarabic{\aemph{اب}}.
+% This command is also available for Farsi, Urdu, etc.
% \end{itemize}
%
% \subsection{armenian}\label{armenian}
@@ -1169,20 +1234,32 @@ to track the issues and follow progress.
% If this is turned on, the following shorthands are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to \cmd\-).
+% in the hyphenation patterns (as opposed to \cmd\-).
+% \item[¦"=¦] adds an explicit hyphen with a breakpoint, allowing for hyphenation at the
+% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
-% cases where the hyphen should stick at the following syllable.
+% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"---¦] Cyrillic emdash in plain text.
-% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
-% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
% \item[¦",¦] thinspace for initials with a breakpoint in following surname.
% \item[¦"‘¦] for German left double quotes (looks like ,,).
% \item[¦"’¦] for German right double quotes (looks like “).
% \item[¦"<¦] for French left double quotes (looks like <<).
% \item[¦">¦] for French right double quotes (looks like >>).
% \end{shorthands}
+%
+% There are also three shorthands for the Cyrillic dash (\textrussian{тире}), which is shorter than the
+% emdash but longer than the endash (namely 0.8\,em).
+% Note that, since it is not covered by unicode, this character is faked by telescoping two endashes:
+% \begin{shorthands}
+% \item[¦"---¦] Cyrillic dash for the use in normal text. This requires preceding space
+% in input (trailing space is optional) and prints with a non-breakable thin space before
+% and after the dash.
+% \item[¦"--\textasciitilde¦] Cyrillic dash for the use in compound names (surnames).
+% As opposed to ¦"---¦ this removes any space before and after the dash.
+% \item[¦"--*¦] Cyrillic dash for denoting direct speech. This adds a larger space after
+% the dash. Space before the dash is output as is.
+% \end{shorthands}
% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
% \begin{itemize}
@@ -1195,7 +1272,8 @@ to track the issues and follow progress.
% With ¦spelling=classic¦, captions and dates adhere to the Taraškievica (or
% Belarusian classical) orthography rather than the standard orthography.
% \end{itemize}
-% ^^A
+%
+% \condbreak{\baselineskip}
% \paragraph*{Commands:}
% \begin{itemize}
% \item \Cmd\Asbuk: produces uppercased Cyrillic alphanumerals, for environments such as ¦enumerate¦.
@@ -1437,20 +1515,31 @@ to track the issues and follow progress.
% If this is turned on, the following shorthands are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for
-% hyphenation at the points preset in the hyphenation patterns (as opposed
-% to \cmd\-).
+% hyphenation at the points preset in the hyphenation patterns (as opposed to \cmd\-).
+% \item[¦"=¦] adds an explicit hyphen with a breakpoint, allowing for hyphenation at the
+% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"---¦] Cyrillic emdash in plain text.
-% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
-% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
% \item[¦",¦] thinspace for initials with a breakpoint in following surname.
-% \item[¦"‘¦] for German left double quotes (looks like ,,).
-% \item[¦"’¦] for German right double quotes (looks like “).
-% \item[¦"<¦] for French left double quotes (looks like <<).
-% \item[¦">¦] for French right double quotes (looks like >>).
+% \item[¦"‘¦] for German-style left double quotes (looks like ,,).
+% \item[¦"’¦] for German-style right double quotes (looks like “).
+% \item[¦"<¦] for French-style left double quotes (looks like <<).
+% \item[¦">¦] for French-style right double quotes (looks like >>).
+% \end{shorthands}
+%
+% There are also three shorthands for the Cyrillic dash (\textrussian{тире}), which is shorter than the
+% emdash but longer than the endash (namely 0.8\,em).
+% Note that, since it is not covered by unicode, this character is faked by telescoping two endashes:
+% \begin{shorthands}
+% \item[¦"---¦] Cyrillic dash for the use in normal text. This requires preceding space
+% in input (trailing space is optional) and prints with a non-breakable thin space before
+% and after the dash.
+% \item[¦"--\textasciitilde¦] Cyrillic dash for the use in compound names (surnames).
+% As opposed to ¦"---¦ this removes any space before and after the dash.
+% \item[¦"--*¦] Cyrillic dash for denoting direct speech. This adds a larger space after
+% the dash. Space before the dash is output as is.
% \end{shorthands}
% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic} or \xpgvalue{georgian}}
% Uses either Arabic numerals or Georgian alphanumerical numbering.
@@ -1490,10 +1579,10 @@ to track the issues and follow progress.
%
% There are also four shorthands for quotation signs:
% \begin{shorthands}
-% \item[¦"`¦] for German left double quotes („)
-% \item[¦"'¦] for German right double quotes (“)
-% \item[¦"<¦] for French left double quotes («)
-% \item[¦">¦] for French right double quotes (»).
+% \item[¦"`¦] for German-style left double quotes („)
+% \item[¦"'¦] for German-style right double quotes (“)
+% \item[¦"<¦] for French-style left double quotes («)
+% \item[¦">¦] for French-style right double quotes (»).
% \end{shorthands}
% \item \xpgchoicekey[1.2.0]{script}{\xpgpresetvalue{latin} or \xpgvalue{blackletter}\new{1.46} (= \xpgvalue{fraktur})}
% Setting ¦script=blackletter¦ adapts the captions for typesetting German in blackletter type (using the long s (ſ)
@@ -1809,18 +1898,30 @@ to track the issues and follow progress.
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
% in the hyphenation patterns (as opposed to \cmd\-).
+% \item[¦"=¦] adds an explicit hyphen with a breakpoint, allowing for hyphenation at the
+% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"---¦] Cyrillic emdash in plain text.
-% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
-% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
% \item[¦",¦] thinspace for initials with a breakpoint in following surname.
-% \item[¦"‘¦] for German left double quotes (looks like ,,).
-% \item[¦"’¦] for German right double quotes (looks like “).
-% \item[¦"<¦] for French left double quotes (looks like <<).
-% \item[¦">¦] for French right double quotes (looks like >>).
+% \item[¦"‘¦] for German-style left double quotes (looks like ,,).
+% \item[¦"’¦] for German-style right double quotes (looks like “).
+% \item[¦"<¦] for French-style left double quotes (looks like <<).
+% \item[¦">¦] for French-style right double quotes (looks like >>).
+% \end{shorthands}
+%
+% There are also three shorthands for the Cyrillic dash (\textrussian{тире}), which is shorter than the
+% emdash but longer than the endash (namely 0.8\,em).
+% Note that, since it is not covered by unicode, this character is faked by telescoping two endashes:
+% \begin{shorthands}
+% \item[¦"---¦] Cyrillic dash for the use in normal text. This requires preceding space
+% in input (trailing space is optional) and prints with a non-breakable thin space before
+% and after the dash.
+% \item[¦"--\textasciitilde¦] Cyrillic dash for the use in compound names (surnames).
+% As opposed to ¦"---¦ this removes any space before and after the dash.
+% \item[¦"--*¦] Cyrillic dash for denoting direct speech. This adds a larger space after
+% the dash. Space before the dash is output as is.
% \end{shorthands}
% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
@@ -1881,13 +1982,25 @@ to track the issues and follow progress.
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
% in the hyphenation patterns (as opposed to \cmd\-).
-% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
+% \item[¦"=¦] adds an explicit hyphen with a breakpoint, allowing for hyphenation at the
+% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
+% \item[\texttt{"\textasciitilde}] adds an explicit hyphen without a breakpoint. Useful for
% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"---¦] Cyrillic emdash in plain text.
-% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
-% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
+% \end{shorthands}
+%
+% There are also three shorthands for the Cyrillic dash (\textrussian{тире}), which is shorter than the
+% emdash but longer than the endash (namely 0.8\,em).
+% Note that, since it is not covered by unicode, this character is faked by telescoping two endashes:
+% \begin{shorthands}
+% \item[¦"---¦] Cyrillic dash for the use in normal text. This requires preceding space
+% in input (trailing space is optional) and prints with a non-breakable thin space before
+% and after the dash.
+% \item[¦"--\textasciitilde¦] Cyrillic dash for the use in compound names (surnames).
+% As opposed to ¦"---¦ this removes any space before and after the dash.
+% \item[¦"--*¦] Cyrillic dash for denoting direct speech. This adds a larger space after
+% the dash. Space before the dash is output as is.
% ^^A These are commented out in gloss-russian
% ^^A \item[¦",¦] thinspace for initials with a breakpoint in following surname.
% ^^A \item[¦"‘¦] for German left double quotes (looks like ,,).
@@ -1895,6 +2008,10 @@ to track the issues and follow progress.
% ^^A \item[¦"<¦] for French left double quotes (looks like <<).
% ^^A \item[¦">¦] for French right double quotes (looks like >>).
% \end{shorthands}
+% \item \xpgboolkeytrue[1.50]{forceheadingpunctuation}
+% By default, chapter and section numbers always have a trailing punctuation in Russian
+% (as in \emph{1.1.} as opposed to \emph{1.1}). If this option is set to false, \textsf{polyglossia}
+% will not touch heading punctuation, so this will be whatever the class or a package determines.
% \item \xpgboolkeytrue[1.46]{indentfirst}
% By default, all paragraphs are indented in Russian, also those after a
% chapter or section heading. If this option is false, the latter paragraphs
@@ -2091,14 +2208,13 @@ to track the issues and follow progress.
% If this is turned on, the following shorthands are activated:
% \begin{shorthands}
% \item[¦"-¦] adds a hyphenation point that does still allow for hyphenation at the points preset
-% in the hyphenation patterns (as opposed to \cmd\-).
+% in the hyphenation patterns (as opposed to \cmd\-).
+% \item[¦"=¦] adds an explicit hyphen with a breakpoint, allowing for hyphenation at the
+% other points preset in the hyphenation patterns (as opposed to plain ¦-¦).
% \item[\texttt{"\textasciitilde}] for a hyphen sign without a breakpoint. Useful for
-% cases where the hyphen should stick at the following syllable.
+% cases where the hyphen should stick at the following syllable.
% \item[¦"|¦] disables a ligature at this position.
% \item[¦""¦] allows for a line break at this position (without hyphenation sign).
-% \item[¦"---¦] Cyrillic emdash in plain text.
-% \item[¦"--~¦] Cyrillic emdash in compound names (surnames).
-% \item[¦"--*¦] Cyrillic emdash for denoting direct speech.
% ^^A These are commented out in gloss-ukrainian
% ^^A \item[¦",¦] thinspace for initials with a breakpoint in following surname.
% ^^A \item[¦"‘¦] for German left double quotes (looks like ,,).
@@ -2106,6 +2222,19 @@ to track the issues and follow progress.
% ^^A \item[¦"<¦] for French left double quotes (looks like <<).
% ^^A \item[¦">¦] for French right double quotes (looks like >>).
% \end{shorthands}
+%
+% There are also three shorthands for the Cyrillic dash (\textrussian{тире}), which is shorter than the
+% emdash but longer than the endash (namely 0.8\,em).
+% Note that, since it is not covered by unicode, this character is faked by telescoping two endashes:
+% \begin{shorthands}
+% \item[¦"---¦] Cyrillic dash for the use in normal text. This requires preceding space
+% in input (trailing space is optional) and prints with a non-breakable thin space before
+% and after the dash.
+% \item[¦"--\textasciitilde¦] Cyrillic dash for the use in compound names (surnames).
+% As opposed to ¦"---¦ this removes any space before and after the dash.
+% \item[¦"--*¦] Cyrillic dash for denoting direct speech. This adds a larger space after
+% the dash. Space before the dash is output as is.
+% \end{shorthands}
% \item \xpgchoicekey{numerals}{\xpgpresetvalue{arabic}, \xpgvalue{cyrillic-alph} or \xpgvalue{cyrillic-trad}}
% Uses either Arabic numerals or Cyrillic alphanumerical numbering. The two Cyrillic variants differ as follows:
% \begin{itemize}
@@ -2391,7 +2520,7 @@ to track the issues and follow progress.
% Note also that the rule switches might interfere in bad ways with packages or classes that redefine footnotes themselves. This is also the reason
% why \cmd\autofootnoterule\ is not used by default.
%
-% \condbreak{5\baselineskip}
+%
% \section{Calendars}
%
% \subsection{Hebrew calendar (hebrewcal.sty)}
@@ -2529,9 +2658,9 @@ to track the issues and follow progress.
% In alphabetical order: \TA{Ignas Anikevicius}, \TA{Sina Ahmadi}, \TA{Wouter Bolsterlee}, \TA{Christian Buhtz},
% \TA{Zgarbul Andrey}, \TA{Oleg Domanov}, \TA{Philipp Gesang}, \TA{Kevin Godby}, \TA{Enrico Gregorio},
% \TA{Khaled Hosny}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime}, \TA{Mike Kroutikov},
-% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Yevgen Pogribnyi}, \TA{Will Robertson}, \TA{Maïeul Rouquette},
-% \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Niranjan Tambe}, \TA{Keno Wehr},
-% \TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
+% \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{José Mancera}, \TA{Miquel Ortega}, \TA{Yevgen Pogribnyi}, \TA{Will Robertson},
+% \TA{Maïeul Rouquette}, \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg}, \TA{Philipp Stephani}, \TA{Niranjan Tambe},
+% \TA{Keno Wehr}, \TA{Dominik Wujastyk}, \TA{Sertaç Ö. Yıldız}, \TA{Maksim Zholudev}, \TA{Yan Zhou}, and \TA{Stefan Zlatinov}.
% Their respective contributions can be identified from the contributor statistics on
% \href{https://github.com/reutenauer/polyglossia/graphs/contributors}{GitHub}.
%
@@ -2550,6 +2679,5547 @@ to track the issues and follow progress.
% \StopEventually{}
% \section{Implementation}
% \iffalse
+%<*polyglossia.sty>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia.sty}
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{polyglossia}[2020/10/09 v1.50
+ Modern multilingual typesetting with XeLaTeX and LuaLaTeX]
+\RequirePackage{etoolbox}
+\RequirePackage{makecmds}
+\RequirePackage{xkeyval}[2008/08/13]
+% Will raise error if used with anything else than XeTeX or LuaTeX
+\RequirePackage{fontspec}[2010/06/08]% v2.0
+\RequirePackage{iftex}
+\RequirePackage{expl3}
+\RequirePackage{l3keys2e}
+\RequirePackage{xparse}
+\RequirePackage{filehook}
+
+% correct a bug in tracklang
+\AtBeginOfPackageFile*{tracklang}{
+ \@ifpackagelater{tracklang}{2019/08/30}{}{\global\def\AddTrackedLangage{\AddTrackedLanguage}}
+}
+
+
+% fontspec now uses LaTeX3 packages such as expl3, so we need this:
+\ExplSyntaxOn
+
+%% This is for compatibility with Babel-aware package:
+\cslet{ver@babel.sty}{\@empty} % this "fakes" babel
+\def\languageshorthands#1{\relax} %this is for scrlttr2 class
+\def\bbl@cs#1{\csname bbl@#1\endcsname}%
+\AtEndPreamble{\let\bbl@set@language\xpg@set@language@aux} %for biblatex
+\AtEndPreamble{\let\bbl@main@language\xpg@main@language} %for biblatex
+\providecommand\texorpdfstring[2]{#1}% dummy command if hyperref is not loaded
+
+\ifluatex
+ \RequirePackage{luatexbase} % already included by fontspec, but needed here
+ \RequireLuaModule{polyglossia}
+\fi
+
+% Which version of XeTeX do we use? What is the boudary class? 4095 or 255
+\@ifundefined{e@alloc@intercharclass@top}
+ {\chardef\xpg@boundaryclass=\@cclv}
+ {\let\xpg@boundaryclass=\e@alloc@intercharclass@top}
+
+% Useful for getting list of loaded languages and variants. Like babel's bbl@loaded
+\let\xpg@loaded\@empty% list of loaded languages (polyglossia name)
+\let\xpg@vloaded\@empty% list of loaded variants
+\let\xpg@bloaded\@empty% list of loaded languages (babel name)
+\let\xpg@bcp@loaded\@empty% list of loaded languages (bcp-47 id)
+
+% counter in latin
+\def\latinalph#1{\expandafter\latin@alph\csname c@#1\endcsname}
+\def\latinAlph#1{\expandafter\latin@Alph\csname c@#1\endcsname}
+
+% select language hook
+\cs_new_nopar:Nn \polyglossia@AtBeginDocument@selectlanguage: {}
+% \disablehyphenation hook
+\cs_new_nopar:Nn \polyglossia@AtBeginDocument@hyphenation: {}
+
+% hook to be executed at begin of document
+\cs_new_nopar:Nn \polyglossia@AtBeginDocument: {
+ % save various command
+ \let\latin@alph\@alph % TODO rename when we have the C locale
+ \let\latin@Alph\@Alph % TODO rename when we have the C locale
+ % push to C language gloss
+ \let\polyglossia@Clang@@arabic\@arabic
+ \let\polyglossia@Clang@arabic\arabic
+
+ \xpg@initial@setup
+ % apply \familydefault changes
+ \xpg@set@familydefault
+}
+
+\AtBeginDocument{
+ \polyglossia@AtBeginDocument:
+}
+
+% The following needs to go after any \AtBeginDocument (also of packages
+% loaded after \set[main|other]language
+\AfterEndPreamble{
+ % now we have the C locale definition: select the language
+ \polyglossia@AtBeginDocument@selectlanguage:
+ % If hyphenation disabling has been requested in preamble, do it now
+ \polyglossia@AtBeginDocument@hyphenation:
+}
+
+%% custom message macros
+\providecommand*{\xpg@error}[1]{%
+ \PackageError{polyglossia}{#1}{}%
+}
+
+\providecommand*{\xpg@warning}[1]{%
+ \PackageWarning{polyglossia}{#1}%
+}
+
+\providecommand*{\xpg@info}[1]{%
+ \PackageInfo{polyglossia}%
+ {#1\@gobble}%
+} %% the \@gobble is to prevent displaying the line nr
+
+%TODO change all instances of \xpg@nopatterns in gloss-*.ldf files
+\providecommand*{\xpg@nopatterns@fallback}[2][nohyphenation]{%
+ \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#2'\MessageBreak
+ I~ will~ use~ \string\language=\string\l@ #1\space instead}%
+ \expandafter\adddialect\csname l@#2\expandafter\endcsname\csname l@#1\endcsname\relax}
+
+\providecommand*{\xpg@nopatterns}[1]{%
+ \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#1'\MessageBreak
+ I~ will~ use~ \string\language=\string\l@nohyphenation\space instead}%
+ %%TODO? \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
+ }
+
+\def\xpg@ill@value#1#2{%
+ \xpg@warning{Illegal~ value~ (#1)~ for~ #2}}
+
+% error out if lang is not loaded
+\cs_new_nopar:Nn \polyglossia@error@iflangnotloaded:n
+{
+ \cs_if_exist:cF{#1@loaded}
+ {
+ \xpg@error{language~ #1~ is~ not~ loaded.~ Please~ load~ it~ before~ using~ it.}
+ }
+}
+
+
+% error do not use directly the gloss file
+\msg_new:nnn { polyglossia } { directloadgloss }
+{
+ You~ should~ not~ load~ directly~ the~ gloss~ file~ using~ `\string\usepackage'.
+ You~ must~ use~ `\string\setotherlanguage\{#1\}' or `\string\setmainlanguage\{#1\}'.
+}
+\msg_redirect_name:nnn { polyglossia } { directloadgloss } { critical }
+
+%% use macro if defined, else warn that it is not
+\def\csuse@warn#1{%
+ \ifcsundef{#1}{\xpg@warning{ \expandafter\string\csname #1\endcsname\space is~ not~ defined}}%
+ {\csname #1\endcsname}}
+
+%% ensure directionality if bidi is loaded, else ignore
+\def\@@ensure@dir#1{\ifcsundef{@ensure@dir}{#1}{\@ensure@dir{#1}}}
+\def\@@ensure@maindir#1{\ifcsundef{@ensure@maindir}{#1}{\@ensure@maindir{#1}}}
+
+%% Used by the language definitions files for right-to-left languages
+\def\RequireBidi{%
+ \str_case_e:nnF{\c_sys_engine_str}{
+ {luatex}{\ifx\@onlypreamble\@notprerr\else\RequirePackage{luabidi}\fi}
+ {xetex}{\ifx\@onlypreamble\@notprerr\else\RequirePackage{bidi}\fi}
+ }
+ {
+ \xpg@warning{You’re running a TeX engine that is not LuaTeX or XeTeX.\MessageBreak
+ That is almost guaranteed to cause problems.}
+ }
+}
+
+% (lua)bidi commands to change directionality for paragraphs
+% and inline text.
+% overwritten with correct package
+\cs_new_nopar:Nn{\polyglossia@setpardirection:n}{%
+ \str_case_e:nnTF{#1}{%
+ {LR}{\relax}%
+ {RL}{\xpg@error{right-to-left,~ but~ (lua)bidi~ package~ was~ not~ loaded!}}%
+ }%
+ {}%
+ {\xpg@error{Unknown~ language~ direction~ #1 ~(base~ wrapper)}}%
+}
+\cs_new_nopar:Nn{\polyglossia@settextdirection:n}{%
+ \str_case_e:nnTF{#1}{%
+ {LR}{\relax}%
+ {RL}{\xpg@error{right-to-left,~ but~ (lua)bidi~ package~ was~ not~ loaded!}}%
+ }%
+ {}%
+ {\xpg@error{Unknown~ language~ direction~ #1 ~(base~ wrapper)}}%
+}
+\AtEndOfPackageFile*{bidi}{%
+ \ExplSyntaxOn%
+ \cs_gset_nopar:Nn{\polyglossia@setpardirection:n}{%
+ \str_case_e:nnTF{#1}{%
+ {LR}{\setLR}%
+ {RL}{\setRL}%
+ }%
+ {}%
+ {\xpg@error{Unknown~ language~ direction~ #1 ~(bidi~ wrapper)}}%
+ }%
+ \cs_gset_nopar:Nn{\polyglossia@settextdirection:n}{%
+ \str_case_e:nnTF{#1}{%
+ {LR}{\LRE}%
+ {RL}{\RLE}%
+ }%
+ {}%
+ {\xpg@error{Unknown~ language~ direction~ #1 ~(bidi~ wrapper)}}%
+ }%
+ \ExplSyntaxOff%
+}
+\AtEndOfPackageFile*{luabidi}{%
+ \ExplSyntaxOn%
+ \cs_gset_nopar:Nn{\polyglossia@setpardirection:n}{%
+ \str_case_e:nnTF{#1}{%
+ {LR}{\setLR}%
+ {RL}{\setRL}%
+ }
+ {}%
+ {\xpg@error{Unknown~ language~ direction~ #1 ~(luabidi~ wrapper)}}%
+ }%
+ \cs_gset_nopar:Nn{\polyglossia@settextdirection:n}{%
+ \str_case_e:nnTF{#1}{%
+ {LR}{\LRE}%
+ {RL}{\RLE}%
+ }
+ {}%
+ {\xpg@error{Unknown~ language~ direction~ #1 ~(luabidi~ wrapper)}}%
+ }%
+ \ExplSyntaxOff%
+}
+
+%% compatibility with babel
+\let\addto\gappto% gappto is defined in etoolbox
+
+%% NEW EXPERIMENTAL SETUP INTERFACE FOR GLOSS FILES
+%% options currently available:
+%% language : the name of the language (as understood by fontspec)
+%% hyphennames : the different hyphenation patterns to try (comma separated list)
+%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback, with \xpg@nopatterns@fallback - i.e. with a warning: e.g. sanskrit for hindi, or catalan for asturian. – Also for languages with variants! (English and German, etc.)
+%% script : the name of the script (as understood by fontspec) – default is Latin
+%% scripttag : the OpenType tag for the script
+%% langtag : the OpenType tag for the language
+%% hyphenmins : the hyphenmins for this language (comma-sep list of two integers)
+%% frenchspacing : boolean
+%% indentfirst : boolean
+%% fontsetup : boolean
+%% TODO: nouppercase : boolean (for scripts like Arabic, Devanagari, etc which have no concept of uppercase/lowercase)
+%% TODO: localalph = {<alph_csname>,<Alph_csname>}
+%% TODO: localnumeral = <csname>
+%% or even better localdigits = {0123456789} for fully automatic setup
+\newif\if@xpg@language@really@defined@
+\newcommand*\PolyglossiaSetup[2]{%
+ \polyglossia@keys_define_lang:n{#1}%
+ \keys_set:nn { polyglossia / #1 } { #2 }%
+ \prop_log:N{\polyglossia@langsetup}
+ \polyglossia_setup_hyphen:n {#1}
+ %define booleans etoolbox style and set defaults
+ %% TODO ? \providetoggle{#1@setup@done}%
+ % we initialize these so that we can use \gappto below
+ \csgdef{init@extras@#1}{}%
+ \csgdef{init@noextras@#1}{}% we don't use this yet: remove?
+ % here we do the fontsetup:
+ \polyglossia@lang@autosetupfont:n{#1}
+ %% TODO? \toggletrue{#1@setup@done}%
+ % reinit \do
+ \def\do##1{\setotherlanguage{##1}}%
+}
+
+% Adjust language key setting after initial setup
+% This is needed, e.g., for languages with varying script
+\DeclareDocumentCommand \SetLanguageKeys { m m }
+{
+ \clist_map_inline:nn { #1 } { \keys_set:nn { polyglossia / ##1 } { #2 } }
+}
+
+
+% setup hyphennames from a str list of hyphen
+\cs_new:Nn \polyglossia_setup_hyphen:n {
+ \exp_args:Nne \clist_set:Nn{\l_tmpa_clist}{\prop_item:Nn \polyglossia@langsetup {#1 / hyphennames}}
+ \providebool{havehyphen}
+ \boolfalse{havehyphen}
+ % for each hyphen in the set until we find one that works
+ \clist_map_inline:Nn \l_tmpa_clist {
+ \ifbool{havehyphen}{}{%
+ % check if language hyphenname is defined
+ \polyglossia@check@ifdefined:NF{#1}{%
+ % if not, first consider nohyphenation
+ \str_if_eq:nnTF{##1}{nohyphenation}
+ {%
+ \cs_gset_eq:cc{l@#1}{l@##1}
+ \global\booltrue{havehyphen}
+ }{%
+ % then test if hyphenation is defined
+ \xpg@ifdefined{##1}{
+ % test if language hyphenation is nohyphenation
+ \cs_if_eq:cNF{l@#1}{\l@nohyphenation}{\global\booltrue{havehyphen}}{%
+ % if false define language to hyphenation if it is not equal...
+ \str_if_eq:nnF{#1}{##1}{\cs_gset_eq:cc{l@#1}{l@##1}}
+ % ...and load
+ \xpg@set@hyphenation@patterns{##1}
+ \global\booltrue{havehyphen}
+ }%
+ }{}%
+ }%
+ }%
+ }%
+ }%
+ % if l@#1 does not yet exist,
+ % we assign it to nohyphenation
+ % we do this here in case and if the hyphennames key was omitted
+ \ifbool{havehyphen}{}{%
+ \xpg@ifdefined{#1}{}%
+ {
+ \xpg@nopatterns{#1}
+ \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
+ }%
+ }%
+ \csdef{#1@language}{%
+ \polyglossia@setup@language@patterns{#1}%
+ }%
+ % setup hyphenmins
+ \exp_args:NNe \clist_set:Nn \l_tmpa_clist
+ { \prop_item:Nn \polyglossia@langsetup {#1 / hyphenmins} }
+ \cs_if_eq:cNF {l@#1} \l@nohyphenation
+ {
+ \use:x
+ {
+ \exp_not:N \setlocalhyphenmins {#1}
+ { \clist_item:Nn \l_tmpa_clist {1} }
+ { \clist_item:Nn \l_tmpa_clist {2} }
+ }
+ }
+}
+
+\newcommand*\polyglossia@setup@language@patterns[1]{%
+ \ifbool{xpg@hyphenation@disabled}{%
+ \xdef\xpg@lastlanguage{\the\csname l@#1\endcsname}%
+ }{%
+ % first, test if \l@#1 exists
+ % without that, \csname l@#1\endcsname will be defined as \relax
+ \cs_if_exist:cTF {l@#1}
+ {
+ \cs_if_eq:cNTF {l@#1} \l@nohyphenation
+ {
+ \language=\l@nohyphenation
+ }
+ {
+ \xpg@set@hyphenation@patterns{#1}
+ }
+ }
+ {%
+ % Since this function is sometimes called from the gloss files
+ % directly, we need to check whether the requested hyphenname exists.
+ \xpg@ifdefined{#1}{}%
+ {%
+ \xpg@nopatterns{#1}
+ \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax%
+ }%
+ \xpg@set@hyphenation@patterns{#1}
+ }
+ }
+}
+
+\prop_new:N \polyglossia@langsetup
+
+\cs_new_protected:Npn \polyglossia@keys_define_lang:n #1 {
+ \keys_define:nn {polyglossia}{
+ % the script font
+ #1 / script
+ .code:n = {
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/script}{##1}
+ \prop_gput:Nnx{\polyglossia@langsetup}{#1/lcscript}
+ {\tl_if_empty:nF{##1}{\str_lowercase:n##1}}
+ },
+ #1 / script
+ .value_required:n = true,
+ #1 / script
+ .initial:n = latin,
+ % the opentype script tag
+ #1 / scripttag
+ .code:n = {\prop_gput:Nnn{\polyglossia@langsetup}{#1/scripttag}{##1}},
+ #1 / scripttag
+ .default:n = {},
+ #1 / scripttag
+ .initial:n = {},
+ % the language full name
+ #1 / language
+ .code:n = {\prop_gput:Nnn{\polyglossia@langsetup}{#1/language}{##1}},
+ #1 / language
+ .value_required:n = true,
+ #1 / language
+ .initial:x = {\str_upper_case:n#1},
+ % the language tag
+ #1 / langtag
+ .code:n = {\prop_gput:Nnn{\polyglossia@langsetup}{#1/langtag}{##1}},
+ #1 / langtag
+ .value_required:n = true,
+ #1 / langtag
+ .initial:n = {},
+ % the BCP-47 tag
+ #1 / bcp47
+ .code:n = {\prop_gput:Nnn{\polyglossia@langsetup}{#1/bcp47}{##1}},
+ #1 / bcp47
+ .value_required:n = true,
+ #1 / bcp47
+ .initial:n = {},
+ % hyphennames
+ #1 / hyphennames
+ .code:n = {
+ \clist_set:Nn{\l_tmpa_clist}{##1}
+ \prop_gput:Nnx{\polyglossia@langsetup}{#1/hyphennames}{\clist_use:Nn \l_tmpa_clist {,}}
+ },
+ #1 / hyphennames
+ .value_required:n = true,
+ #1 / hyphennames
+ .initial:x = {\c_empty_clist},
+ % direction
+ #1 / direction
+ . code:n = {
+ \str_case_e:nnTF{##1}{
+ {LR}{}
+ {RL}{\RequireBidi}
+ }
+ {\prop_gput:Nnn{\polyglossia@langsetup}{#1/direction}{##1}}
+ {\xpg@error{Unknown~ direction~ "##1"~ for~ language~ "#1"}}
+ },
+ #1 / direction
+ .value_required:n = true,
+ #1 / direction
+ .initial:n = {LR},
+ % minimal left and right hyphenation minima using
+ #1 / hyphenmins
+ .code:n = {
+ % check syntax
+ \int_compare:nNnF { \clist_count:n {##1} } = {2}
+ {\xpg@error{hypenmins~should~be~a~list~of~two~entries,~got~"##1"}}
+ % set prop
+ \prop_gput:Nnn \polyglossia@langsetup {#1/hyphenmins} {##1}
+ },
+ #1 / hyphenmins
+ .value_required:n = true,
+ #1 / hyphenmins
+ .initial:n = {2,3},
+ % minimal length for hyphenation (LuaTeX only)
+ #1 / totalhyphenmin
+ .code:n = {
+ % check syntax
+ \int_compare:nNnF { \clist_count:n {##1} } = {1}
+ {\xpg@error{totalhyphenhypenmin~should~be~a~single~entry,~got~"##1"}}
+ % set prop
+ \prop_gput:Nnn \polyglossia@langsetup {#1/totalhyphenmin} {##1}
+ },
+ #1 / totalhyphenmin
+ .value_required:n = false,
+ % frenchspacing
+ #1 / frenchspacing
+ .code:n = {
+ \str_case_e:nnTF{##1}{
+ {true}{}
+ {false}{}
+ }
+ {}
+ {\xpg@error{frenchspacing~should~be~true~or~false. Is~ "##1"~ for~ language~ "#1"}}
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/frenchspacing}{##1}
+ },
+ #1 / frenchspacing
+ .default:n = true,
+ #1 / frenchspacing
+ .initial:n = false,
+ % indent first line
+ #1 / indentfirst
+ .code:n = {
+ \str_case_e:nnTF{##1}{
+ {true}{}
+ {false}{}
+ }
+ {}
+ {\xpg@error{indentfirst~should~be~true~or~false. Is~ "##1"~ for~ language "#1"}}
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/indentfirst}{##1}
+ },
+ #1 / indentfirst
+ .default:n = true,
+ #1 / indentfirst
+ .initial:n = false,
+ % fontsetup
+ #1 / fontsetup
+ .code:n = {
+ \str_case_e:nnTF{##1}{
+ {true}{}
+ {false}{}
+ }
+ {}
+ {\xpg@error{fontsetup~should~be~true~or~false. Is "##1"~ for~ language~ "#1"}}
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/fontsetup}{##1}
+ },
+ #1 / fontsetup
+ .default:n = true,
+ #1 / fontsetup
+ .initial:n = false,
+ % environment name
+ #1 / envname
+ .code:n = {
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/envname}{##1}
+ },
+ #1/ envname.value_required:n = true,
+ #1/ envname.initial:n = {#1},
+ % babel name
+ #1 / babelname
+ .code:n = {
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/babelname}{##1}
+ },
+ #1/ babelname.value_required:n = true,
+ #1/ babelname.initial:n = {#1},
+ % default numerals
+ #1 / localnumeral
+ . code:n = {
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/localnumeral}{##1}
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/Localnumeral}{##1}
+ },
+ #1 / localnumeral.value_required:n = true,
+ #1 / localnumeral.initial:n = {polyglossia@C@localnumeral},
+ % uppercased
+ #1 / Localnumeral
+ . code:n = {
+ \prop_gput:Nnn{\polyglossia@langsetup}{#1/Localnumeral}{##1}
+ },
+ #1 / Localnumeral.value_required:n = true,
+ #1 / Localnumeral.initial:n = {polyglossia@C@localnumeral}
+ }
+}
+
+% TODO move to C module
+\newcommand*{\polyglossia@C@localnumeral}[2]{
+ \polyglossia@Clang@@arabic{#2}
+}
+
+% print using main language
+% #2 is the numeral to print
+% #3 is the mainlanguage (should be expanded)
+% #4 is the current language (should be expanded)
+% #1 is the option list (should be expanded)
+% #5 is the name of the field to use
+\cs_new:Nn \polyglossia_localnumeral_mainlang:nnnnn {
+ \foreignlanguage{#3}{\use:c {\prop_item:Nn \polyglossia@langsetup {#3/#5}} {#1} {#2}}
+}
+
+
+% print using local language
+% #2 is the numeral to print
+% #3 is the mainlanguage (should be expanded)
+% #4 is the current language (should be expanded)
+% #1 is the option list (should be expanded)
+% #5 is the name of the field to use
+\cs_new:Nn \polyglossia_localnumeral_locallang:nnnnn {
+ \use:c {\prop_item:Nn \polyglossia@langsetup {#4/#5}} {#1} {#2}
+}
+
+% this function try to resolve some simple parameter about lang
+% call #2 then branching if found
+% call parameter #3 if not found
+% (use curing)
+\cs_new:Npn \polyglossia_localnumeral_callshortcutorlong:nF #1#2 {
+ \str_case:nnF{#1}{
+ {lang=local}{\polyglossia_localnumeral_locallang:nnnnn}
+ }
+ {#2}
+}
+
+\cs_new:Npn \polyglossia_iii_map_csv_field_split_kv_iii_localnumeral:w #1 = #2 \q_stop {
+ \str_case:nnF{#2}{
+ {local} {\clist_map_break:n{\use_i:nn \polyglossia_localnumeral_locallang:nnnnn }}
+ {default}{\clist_map_break:n{\use_i:nn \polyglossia_localnumeral_locallang:nnnnn }}
+ {*} {\clist_map_break:n{\use_i:nn\polyglossia_localnumeral_mainlang:nnnnn }}
+ {main} {\clist_map_break:n{\use_i:nn\polyglossia_localnumeral_mainlang:nnnnn }}
+ }{
+ \clist_map_break:n{ \use_i_ii:nnn \polyglossia_localnumeral_langlang:nnnnnn {{#2}} }
+ }
+}
+
+
+% call the language
+% #3 is the numeral to print
+% #4 is the mainlanguage (should be expanded)
+% #5 is the current language (should be expanded)
+% #2 is the option list (should be expanded)
+% #6 is the name of the field to use
+% #1 is the language used
+\cs_new:Nn \polyglossia_localnumeral_langlang:nnnnnn {
+ \foreignlanguage{#1}{\use:c {\prop_item:Nn \polyglossia@langsetup {#1/#6}} {#2} {#3}}
+}
+
+
+% check if empty value
+\cs_new:Npn \polyglossia_iii_map_csv_field_split_kv_ii_localnumeral:w #1 #2 = #3 \q_stop {
+ \quark_if_no_value:NTF {#3}
+ {
+ \clist_map_break:n{\use_i:nn \polyglossia_localnumeral_locallang:nnnnn}
+ }
+ {
+ \polyglossia_iii_map_csv_field_split_kv_iii_localnumeral:w #1 \q_stop
+ }
+}
+
+\cs_new:Npn \polyglossia_iii_map_csv_field_split_kv_i_localnumeral:nw #1 #2 = #3 \q_stop {
+ % parse only lang tag
+ \tl_trim_spaces_apply:nN {#2} \str_if_eq:nnT {lang}
+ {
+ % if empty value
+ \quark_if_nil:nTF{#3}
+ {
+ \clist_map_break:n{\use_i:nn \polyglossia_localnumeral_locallang:nnnn}
+ }
+ {
+ % here we know what we have an equal sign
+ \polyglossia_iii_map_csv_field_split_kv_ii_localnumeral:w {#1} #1 \q_no_value \q_stop
+ }
+ }
+}
+
+% map function
+\cs_new:Nn \polyglossia_iii_map_csv_localnumeral:n {
+ % fast case is do nothing is empty
+ \tl_if_empty:nF{#1}
+ {
+ \polyglossia_iii_map_csv_field_split_kv_i_localnumeral:nw {#1} #1 = \q_nil \q_stop
+ }
+}
+
+
+% treat option is empty and option is lang=local
+% #2 number
+% #3 mainlanguage
+% #4 locallanguage
+% #5 field to call
+% #1 option
+% strip space to option
+\cs_new:Nn \polyglossia_iii_localnumeral:nnnnn {
+ \tl_if_blank:nTF{#1}
+ {
+ \polyglossia_localnumeral_mainlang:nnnnn
+ }
+ {
+ \str_if_eq:nnTF{#1}{lang=local}
+ {
+ \polyglossia_localnumeral_locallang:nnnnn
+ }
+ {
+ % use postscript like trick push to stack {#1} {#2} {#3} {#4}
+ \polyglossia_localnumeral_callshortcutorlong:nF {#1}
+ {
+ % same trick here if found we emit \use_i:nn
+ % thus discarding the default choice that is not lang specified thus local
+ \clist_map_function:nN {#1} {\polyglossia_iii_map_csv_localnumeral:n}
+ \polyglossia_localnumeral_locallang:nnnnn
+ }
+ }
+ {#1} {#2} {#3} {#4} {#5}
+ }
+}
+
+
+% internal helper useful for oeee and onnn
+% #1 number
+% #2 mainlanguage
+% #3 locallanguage
+% #4 option
+% #5 field to call
+% strip space to option
+\cs_new:Nn \polyglossia_ii_localnumeral:nnnnn {
+ \tl_trim_spaces_apply:nN {#4} \polyglossia_iii_localnumeral:nnnnn {#1}{#2}{#3}{#5}
+}
+\cs_generate_variant:Nn \polyglossia_ii_localnumeral:nnnnn {
+ eeenn, eeeon, eeeen
+}
+
+% convert the counter to value
+% #1 counter
+% #2 mainlanguage
+% #3 locallanguage
+% #4 option
+\cs_new:Nn \polyglossia_i_localnumeral:nnnnn
+{
+ \polyglossia_ii_localnumeral:eeeen {\int_value:w #1} {#2} {#3} {#4} {#5}
+}
+
+% print number usage \localnumeral[option]{numeral}
+% or \localnumeral*[option]{counter}
+% \Localnumeral[]{numeral} use main language
+% \localnumeral{numeral} use local language
+\NewExpandableDocumentCommand{\localnumeral}{som}
+{
+ \IfBooleanTF{#1}%
+ {% starred: take counter
+ \exp_args:Nc \polyglossia_i_localnumeral:nnnnn {c@#3}
+ {\mainlanguagename} {\languagename} {\IfNoValueTF {#2}{lang=local}{#2}} {localnumeral}
+ }{% unstarred: take number
+ \polyglossia_ii_localnumeral:eeeen {\int_eval:n{#3}}
+ {\mainlanguagename} {\languagename} {\IfNoValueTF {#2}{lang=local}{#2}} {localnumeral}
+ }
+}
+
+% print number usage \Localnumeral[option]{numeral}
+% or \Localnumeral*[option]{counter}
+% \Localnumeral[]{numeral} use main language
+% \localnumeral{numeral} use local language
+\NewExpandableDocumentCommand{\Localnumeral}{som}
+{
+ \IfBooleanTF{#1}%
+ {% starred: take counter
+ \exp_args:Nc \polyglossia_i_localnumeral:nnnnn {c@#3}
+ {\mainlanguagename} {\languagename} {\IfNoValueTF {#2}{lang=local}{#2}} {Localnumeral}
+ }{% unstarred: take number
+ \polyglossia_ii_localnumeral:eeeon {\int_eval:n{#3}}
+ {\mainlanguagename} {\languagename} {\IfNoValueTF {#2}{lang=local}{#2}} {Localnumeral}
+ }
+}
+
+\cs_new_nopar:Nn{\polyglossia@lang@frenchspacing:n}{
+ \prop_get:NxNTF \polyglossia@langsetup {#1/frenchspacing} \l_tmpa_tl
+ {
+ \str_case_e:nnF{\l_tmpa_tl}{
+ {true}{\frenchspacing}
+ {false}{\nonfrenchspacing}
+ }
+ {\xpg@error{frenchspacing~should~be~true~or~false. Is~"\l_tmpa_ttl"~ for~ language~ "#1"}}
+ }
+ {
+ \xpg@error{Could~ not~ retrieve~ key~ frenchspacing~ for~ language~ "#1"}
+ \prop_show:N{\polyglossia@langsetup}
+ }
+}
+
+\cs_new_nopar:Nn{\polyglossia@lang@indentfirst:n}{
+ \prop_get:NxNTF \polyglossia@langsetup {#1/indentfirst} \l_tmpa_tl
+ {
+ \str_case_e:nnF{\l_tmpa_tl}{
+ {true}{\french@indent}
+ {false}{\nofrench@indent}
+ }
+ {\xpg@error{indentfirst~should~be~true~or~false. Is~"\l_tmpa_ttl"~ for~ language~ "#1"}}
+ }
+ {
+ \xpg@error{Could~ not~ retrieve~ key~ indentfirst~ for~ language~ "#1"}
+ \prop_show:N{\polyglossia@langsetup}
+ }
+}
+
+
+\cs_new:Nn{\polyglossia@lang@setpardirection:n}{
+ \prop_get:NxNTF \polyglossia@langsetup {#1/direction} \l_tmpa_tl
+ {
+ \polyglossia@setpardirection:n{\l_tmpa_tl}
+ }
+ {
+ \xpg@error{Could~ not~ retrieve~ key~ direction~ for~ language~ "#1"}
+ \prop_show:N{\polyglossia@langsetup}
+ }
+}
+
+
+\cs_new:Nn{\polyglossia@lang@settextdirection:nn}{
+ \prop_get:NxNTF \polyglossia@langsetup {#1/direction} \l_tmpa_tl
+ {
+ \polyglossia@settextdirection:n{\l_tmpa_tl}{#2}
+ }
+ {
+ \xpg@error{Could~ not~ retrieve~ key~ direction~ for~ language~ "#1"}
+ \prop_show:N{\polyglossia@langsetup}
+ }
+}
+
+\AtEndDocument{\prop_log:N{\polyglossia@langsetup}}
+\def\xpg@lastlanguage{0}%
+
+\providebool{xpg@hyphenation@disabled}%
+\boolfalse{xpg@hyphenation@disabled}
+
+\def\xpg@disablehyphenation{%
+ \ifx\@onlypreamble\@notprerr%
+ \xpg@@disablehyphenation%
+ \else%
+ % if this is used in the preamble, we have to postpone
+ % the execution until the main language has been set (#125).
+ \cs_gset_nopar:Nn \polyglossia@AtBeginDocument@hyphenation: {
+ \xpg@@disablehyphenation%
+ }%
+ \fi%
+}
+
+\def\xpg@@disablehyphenation{%
+ \ifbool{xpg@hyphenation@disabled}{}{%
+ \booltrue{xpg@hyphenation@disabled}%
+ \xdef\xpg@lastlanguage{\the\language}%
+ % We do not call \xpg@set@hyphenation@patterns here to avoid a warning message.
+ % "nohyphenation" is not listed in language.dat.lua.
+ \language=\l@nohyphenation%
+ }%
+}
+
+\def\xpg@enablehyphenation{%
+ \ifbool{xpg@hyphenation@disabled}{%
+ \boolfalse{xpg@hyphenation@disabled}%
+ \language=\csname xpg@lastlanguage\endcsname%
+ }{}%
+}
+
+\let\disablehyphenation\xpg@disablehyphenation
+\let\enablehyphenation\xpg@enablehyphenation
+
+%\def\xpg@fontsetup#1{\xpg@csifdef@warn{xpg@fontsetup@#1}}
+%\def\xpg@fontsetup@none#1{\csgdef{#1@font}{\ifcsdef{#1font}{\csname #1font\endcsname}{}}} %<-- simplistic
+%\def\xpg@fontsetup@custom#1{\csuse{#1@font}}
+
+\cs_new:Nn \polyglossia@lang@autosetupfont:n {
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/fontsetup}}{true}
+ {
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript}}{latin}%
+ {\xpg@fontsetup@latin{#1}}
+ {\xpg@fontsetup@nonlatin{#1}}
+ }
+ {
+ \xpg@info{Skipping~ automatic~ font~ setup~ for~ language~ #1}
+ }
+}
+
+
+% add fontfeature Language=#2 to langtag #1
+% do nothing if #1 or #2 is empty
+\cs_new:Nn \polyglossia@addfontfeature@language:nn {
+ \bool_if:nTF{\tl_if_empty_p:n{#1} || \tl_if_empty_p:n{#2}}
+ {
+ % maybe an error ?
+ \xpg@warning{Asking~ to~ add~ empty~ feature~to~ latin~ font~
+ (Language="#2"~ to~ langtag~ "#1")}
+ }
+ {
+ \str_if_eq:nnTF{#2}{Turkish}{
+ \fontspec_if_language:nTF {TRK}%
+ {
+ \addfontfeature{Language=Turkish}
+ }
+ {
+ \fontspec_if_language:nTF {TUR}%
+ {
+ \addfontfeature{Language=Turkish}
+ }{}
+ }
+ }{
+ \fontspec_if_language:nTF{#1}
+ {
+ \addfontfeature{Language=#2}
+ }
+ {}
+ }
+ }
+}
+\cs_generate_variant:Nn \polyglossia@addfontfeature@language:nn { on , no, oo , Vn, nV, VV , xn, nx, xx}
+
+% add fontfeature Script=#2 to scripttag #1
+% do nothing if #1 or #2 is empty
+\cs_new:Nn \polyglossia@addfontfeature@script:nn {
+ \bool_if:nTF{\tl_if_empty_p:n{#1} || \tl_if_empty_p:n{#2}}
+ {
+ % maybe an error ?
+ \xpg@warning{Asking~ to~ add~ empty~ feature~to~ latin~ font
+ (Script="#2"~ to~ scripttag~ "#1")}
+ }
+ {
+ \fontspec_if_script:nTF{#1}
+ {\addfontfeature{Script=#2}}
+ {\xpg@error{
+ The~ current~ latin ~ font~ \l_fontspec_family_tl\space does~ not~ contain~ the~"#2"~ script!\MessageBreak
+ Please~ define~\csname\tl_if_empty:nF{#2}{\str_lowercase:n#2}font\endcsname~
+ with~ \string\newfontfamily\space command
+ }
+ }
+ }
+}
+\cs_generate_variant:Nn \polyglossia@addfontfeature@script:nn { on , no, oo , Vn, nV, VV , xn, nx, xx}
+
+\def\xpg@fontsetup@latin#1{%
+ \begingroup
+ \csgdef{#1@font@rm}{%
+ \cs_if_exist_use:cF{#1font}{
+ \rmfamilylatin
+ \polyglossia@addfontfeature@language:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/langtag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ }
+ }
+ \csgdef{#1@font@sf}{%
+ \cs_if_exist_use:cF{#1fontsf}{
+ \sffamilylatin
+ \polyglossia@addfontfeature@language:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/langtag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ }%
+ }%
+ \csgdef{#1@font@tt}{%
+ \cs_if_exist_use:cF{#1fonttt}{
+ \ttfamilylatin
+ \polyglossia@addfontfeature@language:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/langtag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ }%
+ }%
+ \endgroup
+}
+
+\def\xpg@fontsetup@nonlatin#1{%
+ \begingroup
+ \csgdef{#1@font@rm}{%
+ \cs_if_exist_use:cF{#1font}
+ {
+ \providetoggle{#1@use@script@font}%
+ \str_if_eq:nnTF{\prop_item:Nn{\polyglossia@langsetup}{#1/script}}{\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ {\rmfamilylatin}%
+ {\cs_if_exist_use:cTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript} font}
+ {
+ \toggletrue{#1@use@script@font}%
+ }
+ {
+ \rmfamilylatin
+ }
+ }
+ \iftoggle{#1@use@script@font}{}{%
+ \polyglossia@addfontfeature@script:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/scripttag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/script}}
+ }%
+ \polyglossia@addfontfeature@language:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/langtag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ }}%
+ \csgdef{#1@font@sf}{%
+ \cs_if_exist_use:cF{#1fontsf}%
+ {
+ \providetoggle{#1@use@script@fontsf}%
+ \str_if_eq:nnTF{\prop_item:Nn{\polyglossia@langsetup}{#1/script}}{\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ {\sffamilylatin}%
+ {\cs_if_exist_use:cTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript} fontsf}
+ {
+ \toggletrue{#1@use@script@fontsf}%
+ }
+ {
+ \sffamilylatin
+ }
+ }
+ \iftoggle{#1@use@script@fontsf}{}{%
+ \polyglossia@addfontfeature@script:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/scripttag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/script}}
+ }%
+ \polyglossia@addfontfeature@language:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/langtag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ }}%
+ \csgdef{#1@font@tt}{%
+ \cs_if_exist_use:cF{#1fonttt}%
+ {
+ \providetoggle{#1@use@script@fonttt}%
+ \str_if_eq:nnTF{\prop_item:Nn{\polyglossia@langsetup}{#1/script}}{\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ {\ttfamilylatin}%
+ {\cs_if_exist_use:cTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript} fonttt}
+ {
+ \toggletrue{#1@use@script@fonttt}%
+ }
+ {
+ \ttfamilylatin
+ }
+ }
+ \iftoggle{#1@use@script@fonttt}{}{%
+ \polyglossia@addfontfeature@script:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/scripttag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/script}}
+ }%
+ \polyglossia@addfontfeature@language:xx{\prop_item:Nn{\polyglossia@langsetup}{#1/langtag}}
+ {\prop_item:Nn{\polyglossia@langsetup}{#1/language}}
+ }}%
+ \endgroup
+}
+
+%%% END OF PolyglossiaSetup
+
+%% ensure localization of \markright and \markboth commands
+%%% THIS IS NOW DISABLED BY DEFAULT
+\cs_new_nopar:Nn {\polyglossia@local@marks:n} {}
+\cs_new_nopar:Nn {\polyglossia@enable@local@marks:}
+{
+ \xpg@info{Option:~ localmarks}%
+ \cs_gset_nopar:Nn \polyglossia@local@marks:n
+ {%
+ \def\xpg@tmp@lang{##1}%
+ \DeclareRobustCommand\markboth[2]{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \unrestored@protected@xdef\@themark
+ {%
+ {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####1}}}%
+ {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####2}}}%
+ }%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi%
+ }%
+ \DeclareRobustCommand\markright[1]{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \expandafter\@markright\@themark
+ {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####1}}}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi%
+ }%
+% This part seems wrong (see #396 for explanation). Remove after a while.
+% \def\@markright####1####2####3{%
+% \@temptokena{\protect\@@ensure@maindir{####1}}%
+% \unrestored@protected@xdef\@themark{%
+% {\the\@temptokena}%
+% {\protect\@@ensure@maindir{####3}}%
+% }%
+% }%
+ }%
+}
+
+
+% Easy way out – Arthur, 2012-08-01
+\ifcsdef{newXeTeXintercharclass}{%
+% to reset the intercharclass of a character to "normal"
+\newXeTeXintercharclass\xpg@normalclass %TODO
+}{}
+
+\ifxetex
+%% when no patterns are available, we use \l@nohyphenation, assigned to 255
+%% (suggestion by Enrico Gregorio)
+ \@ifundefined{l@nohyphenation}{\chardef\l@nohyphenation=255 }{}
+\else\ifluatex
+ \@ifundefined{l@nohyphenation}{\chardef\l@nohyphenation=\directlua{
+ tex.sprint(polyglossia.newloader_loaded_languages.nohyphenation)}\relax
+ }{}
+\fi\fi
+
+%we call this macro when a gloss file is not found for a given language
+\def\xpg@nogloss#1{%
+ \xpg@warning{File~ gloss-#1.ldf~ does~ not~ exist!\MessageBreak
+ I~ will~ nevertheless~ try~ to~ use~ hyphenation~ patterns~ for~ #1.}%
+ \PolyglossiaSetup{#1}{hyphenmins,hyphennames={#1},fontsetup=true}%
+ % the above amounts to:
+ %\ifcsundef{l@#1}%
+ % {\expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}%
+ % {\setlocalhyphenmins{#1}{2}{3}}%
+ %\csdef{#1@language}{\language=\csname l@#1\endcsname}%
+}
+
+\newcommand{\xpg@input}[1]{%
+ % Store catcode of @ before making at letter
+ \chardef\xpg@saved@at@catcode\catcode`\@
+ \makeatletter
+ \input{#1}%
+ % restore former @ catcode
+ \catcode`\@=\xpg@saved@at@catcode%
+}
+
+% try to load a language file
+\cs_new:Nn \polyglossia_load_lang_definition:nn {
+ \file_if_exist:nTF{gloss-#2.ldf}
+ {
+ % Temporarily force catcode of ~ to 13 since babelsh.def
+ % requires it. This is needed particularly with LaTeX3
+ % packages which force \ExplSyntaxOn (#425)
+ \protected\edef\xpg@restore@tilde@catcode{\catcode 126 = \the\catcode 126\relax}
+ \catcode 126 = 13
+ \xpg@input{gloss-#2.ldf}
+ \setkeys{#2}{#1}
+ % restore former ~ catcode
+ \xpg@restore@tilde@catcode
+ }
+ {
+ \xpg@nogloss{#2}
+ }
+}
+
+% load a master language from an alias file
+\newcommand*\xpg@load@master@language[1] {
+ \xpg@input{gloss-#1.ldf}
+ \ifcsundef{#1@loaded}%
+ {
+ \exp_args:Nx\polyglossia@define@language@cmd:n{#1}%
+ }{}
+ \polyglossia@register@language:nn{}{#1}%
+ \csgdef{#1@loaded}{}%
+}
+
+
+% define environment and command
+\cs_new:Nn \polyglossia@define@language@cmd:n {
+ \ifcsundef{#1@alias@lang}{%
+ \exp_args:Ne
+ \newenvironment {\prop_item:Nn{\polyglossia@langsetup}{#1/envname}} [1] []
+ {
+ \begin{otherlanguage}[##1]{#1}
+ }%
+ {
+ \end{otherlanguage}
+ }%
+ \exp_args:Nc \newcommand {text#1} [2][]
+ {%
+ \xpg@textlanguage[##1]{#1}{##2}%
+ }%
+ }{}
+}
+
+% provide way to define alias environment and command
+% \setlanguagealias[<options>]{<language>}{<alias>}
+\DeclareDocumentCommand \setlanguagealias {s O{} m m}
+{
+ % The starred version does not define commands and environments
+ \IfBooleanF {#1}
+ {
+ \ifcsundef{#4@alias@lang}{%
+ \exp_args:Ne
+ \newenvironment {#4}
+ {
+ \begin{otherlanguage}[#2]{#3}
+ }%
+ {
+ \end{otherlanguage}
+ }%
+ \exp_args:Nc \newcommand {text#4} [2][]
+ {%
+ \xpg@textlanguage[#2,##1]{#3}{##2}%
+ }%
+ }{%
+ \exp_args:Ne
+ \renewenvironment {#4}
+ {
+ \begin{otherlanguage}[#2]{#3}
+ }%
+ {
+ \end{otherlanguage}
+ }%
+ \exp_args:Nc \renewcommand {text#4} [2][]
+ {%
+ \xpg@textlanguage[#2,##1]{#3}{##2}%
+ }%
+ }%
+ }%
+ \csgdef{#4@alias@lang}{#3}%
+ \tl_if_blank:nF {#2} {\csgdef{#4@alias@opts}{#2}}%
+}
+
+\cs_new:Nn \polyglossia@register@language:nn {
+ % register polyglossia language name
+ \ifcsundef{#2@registered}{%
+ \global\edef\xpg@loaded{%
+ \ifx\xpg@loaded\@empty\else\xpg@loaded,\fi #2%
+ }%
+ }{}
+ \csgdef{#2@registered}{}%
+ \tl_if_blank:nF {#1}{%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
+ }%
+ % register babelname
+ \def\xpg@tmp@babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ \ifcsundef{\csname xpg@tmp@babelname\endcsname @bbl@registered}{%
+ \global\edef\xpg@bloaded{%
+ \ifx\xpg@bloaded\@empty\else\xpg@bloaded,\fi\xpg@tmp@babelname}%
+ }{}%
+ \csgdef{\csname xpg@tmp@babelname\endcsname @bbl@registered}{}%
+ % register BCP-47 ID
+ \def\xpg@tmp@bcpname{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ \ifcsundef{\csname xpg@tmp@bcpname\endcsname @bcp@registered}{%
+ \global\edef\xpg@bcp@loaded{%
+ \ifx\xpg@bcp@loaded\@empty\else\xpg@bcp@loaded,\fi\xpg@tmp@bcpname}%
+ }{}%
+ \csgdef{\csname xpg@tmp@bcpname\endcsname @bcp@registered}{}%
+}
+
+
+\newcommand{\setdefaultlanguage}[2][]{%
+ \ifcsundef{#2@loaded}%
+ {
+ \polyglossia_load_lang_definition:nn{#1}{#2}
+ % define environment and command (except for internal latex language)
+ \ifstrequal{#2}{latex}{}{%
+ \exp_args:Nx\polyglossia@define@language@cmd:n{#2}
+ }%
+ \csgdef{#2@loaded}{}%
+ }
+ {
+ \relax
+ }
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \polyglossia_load_lang_definition:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ \exp_args:Nxx \polyglossia@set@default@language:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ }{%
+ \polyglossia@set@default@language:nn {#1} {\csuse{#2@alias@lang}}%
+ }%
+ }{%
+ \polyglossia@set@default@language:nn {#1} {#2}%
+ }%
+}
+
+\cs_new:Nn \polyglossia@set@default@language:nn
+{
+ \gdef\xpg@main@language{#2}%
+ \tl_if_blank:nTF {#1}{\gdef\mainlanguagevariant{}}{%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
+ }%
+ \csgdef{#2@gvar}{\mainlanguagevariant}%
+ %% The following settings are for the default language and script
+ % this tells bidi.sty or luabidi.sty that the document is RTL
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/direction}}{RL}{%
+ \str_case_e:nnF{\c_sys_engine_str}{%
+ {luatex}{\setRTLmain}
+ {xetex}{\@RTLmaintrue\setnonlatin}
+ }{}%
+ }{}%
+ \cs_gset_nopar:Nn \polyglossia@AtBeginDocument@selectlanguage: {
+ \selectbackgroundlanguage{#2}
+ \selectlanguage[#1]{#2}%
+ }
+ \xpg@info{Default~ language~ is~ #2}%
+ \polyglossia@set@language@name[#1]{#2}%
+ \def\mainlanguagename{#2}
+ % Store babelname of main language (for external packages such as biblatex)
+ \prop_get:NxNT \polyglossia@langsetup {#2/babelname} \l_tmpa_tl
+ { \edef\mainbabelname{\l_tmpa_tl} }
+ % Store babelname of current language (for external packages such as biblatex)
+ \prop_get:NxNT \polyglossia@langsetup {#2/babelname} \l_tmpa_tl
+ { \edef\babelname{\l_tmpa_tl}%
+ \cs_gset_eq:cc{#2@gbabelname}{babelname}%
+ }
+ % Store BCP-47 id of main language
+ \prop_get:NxNT \polyglossia@langsetup {#2/bcp47} \l_tmpa_tl
+ { \csedef{mainbcp47id}{\l_tmpa_tl} }
+ % Store BCP-47 id of current language
+ \prop_get:NxNT \polyglossia@langsetup {#2/bcp47} \l_tmpa_tl
+ { \csedef{bcp47id}{\l_tmpa_tl}%
+ \cs_gset_eq:cc{#2@gbcp47id}{bcp47id}%
+ }
+ \ifluatex %
+ \directlua{polyglossia.set_default_language('\luatexluaescapestring{\string#2}')}%
+ \fi %
+}
+
+\let\setmainlanguage=\setdefaultlanguage
+
+% Returns the language ID of the current language
+% Currently supported: bcp-47
+\DeclareDocumentCommand \languageid {m}
+{
+ \str_case:nnTF {#1}
+ {
+ {bcp-47} { \csuse{bcp47id} }
+ {bcp47} { \csuse{bcp47id} }
+ }
+ {}
+ {
+ \xpg@error{Invalid~ \string\languageid\space argument:~ #1}
+ }
+}
+
+% Returns the language ID of the main language
+% Currently supported: bcp-47
+\DeclareDocumentCommand \mainlanguageid {m}
+{
+ \str_case:nnTF {#1}
+ {
+ {bcp-47} { \csuse{mainbcp47id} }
+ {bcp47} { \csuse{mainbcp47id} }
+ }
+ {}
+ {
+ \xpg@error{Invalid~ \string\mainlanguageid\space argument:~ #1}
+ }
+}
+
+\def\mainbabelname{}%
+\def\mainlanguagevariant{}%
+% Store main language variant for external packages
+\define@key{xpg@main@langvariant}{variant}{%
+ \gdef\mainlanguagevariant{#1}%
+}
+
+\def\babelname{}%
+\def\languagevariant{}%
+% Store current language variant for external packages
+\define@key{xpg@set@langvariant}{variant}{%
+ \def\languagevariant{#1}%
+}
+
+\newcommand*\polyglossia@set@language@name[2][]{
+ \def\languagename{#2}%
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gvar}{\def\languagevariant{}}{\def\languagevariant{\csuse{#2@gvar}}}
+ }{%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
+ }%
+}
+
+
+\newcommand*{\resetdefaultlanguage}[2][]{%
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \polyglossia@reset@default@language:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ }{%
+ polyglossia@reset@default@language:nn {#1} {\csuse{#2@alias@lang}}%
+ }%
+ }{%
+ polyglossia@reset@default@language:nn {#1} {#2}%
+ }%
+}
+
+\cs_new:Nn \polyglossia@reset@default@language:nn
+{
+ \polyglossia@error@iflangnotloaded:n{#2}
+ % disable globalnumbers of previously defined default language
+ \csuse{no\xpg@main@language @globalnumbers}
+ \csuse{noextras@\xpg@main@language}%
+ % This is a hook for external packages which want to access variants
+ % via babelname (such as biblatex)
+ \cs_if_exist_use:c{noextras@bbl@\mainbabelname}%
+ \csuse{init@noextras@\xpg@main@language}%
+ \polyglossia@set@language@name[#1]{#2}%
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/direction}}{RL}{\@rlmaintrue\@rl@footnotetrue}{}%
+ \selectlanguage[#1]{#2}%
+ \selectbackgroundlanguage{#2}%
+ % Store babelname of current language (for external packages such as biblatex)
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbabelname}{%
+ \edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ }{%
+ \edef\babelname{\csuse{#2@gbabelname}}%
+ }%
+ }{%
+ \edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ }%
+ % Store BCP-47 id of current language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csedef{bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
+}
+
+% This saves the normalfont for the latin script since we may change normalfont in other scripts
+\let\normalfontlatin=\normalfont%
+
+% Provide default fonts (as set with \setmainfont, \setsansfont and \setmonofont)
+% for Latin scripts and as a fallback for non-Latin scripts.
+\DeclareRobustCommand\xpg@defaultfont@rm{%
+ \tl_if_empty:NF{\g__fontspec_nfss_enc_tl}{\fontencoding{\g__fontspec_nfss_enc_tl}}%
+ \fontfamily\rmdefault%
+ \selectfont%
+}
+\DeclareRobustCommand\xpg@defaultfont@sf{%
+ \tl_if_empty:NF{\g__fontspec_nfss_enc_tl}{\fontencoding{\g__fontspec_nfss_enc_tl}}%
+ \fontfamily\sfdefault%
+ \selectfont%
+}
+\DeclareRobustCommand\xpg@defaultfont@tt{%
+ \tl_if_empty:NF{\g__fontspec_nfss_enc_tl}{\fontencoding{\g__fontspec_nfss_enc_tl}}%
+ \fontfamily\ttdefault%
+ \selectfont%
+}
+
+\def\xpg@patch@fontfamilies{%
+ % This robustifies the redefinitions of \<xx>family (suggestion by Enrico Gregorio)
+ % e.g. to prevent expansion of the \familytype redefinition in auxiliary files
+ \csgappto{rmfamily~}{\def\familytype{rm}}
+ \csgappto{sffamily~}{\def\familytype{sf}}
+ \csgappto{ttfamily~}{\def\familytype{tt}}
+}
+
+% These switches activate the default fonts
+% Note that a simple \let\rmfamilylatin=\rmfamily
+% does not work reliably (see #24)
+\cs_gset_eq:cc{rmfamilylatin}{xpg@defaultfont@rm}%
+\cs_gset_eq:cc{sffamilylatin}{xpg@defaultfont@sf}%
+\cs_gset_eq:cc{ttfamilylatin}{xpg@defaultfont@tt}%
+
+\def\xpg@set@familydefault{%
+ % We need the \edef route here in order
+ % to detect both \renewcommand and \let
+ % changes.
+ \edef\tempa{\familydefault}%
+ \edef\tempb{\sfdefault}%
+ \ifcsequal{tempa}{tempb}%
+ {\def\familytype{sf}}
+ {\edef\tempb{\ttdefault}%
+ \ifcsequal{tempa}{tempb}%
+ {\def\familytype{tt}}
+ {\def\familytype{rm}}}
+ \xpg@patch@fontfamilies%
+ % This (re-)saves the normalfont for the latin script since we may
+ % change normalfont in other scripts
+ \let\normalfontlatin=\normalfont%
+ % And for all cases, we also reset \<xx>familylatin
+ \cs_gset_eq:cc{rmfamilylatin}{xpg@defaultfont@rm}%
+ \cs_gset_eq:cc{sffamilylatin}{xpg@defaultfont@sf}%
+ \cs_gset_eq:cc{ttfamilylatin}{xpg@defaultfont@tt}%
+}
+
+\def\resetfontlatin{%
+ \DeclareRobustCommand\rmfamily{\xpg@defaultfont@rm}%
+ \DeclareRobustCommand\sffamily{\xpg@defaultfont@sf}%
+ \DeclareRobustCommand\ttfamily{\xpg@defaultfont@tt}%
+ \xpg@patch@fontfamilies%
+ \global\let\normalfont=\normalfontlatin%
+}
+
+\def\selectfontfamilylatin{%
+ \def\tmp@tt{tt}\def\tmp@sf{sf}%
+ \ifx\familytype\tmp@tt%
+ \ttfamilylatin%
+ \else\ifx\familytype\tmp@sf%
+ \sffamilylatin%
+ \else\rmfamilylatin\fi\fi}
+
+\def\xpg@select@fontfamily#1{%
+ \def\tmp@tt{tt}\def\tmp@sf{sf}%
+ \ifx\familytype\tmp@tt
+ \csuse@warn{#1@font@tt}%
+ \else\ifx\familytype\tmp@sf
+ \csuse@warn{#1@font@sf}%
+ \else\csuse@warn{#1@font@rm}\fi\fi}
+
+\def\xpg@set@normalfont#1{%
+ \DeclareRobustCommand\rmfamily{\csuse{#1@font@rm}}%
+ \DeclareRobustCommand\sffamily{\csuse{#1@font@sf}}%
+ \DeclareRobustCommand\ttfamily{\csuse{#1@font@tt}}%
+ \gdef\normalfont{\protect\xpg@select@fontfamily{#1}%
+ \fontseries{\seriesdefault}\selectfont%
+ \fontshape{\shapedefault}\selectfont}%
+ \gdef\reset@font{\protect\normalfont}%
+}
+
+\let\@@fterindentfalse\@afterindentfalse
+\def\french@indent{%
+ \let\@afterindentfalse\@afterindenttrue
+ \@afterindenttrue%
+}
+\def\nofrench@indent{%
+ \let\@afterindentfalse\@@fterindentfalse
+ \@afterindentfalse%
+}
+
+\newcommand*{\selectbackgroundlanguage}[1]{%
+ \ifcsdef{#1@alias@lang}{%
+ \polyglossia@select@background@language:n {\csuse{#1@alias@lang}}%
+ }{%
+ \polyglossia@select@background@language:n {#1}%
+ }%
+}
+
+\cs_new:Nn \polyglossia@select@background@language:n
+{
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/lcscript}}{latin}
+ {}
+ {\xpg@set@normalfont{#1}}%
+ \csuse{#1@globalnumbers}%
+}
+
+\newcommand{\setotherlanguage}[2][]{%
+ \ifcsundef{#2@loaded}
+ {
+ \polyglossia_load_lang_definition:nn{#1}{#2}
+ % define environment and command
+ \exp_args:Nx\polyglossia@define@language@cmd:n{#2}
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \polyglossia_load_lang_definition:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ \exp_args:Nxx \polyglossia@set@other@language:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ }{%
+ \polyglossia@set@other@language:nn {#1} {\csuse{#2@alias@lang}}%
+ }%
+ }{%
+ \polyglossia@set@other@language:nn {#1} {#2}%
+ }%
+ \csgdef{#2@loaded}{}%
+ }
+ {}
+}
+
+\cs_new:Nn \polyglossia@set@other@language:nn
+{
+ \polyglossia@register@language:nn{#1}{#2}%
+ % If a variant is set, store it.
+ \gdef\otherlanguagevariant{}
+ \tl_if_blank:nTF {#1}{}{%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#2} {#1}%
+ }%
+ \csgdef{#2@gvar}{\otherlanguagevariant}%
+ \prop_get:NxNT \polyglossia@langsetup {#2/babelname} \l_tmpa_tl
+ { \xdef\otherlanguagebabelname{\l_tmpa_tl} }
+ \cs_gset_eq:cc{#2@gbabelname}{otherlanguagebabelname}%
+}
+
+% Store main language variant for external packages
+\define@key{xpg@other@langvariant}{variant}{%
+ \gdef\otherlanguagevariant{#1}%
+}
+
+\newcommand\setotherlanguages[1]{%
+ \def\do##1{\setotherlanguage{##1}}%
+ \exp_args:Nx\docsvlist{#1}}%
+
+\def\common@language{% FIXME is this really needed???
+ \ifbool{xpg@hyphenation@disabled}{%
+ \xdef\xpg@lastlanguage{\z@}%
+ }{%
+ \language=\z@
+ }%
+ \lefthyphenmin=\tw@
+ \righthyphenmin=\thr@@}
+
+\def\xpg@initial@setup{%
+ \common@language%
+}
+
+
+% Alias to \text<lang>, but more suitable
+% for specific (esp. tag-based) aliases
+% where \text<alias> would cause clashes
+% (e.g., \textit)
+\newcommand\textlang[3][]{%
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \xpg@textlanguage[\csuse{#2@alias@opts},#1]{\csuse{#2@alias@lang}}{#3}%
+ }{%
+ \xpg@textlanguage[#1]{\csuse{#2@alias@lang}}{#3}%
+ }%
+ }{%
+ \xpg@textlanguage[#1]{#2}{#3}%
+ }%
+}%
+
+% Alias to {<lang>}, but more suitable
+% for specific (esp. tag-based) aliases
+% where {<alias>} would cause clashes
+% (e.g., \fi)
+\newenvironment{lang}[2][]{%
+ \begin{otherlanguage}[#1]{#2}%
+}{%
+ \end{otherlanguage}
+}%
+
+\providecommand{\foreignlanguage}{}
+
+% wrapper for foreignlanguage and otherlanguage*
+\newcommand*\polyglossia@setforeignlanguage[2][]{
+ \select@@language[#1]{#2}
+ \polyglossia@register@language:nn{#1}{#2}%
+ % Store babelname of current language (for external packages such as biblatex)
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbabelname}{%
+ \edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ }{%
+ \edef\babelname{\csuse{#2@gbabelname}}%
+ }%
+ }{%
+ \edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ }%
+ % Store BCP-47 id of current language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csedef{bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
+}
+
+% joint code of \foreignlanguage, otherlanguage*
+% and \text<lang>
+\newcommand{\xpg@otherlanguage}[2][]
+{%
+ \polyglossia@error@iflangnotloaded:n{#2}
+ \exp_args:Nne \setkeys{#2}{#1}%
+ \polyglossia@setforeignlanguage[#1]{#2}
+ % Hook for external packages such as biblatex
+ \polyglossia@language@switched%
+ % buggy restoration heure
+ \csuse{inlineextras@#2}%
+ % This is a hook for external packages which want to access variants
+ % via babelname (such as biblatex)
+ \cs_if_exist_use:c{inlineextras@bbl@\babelname}%
+}
+
+\renewcommand{\foreignlanguage}[3][]
+{%
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \polyglossia@foreignlanguage:nnn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}} {#3}%
+ }{%
+ \polyglossia@foreignlanguage:nnn {#1} {\csuse{#2@alias@lang}} {#3}%
+ }%
+ }{%
+ \polyglossia@foreignlanguage:nnn {#1} {#2} {#3}%
+ }%
+}
+
+\cs_new:Nn \polyglossia@foreignlanguage:nnn
+{
+ \polyglossia@error@iflangnotloaded:n{#2}
+ \bgroup
+ \xpg@otherlanguage[#1]{#2}%
+ \polyglossia@lang@settextdirection:nn{#2}{#3}%
+ \egroup
+}
+
+% otherlanguage* is the environment equivalent of \foreignlanguage
+\expandafter\providecommand\csname otherlanguage*\endcsname{}
+
+\renewenvironment{otherlanguage*}[2][]
+{%
+ \ifcsdef{#2@alias@lang}{%
+ \ifcsdef{#2@alias@opts}{%
+ \exp_args:Nxx \polyglossia@otherlanguage:nn {\csuse{#2@alias@opts},#1} {\csuse{#2@alias@lang}}%
+ }{%
+ \polyglossia@otherlanguage:nn {#1} {\csuse{#2@alias@lang}}%
+ }%
+ }{%
+ \polyglossia@otherlanguage:nn {#1} {#2}%
+ }%
+}
+{\egroup}
+
+\cs_new:Nn \polyglossia@otherlanguage:nn
+{
+ \xpg@otherlanguage[#1]{#2}%
+ \polyglossia@lang@settextdirection:nn{#2}\bgroup%
+}
+
+% use by \text<lang> and \textlang. Equivalent to \foreignlanguage,
+% except that dates are localized.
+\newcommand\xpg@textlanguage[3][]{%
+ \polyglossia@error@iflangnotloaded:n{#2}
+ \bgroup
+ \xpg@otherlanguage[#1]{#2}%
+ \csuse{date#2}%
+ % This is a hook for external packages which want to access variants
+ % via babelname (such as biblatex)
+ \cs_if_exist_use:c{date@bbl@\babelname}%
+ \polyglossia@lang@settextdirection:nn{#2}{#3}%
+ \egroup
+ % Reset the language's/script's font families
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/lcscript}}{latin}{}{\resetfontlatin}%
+}
+
+
+% Define language-specific hyphenation exceptions
+\newcommand\pghyphenation[3][]{
+ \bgroup
+ \polyglossia@error@iflangnotloaded:n{#2}
+ \setkeys{#2}{#1}%
+ \select@@language[#1]{#2}%
+ \hyphenation{#3}%
+ \egroup
+}
+
+
+% Hook that other package authors can use
+% (for instance biblatex):
+\newcommand*{\xpg@hook@setlanguage}{}
+
+\def\xpg@pop@language@i#1#2{%
+ \xpg@set@language@aux[#1]{#2}%
+ \xpg@hook@setlanguage
+ \let\emp@langname\@undefined}
+
+\DeclareDocumentCommand \selectlanguage {s O{} m}
+{%
+ \ifcsdef{#3@alias@lang}{%
+ \ifcsdef{#3@alias@opts}{%
+ \exp_args:Nxx \polyglossia@select@language:nnn {#1} {\csuse{#3@alias@opts},#2} {\csuse{#3@alias@lang}}%
+ }{%
+ \polyglossia@select@language:nnn {#1} {#2} {\csuse{#3@alias@lang}}%
+ }%
+ }{%
+ \polyglossia@error@iflangnotloaded:n{#3}%
+ \polyglossia@select@language:nnn {#1} {#2} {#3}%
+ }
+}
+
+\cs_new:Nn \polyglossia@select@language:nnn
+{
+ \IfBooleanF {#1}
+ {
+ \cs_set_nopar:Npx \xpg@pop@language { \exp_not:N \xpg@pop@language@i {#2} {#3} }
+ \group_insert_after:N \xpg@pop@language
+ }
+ \tl_if_blank:nTF {#2}{}{%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {#3} {#2}%
+ }%
+ % The starred variant does not write to the aux
+ \IfBooleanTF#1{%
+ \xpg@set@language@nonaux[#2]{#3}%
+ }{%
+ \xpg@set@language@aux[#2]{#3}%
+ }%
+ \ifluatex%
+ \directlua{polyglossia.select_language('\luatexluaescapestring{\string#3}',
+ \the\csname l@#3\endcsname)}%
+ \fi%
+ \polyglossia@register@language:nn{#2}{#3}%
+}
+
+
+\cs_new:Nn \polyglossia@set@lang@options:nn
+{
+ % If the optional argument sets a value for the key “variant”, copy it to xpg@langvariant
+ \clist_map_inline:nn { #2 } {%
+ \xpg@parsevariantkeyvalue##1=@xpg@langvariant:#1\relax
+ }%
+ \exp_args:Nne \setkeys{#1}{#2}%
+}
+
+% Initialize default language options, so that
+% \iflanguageoption has the info it needs also
+% for default settings
+\newcommand*\xpg@initialize@gloss@options[2]{%
+ \polyglossia@set@lang@options:nn {#1} {#2}%
+}
+
+% Record synonymous keyvals such as variant=us and variant=american
+% Syntax: \xpg@set@alias@values{<lang>}{<key>}{<val>}{<alias vals, comma-separated>}
+\newcommand*\xpg@set@alias@values[4]{%
+ \prop_if_exist:cF { xpg@alias@keyvals@#1@#3 }
+ { \prop_new:c {xpg@alias@keyvals@#1@#3} }
+ \prop_put:cnn { xpg@alias@keyvals@#1@#3 }
+ {#2}{#4}
+ \prop_put:cnn { xpg@alias@keyvals@#1@#4 }
+ {#2}{#3}
+}
+
+% Patch xkeyval to record default values of keys
+\pretocmd{\XKV@define@default}{%
+ \csgdef{xpg@default@opt@\XKV@header #1}{#2}%
+}{}{\xpg@warning{Patching xkeyval failed!}}
+
+% Helper to get and register option keyvals
+\def\xpg@parsevariantkeyvalue#1=#2@#3:#4\relax{%
+ \def\@tmpa{#1}
+ \def\@tmpb{variant}
+ % variant values are stored in specific macros
+ % (\xpg@main@langvariant, \xpg@other@langvariant
+ % and \xpg@set@langvariant)
+ \ifx\@tmpa\@tmpb\setkeys{#3}{#1=#2}\fi
+ \tl_if_empty:nTF{#2}
+ {
+ \ifcsdef{xpg@default@opt@KV@#4@#1}%
+ {\xpg@store@opt@keyval#1:\csuse{xpg@default@opt@KV@#4@#1}=:#4\relax}%
+ {}%
+ }
+ { \xpg@store@opt@keyval#1:#2:#4\relax }
+}%
+
+% Store option keys and values
+% This strips trailing '=' from values.
+\def\xpg@store@opt@keyval#1:#2=:#3\relax{%
+ \prop_if_exist:cF { xpg@current@options@#3 }
+ { \prop_new:c {xpg@current@options@#3} }
+ \prop_put:cnn { xpg@current@options@#3 }
+ {#1}{#2}
+}
+
+
+\prg_set_conditional:Npnn \polyglossia@check@option@value:NNN #1#2#3 { p , T , F , TF }
+{
+ \prop_get:cnNTF {xpg@current@options@#1} {#2} \l_tmpa_tl
+ {
+ \exp_args:Nee \str_if_eq:NNTF{\l_tmpa_tl}{#3}
+ {\prg_return_true:}
+ {
+ \prop_get:cnNTF {xpg@alias@keyvals@#1@#3} {#2} \l_tmpb_tl
+ {
+ \exp_args:Nne \clist_set:Nn{\l_tmpa_clist}{\l_tmpb_tl}
+ \providetoggle{xpgvalfound}
+ \togglefalse{xpgvalfound}
+ \clist_map_inline:Nn \l_tmpa_clist {
+ \exp_args:Nee \str_if_eq:NNT{##1}{\l_tmpa_tl}
+ { \toggletrue{xpgvalfound} }
+ }
+ \iftoggle{xpgvalfound}{\prg_return_true:}{\prg_return_false:}
+ }
+ {
+ \prg_return_false:
+ }
+ }
+ }
+ {
+ \prg_return_false:
+ }
+}
+
+% Test if option value is set
+\newcommand*\iflanguageoption[5]{%
+ \polyglossia@check@option@value:NNNTF{#1}{#2}{#3}{#4}{#5}%
+}
+
+
+% Append any variant to csv list of variants
+\define@key{xpg@langvariant}{variant}{%
+ \edef\xpg@vloaded{#1\ifx\xpg@vloaded\@empty\else,\xpg@vloaded\fi}%
+}
+
+\prg_set_conditional:Npnn \polyglossia@check@if@lang@loaded:N #1 { p , T , F , TF }{
+ \cs_if_exist:cTF{#1}{
+ \prg_return_true:
+ }{
+ \prg_return_false:
+ }
+}
+
+% Test if language is loaded
+\newcommand*\iflanguageloaded[3]{%
+ \polyglossia@check@if@lang@loaded:NTF{#1@loaded}{#2}{#3}%
+}
+
+% Same for babellanguage is loaded
+\newcommand*\ifbabellanguageloaded[3]{%
+ \polyglossia@check@if@lang@loaded:NTF{#1@bbl@loaded}{#2}{#3}%
+}
+
+% Same for languageid
+\DeclareDocumentCommand \iflanguageidloaded {mmmm}
+{
+ \str_case:nnTF {#1}
+ {
+ {bcp-47} { \polyglossia@check@if@lang@loaded:NTF{#2@bcp@loaded}{#3}{#4} }
+ {bcp47} { \polyglossia@check@if@lang@loaded:NTF{#2@bcp@loaded}{#3}{#4} }
+ }
+ {}
+ {
+ \xpg@error{Invalid~ \string\iflanguageidloaded\space argument:~ #1}
+ }
+}
+
+% Check if the current font has a given glyph
+\prg_set_conditional:Npnn \polyglossia@check@if@char@available:N #1 { p , T , F , TF }
+{
+ \str_case_e:nnF{\c_sys_engine_str}{
+ {luatex}{
+ \int_compare:nNnTF { \directlua{polyglossia.check_char(0x#1)} } > { 0 }
+ {\prg_return_true:}
+ {\prg_return_false:}
+ }
+ {xetex}{
+ \int_compare:nNnTF { \the\XeTeXcharglyph"#1 } > { 0 }
+ {\prg_return_true:}
+ {\prg_return_false:}
+ }
+ }
+ {
+ \xpg@warning{You’re running a TeX engine that is not LuaTeX or XeTeX.\MessageBreak
+ That is almost guaranteed to cause problems.}
+ }
+}
+
+% Test if a char (by char code) is available in the current font
+\newcommand*\xpg@if@char@available[3]{%
+ \polyglossia@check@if@char@available:NTF{#1}{#2}{#3}%
+}
+
+\newcommand*\charifavailable[2]{%
+ \xpg@if@char@available{#1}{\char"#1}{#2}%
+}
+
+
+\newcommand*{\xpg@set@language@nonaux}[2][]{%
+ \@select@language[#1]{#2}%
+}
+
+
+\newcommand*{\xpg@set@language@aux}[2][]{%
+ % Store babelname of current language (for external packages such as biblatex)
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbabelname}{%
+ \edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ }{%
+ \edef\babelname{\csuse{#2@gbabelname}}%
+ }%
+ }{%
+ \edef\babelname{\prop_item:Nn{\polyglossia@langsetup}{#2/babelname}}%
+ }%
+ % Store BCP-47 id of current language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csedef{bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
+ \@select@language[#1]{#2}%
+ % Write to the aux
+ \if@filesw%
+ \ifx#1\\\\%
+ \protected@write\@auxout{}{\protect\selectlanguage*{#2}}%
+ \addtocontents{toc}{\protect\selectlanguage*{#2}}%
+ \addtocontents{lof}{\protect\selectlanguage*{#2}}%
+ \addtocontents{lot}{\protect\selectlanguage*{#2}}%
+ \else
+ \protected@write\@auxout{}{\protect\selectlanguage*[#1]{#2}}%
+ \addtocontents{toc}{\protect\selectlanguage*[#1]{#2}}%
+ \addtocontents{lof}{\protect\selectlanguage*[#1]{#2}}%
+ \addtocontents{lot}{\protect\selectlanguage*[#1]{#2}}%
+ \fi
+ \fi
+}
+
+% The bidi package swaps the output stream within RTL tables
+% (to get the column order right). This also swaps group
+% delimiters inserted to the aux files via otherlanguage (see #354).
+% We therefore patch bidi and insert a bool that tells us
+% whether we are in such a table.
+\newbool{xpg@inbiditable}
+\AtBeginDocument{%
+ \@ifpackageloaded{bidi}{%
+ \patchcmd{\@tabular}%
+ {\if@RTLtab}%
+ {\if@RTLtab\booltrue{xpg@inbiditable}}%
+ {}% success
+ {\xpg@warning{Patching bidi table failed!}}%
+ }{}%
+}
+
+% Open a group in the aux file. This is to keep
+% nested language options local (see #320).
+% In bidi tables, the opening/closing needs to be swapped (see #354)
+\newcommand*{\xpg@set@group@aux}{%
+ \if@filesw%
+ \ifbool{xpg@inbiditable}{%
+ \protected@write\@auxout{}{\egroup}%
+ \addtocontents{toc}{\egroup}%
+ \addtocontents{lof}{\egroup}%
+ \addtocontents{lot}{\egroup}%
+ }{%
+ \protected@write\@auxout{}{\bgroup}%
+ \addtocontents{toc}{\bgroup}%
+ \addtocontents{lof}{\bgroup}%
+ \addtocontents{lot}{\bgroup}%
+ }%
+ \fi
+}
+
+% Close the group in the aux file.
+% In bidi RTL tables, the opening/closing needs
+% to be swapped (see #354).
+\newcommand*{\xpg@unset@group@aux}{%
+ \if@filesw%
+ \ifbool{xpg@inbiditable}{%
+ \protected@write\@auxout{}{\bgroup}%
+ \addtocontents{toc}{\bgroup}%
+ \addtocontents{lof}{\bgroup}%
+ \addtocontents{lot}{\bgroup}%
+ }{%
+ \protected@write\@auxout{}{\egroup}%
+ \addtocontents{toc}{\egroup}%
+ \addtocontents{lof}{\egroup}%
+ \addtocontents{lot}{\egroup}%
+ }%
+ \fi
+}
+
+\prg_set_conditional:Npnn \polyglossia@check@ifdefined:N #1 { p , T , F , TF }{
+ \cs_if_exist:cTF {l@#1}
+ {
+ \cs_if_eq:cNTF {l@#1} \l@nohyphenation
+ {
+ \prg_return_false:
+ }
+ {
+ % it's possible that sometimes \csname l@#1\endcsname becomes \relax
+ \cs_if_eq:cNTF {l@#1} \relax
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+ }
+ {
+ \prg_return_false:
+ }
+}
+
+\def\polyglossia@luatex@load@lang#1{%
+ % if \l@#1 is not properly defined, call lua function newloader(#1),
+ % and assign the returned number to \l@#1
+ \polyglossia@check@ifdefined:NF {#1}
+ {
+ \expandafter\chardef\csname l@#1\endcsname=
+ \directlua{ tex.sprint(polyglossia.newloader'#1') }\relax
+ }
+}
+
+% This check is also used by biblatex, so don't
+% rename silently.
+\newcommand\xpg@ifdefined[3]{%
+ % With luatex, we first need to define \l@#1.
+ \ifluatex
+ \polyglossia@luatex@load@lang{#1}%
+ \fi
+ \polyglossia@check@ifdefined:NTF{#1}{#2}{#3}%
+}%
+
+% Set \bbl@hyphendata@\the\language, which is (lua)babel's
+% hyphenation pattern hook
+% FIXME Clarifiy why/when this is needed.
+\newcommand*\xpg@set@bbl@hyphendata[1]{%
+ \ifluatex%
+ \ifcsdef{bbl@hyphendata@#1}{}{%
+ \global\@namedef{bbl@hyphendata@\the\language}{}%
+ }%
+ \fi%
+}
+
+% Set hyphenation patterns for a given language. This does the right
+% thing both for XeTeX and LuaTeX
+\newcommand*\xpg@set@hyphenation@patterns[1]{%
+ \ifluatex
+ \polyglossia@luatex@load@lang{#1}%
+ \language=\csname l@#1\endcsname
+ \else
+ \ifxetex
+ \language=\csname l@#1\endcsname
+ \else
+ \xpg@warning{You’re~running~a~TeX~engine~that~is~not~LuaTeX~or~XeTeX.\MessageBreak
+ That~is~almost~guaranteed~to~cause~problems.}%
+ \fi
+ \fi
+}
+
+
+\newcommand*\@select@language[2][]{
+ % hook for compatibility with biblatex
+ \select@language{#2}
+ \xpg@set@bbl@hyphendata{\the\language}
+ \xpg@initial@setup%
+ \select@@language[#1]{#2}%
+ % Hook for external packages such as biblatex
+ \polyglossia@language@switched%
+ \polyglossia@lang@setpardirection:n{#2}%
+ \csuse{captions#2}%
+ \csuse{date#2}%
+ % These are hooks for external packages which want to access variants
+ % via babelname (such as biblatex)
+ \cs_if_exist_use:c{captions@bbl@\babelname}%
+ \cs_if_exist_use:c{date@bbl@\babelname}%
+ \polyglossia@local@marks:n{#2}%
+ \csuse{init@extras@#2}%
+ \polyglossia@lang@indentfirst:n{#2}%
+ \csuse{blockextras@#2}%
+ % This is a hook for external packages which want to access variants
+ % via babelname (such as biblatex)
+ \cs_if_exist_use:c{blockextras@bbl@\babelname}%
+ }
+
+% hook for compatibility with biblatex
+% (probably no longer used due to the
+% more general hook that follows, but
+% we keep it for backwards comp.)
+\def\select@language#1{}
+
+% Hook for external packages such as biblatex
+\def\polyglossia@language@switched{}
+
+\def\noextrascurrent#1{%
+ \csuse{noextras@#1}%
+ % This is a hook for external packages which want to access variants
+ % via babelname (such as biblatex)
+ \cs_if_exist_use:c{noextras@bbl@\babelname}
+}
+
+% Common code for `\select@language' and `\foreignlanguage'.
+\newcommand{\select@@language}[2][]{%
+ % disable the extras and number settings of the previous language
+ \ifcsundef{languagename}{}{%
+ \noextrascurrent{\languagename}%
+ \csuse{no\languagename @numbers}%
+ \ifxetex
+ \str_if_eq:eeTF{\exp_args:Nne\prop_item:Nn{\polyglossia@langsetup}{\languagename/direction}}{RL}%
+ {%
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/direction}}{RL}%
+ {}% RTL -> RTL
+ {\setlatin}% RTL -> LTR
+ }{%
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/direction}}{RL}%
+ {\setnonlatin}% LTR -> RTL
+ {}% LTR -> LTR
+ }%
+ \fi
+ }%
+ \polyglossia@set@language@name[#1]{#2}%
+ % Set the language's/script's font families
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#2/lcscript}}{latin}{\resetfontlatin}{\xpg@set@normalfont{#2}}%
+ \xpg@select@fontfamily{#2}%
+ \csuse@warn{#2@language}%
+ \csuse{#2@numbers}%
+ \use@localhyphenmins[#1]{#2}%
+ \polyglossia@lang@frenchspacing:n{#2}
+}
+
+
+\let\xpg@pop@language\relax
+
+\provideenvironment{otherlanguage}{}{}
+
+\newbool{xpg@noset@groups}
+\renewenvironment{otherlanguage}[2][]
+{%
+ % We usually embrace the switch in groups to keep the changes local.
+ % We cannot do this if an LTR environmet starts in an RTL paragraph,
+ % as bidi interferes here badly with its directionality smartness.
+ \ifxetex
+ \str_if_eq:eeT{\exp_args:Nne\prop_item:Nn{\polyglossia@langsetup}{\languagename/direction}}{RL}%
+ {%
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/direction}}{RL}%
+ {}% RTL -> RTL
+ {\ifvmode\else\booltrue{xpg@noset@groups}\fi}% RTL -> LTR
+ }%
+ \fi%
+ \ifbool{xpg@noset@groups}{}{\xpg@set@group@aux}%
+ \selectlanguage[#1]{#2}%
+}
+{\ifbool{xpg@noset@groups}{}{\xpg@unset@group@aux}}
+
+\newcommand{\setlocalhyphenmins}[3]{%
+ \xpg@ifdefined{#1}{%
+ \expandafter\ifx\csname l@#1\endcsname\l@nohyphenation%
+ \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unhyphenated~ language~ #1}%
+ \else
+ \providehyphenmins{#1}{#2#3}%
+ \fi
+ }{%
+ \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unknown~ language~ #1}%
+ }%
+}%
+
+% \setlanghyphenmins[options]{lang}{l}{r}
+\newcommand*\setlanghyphenmins[4][]{%
+ % Check for real language name and options
+ \edef\xpg@tmp@lang{#2}%
+ \edef\xpg@tmp@opts{#1}%
+ \ifcsdef{#2@alias@lang}{%
+ \edef\xpg@tmp@lang{\csuse{#2@alias@lang}}%
+ \ifcsdef{#2@alias@opts}{%
+ \edef\xpg@tmp@opts{\csuse{#2@alias@opts},#1}%
+ }{}%
+ }{}%
+ \bgroup
+ \polyglossia@error@iflangnotloaded:n{\xpg@tmp@lang}
+ \exp_args:Nne \setkeys{\xpg@tmp@lang}{\xpg@tmp@opts}%
+ % Store BCP-47 id of language
+ \tl_if_blank:nTF {\xpg@tmp@opts}{%
+ \ifcsundef{\csname xpg@tmp@lang\endcsname @gbcp47id}{%
+ \csedef{tmp@bcp47id}{\exp_args:Nne\prop_item:Nn{\polyglossia@langsetup}{\xpg@tmp@lang /bcp47}}%
+ }{%
+ \csedef{tmp@bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csedef{tmp@bcp47id}{\exp_args:Nne \prop_item:Nn{\polyglossia@langsetup}{\xpg@tmp@lang /bcp47}}%
+ }%
+ \xpg@warning{id: \csuse{tmp@bcp47id}}%
+ \csgdef{\csname tmp@bcp47id\endcsname @hyphenmins}{{#3}{#4}}%
+ \egroup
+}
+
+% \use@localhypenmins[options]{lang}
+\newcommand*\use@localhyphenmins[2][]{%
+ \bgroup
+ \polyglossia@error@iflangnotloaded:n{#2}
+ \setkeys{#2}{#1}%
+ % Store BCP-47 id of language
+ \tl_if_blank:nTF {#1}{%
+ \ifcsundef{#2@gbcp47id}{%
+ \csxdef{tmp@bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }{%
+ \csxdef{tmp@bcp47id}{\csuse{#2@gbcp47id}}%
+ }%
+ }{%
+ \csxdef{tmp@bcp47id}{\prop_item:Nn{\polyglossia@langsetup}{#2/bcp47}}%
+ }%
+ \egroup
+ \ifcsundef{\csname tmp@bcp47id\endcsname @hyphenmins}{%
+ \ifcsundef{#2hyphenmins}{}%
+ {%
+ \expandafter\expandafter\expandafter\set@hyphenmins\csname #2hyphenmins\endcsname\relax%
+ }
+ }{%
+ \edef\tmpa{\csuse{\csname tmp@bcp47id\endcsname @hyphenmins}}%
+ \expandafter\expandafter\expandafter\set@hyphenmins\tmpa\relax%
+ }
+ \ifluatex
+ % Set \totalhyphenmin if specified
+ \prop_get:NxNTF \polyglossia@langsetup {#2/totalhyphenmin} \l_tmpa_tl
+ {
+ \xpg@warning{totalhyphenmin: '\l_tmpa_tl'}
+ \expandafter\hyphenationmin \l_tmpa_tl%
+ }%
+ {}%
+ \fi
+}
+
+% Babel previously compiled in hyphenrules into the kernel (via hyphen.cfg)
+% but this is no longer the case. In any case, we roll our own one now
+% and possibly overwrite babel's.
+\provideenvironment{hyphenrules}{}{}
+
+% As opposed to the one inherited from switch.def/babel, our environment
+% supports language options and aliases.
+\renewenvironment{hyphenrules}[2][]
+{%
+ % We usually embrace the switch in groups to keep the changes local.
+ % We cannot do this if an LTR environmet starts in an RTL paragraph,
+ % as bidi interferes here badly with its directionality smartness.
+ \ifxetex
+ \str_if_eq:eeT{\exp_args:Nne\prop_item:Nn{\polyglossia@langsetup}{\languagename/direction}}{RL}%
+ {%
+ \str_if_eq:eeTF{\prop_item:Nn{\polyglossia@langsetup}{#1/direction}}{RL}%
+ {}% RTL -> RTL
+ {\ifvmode\else\booltrue{xpg@noset@groups}\fi}% RTL -> LTR
+ }%
+ \fi%
+ \ifbool{xpg@noset@groups}{}{\xpg@set@group@aux}%
+ % Check for real language name and options
+ \edef\xpg@tmp@lang{#2}%
+ \edef\xpg@tmp@opts{#1}%
+ \ifcsdef{#2@alias@lang}{%
+ \edef\xpg@tmp@lang{\csuse{#2@alias@lang}}%
+ \ifcsdef{#2@alias@opts}{%
+ \edef\xpg@tmp@opts{\csuse{#2@alias@opts},#1}%
+ }{}%
+ }{}%
+ \tl_if_blank:nF {\xpg@tmp@opts}{%
+ % Register the language options
+ \polyglossia@set@lang@options:nn {\xpg@tmp@lang} {\xpg@tmp@opts}%
+ }%
+ % Now switch patterns
+ \csuse@warn{\csuse{xpg@tmp@lang}@language}%
+ % And activate hyphenmins
+ \use@localhyphenmins[\xpg@tmp@opts]{\xpg@tmp@lang}%
+}
+{\ifbool{xpg@noset@groups}{}{\xpg@unset@group@aux}}
+
+\AtEndPreamble{%
+ \@ifpackageloaded{bidi}{%
+ \providecommand*{\aemph}[1]{$\overline{\hboxR{#1}}$}%
+ }{}%
+ \@ifpackageloaded{luabidi}{%
+ \providecommand*{\aemph}[1]{$\overline{\hbox{\RL{#1}}}$}%
+ }{}%
+}
+
+
+% keys for main package
+\keys_define:nn { polyglossia } {
+ verbose
+ .bool_set:N = \l_polyglossia_verbose_bool,
+ verbose
+ .default:n = true,
+ % compatibility
+ quiet
+ .meta:n = { verbose = false },
+
+ localmarks
+ .bool_set:N = \l_polyglossia_localmarks_bool,
+ localmarks
+ .default:n = true,
+ % compatibility
+ nolocalmarks
+ .meta:n = { localmarks = false },
+
+ babelshorthands
+ .bool_set:N = \l_polyglossia_babelshorthands_bool,
+ babelshorthands
+ .default:n = true,
+
+ luatexrenderer
+ .cs_set:Np = \l_polyglossia_luatex_renderer,
+ luatexrenderer
+ .value_required:n = true,
+}
+
+\keys_set:nn { polyglossia } {
+ localmarks = false,
+ verbose = true,
+ babelshorthands = false,
+ luatexrenderer = Harfbuzz
+}
+
+% load by default latex
+\setmainlanguage{latex}
+% then process key in order to overwrite
+\ProcessKeysOptions{polyglossia}
+
+% Set the LuaTeX renderer. As opposed to fontspec, we use Harfbuzz by default.
+% This can be changed via the luatexrenderer package option.
+\ifluatex
+ \exp_args:Nee \str_if_eq:nnF{\l_polyglossia_luatex_renderer}{none}
+ {
+ \xpg@info{Setting~ LuaTeX~ font~ renderer~ to~ \l_polyglossia_luatex_renderer}
+ \exp_args:Nee \defaultfontfeatures{Renderer=\l_polyglossia_luatex_renderer}
+ }
+\fi
+
+\bool_if:nTF \l_polyglossia_verbose_bool {} {
+ \gdef\@latex@info#1{\relax}% no latex info
+ \gdef\@font@info#1{\relax}% no latex font info
+ \gdef\@font@warning#1{\relax}% no latex font warnings
+ \gdef\zf@PackageInfo#1{\relax}% no fontspec info
+ \gdef\xpg@info#1{\relax}% no polyglossia info
+}
+
+\bool_if:nTF \l_polyglossia_localmarks_bool {
+ \polyglossia@enable@local@marks:
+}{}
+
+% compatibility
+\newif\ifsystem@babelshorthands
+\bool_if:nTF \l_polyglossia_babelshorthands_bool {
+ \system@babelshorthandstrue
+}{
+ \system@babelshorthandsfalse
+}
+
+%
+% FIXME these should also be loaded \AtEndOfPackage !!!
+\def\xpg@option#1#2{%
+ \ifcsundef{xpg@main@language}{\setdefaultlanguage}{\setotherlanguage}%
+ [#1]{#2}}
+\ExplSyntaxOff
+
+% \end{macrocode}
+% \iffalse
+%</polyglossia.sty>
+%<*farsical.sty>
+% \fi
+% \clearpage
+%
+% \subsection{farsical.sty}
+% \begin{macrocode}
+\ProvidesPackage{farsical}
+ [2019/12/12 v0.2 %
+ Farsi (jalali) calendar]
+\ifluatex\RequirePackage{luabidi}\else\RequirePackage{bidi}\fi
+\RequirePackage{calc,arabicnumbers}
+
+%TODO - rewrite completely using calc
+%% - use Reingold & Dershowitz ME
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Modified from Arabiftoday.sty which is part of the Arabi package:
+%%% Copyright (C) 2006 Youssef Jabri
+%%% itself a modification of the code in the FarsiTeX system:
+%%% Copyright (C) 1996 Hassan Abolhassani
+%%% Copyright (C) 1996-2001 Roozbeh Pournader <roozbeh@sharif.edu>
+%%% Copyright (C) 2000-2001 Behdad Esfahbod <behdad@bamdad.org>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifJALALI@leap \newif\ifJALALI@kabiseh
+\newcount\JALALI@i \newcount\JALALI@y \newcount\JALALI@m \newcount\JALALI@d
+\newcount\JALALI@latini \newcount\JALALI@farsii
+\newcount\JALALI@latinii \newcount\JALALI@farsiii
+\newcount\JALALI@latiniii \newcount\JALALI@farsiiii
+\newcount\JALALI@latiniv \newcount\JALALI@farsiiv
+\newcount\JALALI@latinv \newcount\JALALI@farsiv
+\newcount\JALALI@latinvi \newcount\JALALI@farsivi
+\newcount\JALALI@latinvii \newcount\JALALI@farsivii
+\newcount\JALALI@latinviii \newcount\JALALI@farsiviii
+\newcount\JALALI@latinix \newcount\JALALI@farsiix
+\newcount\JALALI@latinx \newcount\JALALI@farsix
+\newcount\JALALI@latinxi \newcount\JALALI@farsixi
+\newcount\JALALI@latinxii \newcount\JALALI@farsixii
+ \newcount\JALALI@farsixiii
+
+\newcount\JALALI@temp
+\newcount\JALALI@temptwo
+\newcount\JALALI@tempthree
+\newcount\JALALI@yModHundred
+\newcount\JALALI@thirtytwo
+\newcount\JALALI@dn
+\newcount\JALALI@sn
+\newcount\JALALI@mminusone
+
+% \ftoday renamed to \Jalalitoday - FC
+\def\Jalalitoday{%
+\JALALI@y=\year \JALALI@m=\month \JALALI@d=\day
+%
+\JALALI@temp=\JALALI@y
+\divide\JALALI@temp by 100\relax
+\multiply\JALALI@temp by 100\relax
+\JALALI@yModHundred=\JALALI@y
+\advance\JALALI@yModHundred by -\JALALI@temp\relax
+%
+\ifodd\JALALI@yModHundred
+ \JALALI@leapfalse
+\else
+ \JALALI@temp=\JALALI@yModHundred
+ \divide\JALALI@temp by 2\relax
+ \ifodd\JALALI@temp\JALALI@leapfalse
+ \else
+ \ifnum\JALALI@yModHundred=0%
+ \JALALI@temp=\JALALI@y
+ \divide\JALALI@temp by 400\relax
+ \multiply\JALALI@temp by 400\relax
+ \ifnum\JALALI@y=\JALALI@temp\JALALI@leaptrue\else\JALALI@leapfalse\fi
+ \else\JALALI@leaptrue
+ \fi
+ \fi
+\fi
+%
+\JALALI@latini=31\relax
+\ifJALALI@leap
+ \JALALI@latinii = 29\relax
+\else
+ \JALALI@latinii = 28\relax
+\fi
+\JALALI@latiniii = 31\relax
+\JALALI@latiniv = 30\relax
+\JALALI@latinv = 31\relax
+\JALALI@latinvi = 30\relax
+\JALALI@latinvii = 31\relax
+\JALALI@latinviii = 31\relax
+\JALALI@latinix = 30\relax
+\JALALI@latinx = 31\relax
+\JALALI@latinxi = 30\relax
+\JALALI@latinxii = 31\relax
+%
+\JALALI@thirtytwo=32\relax
+%
+\JALALI@temp=\JALALI@y
+\advance\JALALI@temp by -17\relax
+\JALALI@temptwo=\JALALI@temp
+\divide\JALALI@temptwo by 33\relax
+\multiply\JALALI@temptwo by 33\relax
+\advance\JALALI@temp by -\JALALI@temptwo
+\ifnum\JALALI@temp=\JALALI@thirtytwo\JALALI@kabisehfalse
+\else
+ \JALALI@temptwo=\JALALI@temp
+ \divide\JALALI@temptwo by 4\relax
+ \multiply\JALALI@temptwo by 4\relax
+ \advance\JALALI@temp by -\JALALI@temptwo
+ \ifnum\JALALI@temp=\z@\JALALI@kabisehtrue\else\JALALI@kabisehfalse\fi
+\fi
+%
+% --BE
+% In fact farsii is equal to the Leap years from a fixed year to the last
+% year minus the Kabise years from a fixed year to the last year plus a const.
+%
+\JALALI@tempthree=\JALALI@y % Number of Leap years
+\advance\JALALI@tempthree by -1
+\JALALI@temp=\JALALI@tempthree % T := (MY-1) div 4
+\divide\JALALI@temp by 4\relax
+\JALALI@temptwo=\JALALI@tempthree % T := T - ((MY-1) div 100)
+\divide\JALALI@temptwo by 100\relax
+\advance\JALALI@temp by -\JALALI@temptwo
+\JALALI@temptwo=\JALALI@tempthree % T := T + ((MY-1) div 400)
+\divide\JALALI@temptwo by 400\relax
+\advance\JALALI@temp by \JALALI@temptwo
+\advance\JALALI@tempthree by -611 % Number of Kabise years
+\JALALI@temptwo=\JALALI@tempthree % T := T - ((SY+10) div 33) * 8
+\divide\JALALI@temptwo by 33\relax
+\multiply\JALALI@temptwo by 8\relax
+\advance\JALALI@temp by -\JALALI@temptwo
+\JALALI@temptwo=\JALALI@tempthree %
+\divide\JALALI@temptwo by 33\relax
+\multiply\JALALI@temptwo by 33\relax
+\advance\JALALI@tempthree by -\JALALI@temptwo
+\ifnum\JALALI@tempthree=32\advance\JALALI@temp by 1\fi % if (SY+10) mod 33=32 then Inc(T);
+\divide\JALALI@tempthree by 4\relax % T := T - ((SY+10) mod 33) div 4
+\advance\JALALI@temp by -\JALALI@tempthree
+\advance\JALALI@temp by -137 % T := T - 137 Adjust the value
+\JALALI@farsii=31
+\advance\JALALI@farsii by -\JALALI@temp % now 31 - T is the farsii
+%
+\JALALI@farsiii = 30\relax
+\ifJALALI@kabiseh
+ \JALALI@farsiiii = 30\relax
+\else
+ \JALALI@farsiiii = 29\relax
+\fi
+\JALALI@farsiiv = 31\relax
+\JALALI@farsiv = 31\relax
+\JALALI@farsivi = 31\relax
+\JALALI@farsivii = 31\relax
+\JALALI@farsiviii= 31\relax
+\JALALI@farsiix = 31\relax
+\JALALI@farsix = 30\relax
+\JALALI@farsixi = 30\relax
+\JALALI@farsixii = 30\relax
+\JALALI@farsixiii= 30\relax
+%
+\JALALI@dn= 0\relax
+\JALALI@sn= 0\relax
+\JALALI@mminusone=\JALALI@m
+\advance\JALALI@mminusone by -1\relax
+%
+\JALALI@i=0\relax
+\ifnum\JALALI@i < \JALALI@mminusone
+\loop
+\advance \JALALI@i by 1\relax
+\advance\JALALI@dn by \csname JALALI@latin\romannumeral\the\JALALI@i\endcsname
+\ifnum\JALALI@i<\JALALI@mminusone \repeat
+\fi
+\advance \JALALI@dn by \JALALI@d
+%
+\JALALI@i=1\relax
+\JALALI@sn = \JALALI@farsii
+\ifnum \JALALI@sn<\JALALI@dn
+\loop
+\advance \JALALI@i by 1\relax
+\advance\JALALI@sn by \csname JALALI@farsi\romannumeral\the\JALALI@i\endcsname
+\ifnum \JALALI@sn<\JALALI@dn \repeat
+\fi
+\ifnum \JALALI@i < 4
+ \JALALI@m = 9 \advance\JALALI@m by \JALALI@i
+ \advance \JALALI@y by -622\relax
+\else
+ \JALALI@m = \JALALI@i \advance \JALALI@m by -3\relax
+ \advance \JALALI@y by -621\relax
+\fi
+\advance\JALALI@sn by -\csname JALALI@farsi\romannumeral\the\JALALI@i%
+\endcsname
+\ifnum\JALALI@i = 1
+ \JALALI@d = \JALALI@dn \advance \JALALI@d by 30 \advance\JALALI@d by -\JALALI@farsii
+\else
+ \JALALI@d = \JALALI@dn \advance \JALALI@d by -\JALALI@sn
+\fi
+%% DATE FORMATTING
+\if@RTL{\farsidigits{\number\JALALI@d}\space%
+\Jalalimonth{\JALALI@m}\space\farsidigits{\number\JALALI@y}}%
+\else
+\number\JALALI@d\space\JalalimonthEnglish{\JALALI@m}%
+\space\number\JALALI@y%
+\fi}
+%%%
+\def\Jalalimonth#1{\ifcase#1\or فروردین\or
+اردیبهشت\or خرداد\or تیر\or مرداد\or شهریور%
+\or مهر\or آبان\or آذر\or دی\or بهمن\or اسفند%
+\fi}
+\def\JalalimonthEnglish#1{\ifcase#1%
+\or Farvardīn\or Ordībehesht\or Khordād\or Tīr%
+\or Mordād\or Shahrīvar\or Mihr\or Ābān\or Āzar%
+\or Dai\or Bahman\or Esfand\fi}
+% \end{macrocode}
+% \iffalse
+%</farsical.sty>
+%<*hebrewcal.sty>
+% \fi
+% \clearpage
+%
+% \subsection{hebrewcal.sty}
+% \begin{macrocode}
+\ProvidesPackage{hebrewcal}
+ [2019/12/03 v2.7 %
+ Hebrew calendar for polyglossia (adapted from hebcal.sty in Babel)]
+\RequirePackage{xkeyval}
+\ifluatex\RequirePackage{luabidi}\else\RequirePackage{bidi}\fi
+
+\newif\if@xpg@hebrewcal@marcheshvan
+\@xpg@hebrewcal@marcheshvanfalse
+
+\DeclareOption{marcheshvan}{\@xpg@hebrewcal@marcheshvantrue}
+
+\@ifundefined{if@xpg@hebrew@marcheshvan}{}{%
+ \if@xpg@hebrew@marcheshvan
+ \@xpg@hebrewcal@marcheshvantrue
+ \fi
+}
+
+%% TODO rewrite this on the basis of Reingold & Dershowitz
+%% on the model of hijrical (using calc)
+
+\@ifundefined{@Remainder}{\input{cal-util.def}}{}
+
+\define@boolkey{hebrew}[@hebrew@]{fullyear}[true]{}
+\setkeys{hebrew}{fullyear=false}
+
+\newcount\hebrewday \newcount\hebrewmonth \newcount\hebrewyear
+\def\hebrewdate#1#2#3{%
+ \HebrewFromGregorian{#1}{#2}{#3}%
+ {\hebrewday}{\hebrewmonth}{\hebrewyear}%
+ \if@RTL%
+ \@FormatForHebrew{\hebrewday}{\hebrewmonth}{\hebrewyear}%
+ \else%
+ \@FormatForEnglish{\hebrewday}{\hebrewmonth}{\hebrewyear}%
+ \fi}
+\def\hebrewtoday{\hebrewdate{\day}{\month}{\year}}
+% The command name is capitalised in the doc, and this is consistent
+% with other names such as \Hijritoday and \Jalalitoday.
+\let\Hebrewtoday=\hebrewtoday
+\def\hebrewsetreg{%
+ \HebrewFromGregorian{\day}{\month}{\year}%
+ {\hebrewday}{\hebrewmonth}{\hebrewyear}}
+\def\HebrewYearName#1{{%
+ \@tempcnta=#1\divide\@tempcnta by 1000\multiply\@tempcnta by 1000
+ \ifnum#1=\@tempcnta\relax % divisible by 1000: disambiguate
+ \Hebrewnumeral{#1}\ (לפ"ג)%
+ \else % not divisible by 1000
+ \ifnum#1<1000\relax % first millennium: disambiguate
+ \Hebrewnumeral{#1}\ (לפ"ג)%
+ \else
+ \ifnum#1<5000
+ \Hebrewnumeral{#1}%
+ \else
+ \ifnum#1<6000 % current millenium, print without thousands
+ \@tempcnta=#1\relax
+ \if@hebrew@fullyear\else\advance\@tempcnta by -5000\fi
+ \Hebrewnumeral{\@tempcnta}%
+ \else % #1>6000
+ \Hebrewnumeral{#1}%
+ \fi
+ \fi
+ \fi
+ \fi}}
+\def\HebrewMonthName#1#2{%
+ \ifnum #1 = 7 %
+ \@CheckLeapHebrewYear{#2}%
+ \if@HebrewLeap אדר\ ב'%
+ \else אדר%
+ \fi%
+ \else%
+ \ifcase#1%
+ % nothing for 0
+ \or תשרי%
+ \or\if@xpg@hebrewcal@marcheshvan מרחשון\else חשון\fi%
+ \or כסלו%
+ \or טבת%
+ \or שבט%
+ \or אדר\ א'%
+ \or אדר\ ב'%
+ \or ניסן%
+ \or אייר%
+ \or סיון%
+ \or תמוז%
+ \or אב%
+ \or אלול%
+ \fi%
+ \fi}
+\def\@FormatForHebrew#1#2#3{%
+ \Hebrewnumeral{#1}~ב\HebrewMonthName{#2}{#3}~%
+ \HebrewYearName{#3}}
+\def\HebrewMonthNameInEnglish#1#2{%
+ \ifnum #1 = 7%
+ \@CheckLeapHebrewYear{#2}%
+ \if@HebrewLeap Adar II\else Adar\fi%
+ \else%
+ \ifcase #1%
+ % nothing for 0
+ \or Tishrei%
+ \or\if@xpg@hebrewcal@marcheshvan Marcheshvan\else Heshvan\fi%
+ \or Kislev%
+ \or Tebeth%
+ \or Shebat%
+ \or Adar I%
+ \or Adar II%
+ \or Nisan%
+ \or Iyar%
+ \or Sivan%
+ \or Tammuz%
+ \or Av%
+ \or Elul%
+ \fi
+ \fi}
+\def\@FormatForEnglish#1#2#3{%
+ \HebrewMonthNameInEnglish{#2}{#3} \number#1,\ \number#3}
+\newcount\@common
+\newif\if@HebrewLeap
+\def\@CheckLeapHebrewYear#1{%
+ {%
+ \countdef\tmpa = 0% % \tmpa==\count0
+ \countdef\tmpb = 1% % \tmpb==\count1
+ \tmpa = #1%
+ \multiply \tmpa by 7%
+ \advance \tmpa by 1%
+ \@Remainder{\tmpa}{19}{\tmpb}%
+ \ifnum \tmpb < 7% % \tmpb = (7*year+1)%19
+ \global\@HebrewLeaptrue%
+ \else%
+ \global\@HebrewLeapfalse%
+ \fi}}
+\def\@HebrewElapsedMonths#1#2{%
+ {%
+ \countdef\tmpa = 0% % \tmpa==\count0
+ \countdef\tmpb = 1% % \tmpb==\count1
+ \countdef\tmpc = 2% % \tmpc==\count2
+ \tmpa = #1% %
+ \advance \tmpa by -1% %
+ #2 = \tmpa% % #2 = \tmpa = year-1
+ \divide #2 by 19% % Number of complete Meton cycles
+ \multiply #2 by 235% % #2 = 235*((year-1)/19)
+ \@Remainder{\tmpa}{19}{\tmpb}% \tmpa = years%19-years this cycle
+ \tmpc = \tmpb% %
+ \multiply \tmpb by 12% %
+ \advance #2 by \tmpb% % add regular months this cycle
+ \multiply \tmpc by 7% %
+ \advance \tmpc by 1% %
+ \divide \tmpc by 19% % \tmpc = (1+7*((year-1)%19))/19 -
+ \advance #2 by \tmpc% % add leap months
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@HebrewElapsedDays#1#2{%
+ {%
+ \countdef\tmpa = 0% % \tmpa==\count0
+ \countdef\tmpb = 1% % \tmpb==\count1
+ \countdef\tmpc = 2% % \tmpc==\count2
+ \@HebrewElapsedMonths{#1}{#2}%
+ \tmpa = #2% %
+ \multiply \tmpa by 13753% %
+ \advance \tmpa by 5604% % \tmpa=MonthsElapsed*13758 + 5604
+ \@Remainder{\tmpa}{25920}{\tmpc}% \tmpc == ConjunctionParts
+ \divide \tmpa by 25920%
+ \multiply #2 by 29%
+ \advance #2 by 1%
+ \advance #2 by \tmpa% % #2 = 1 + MonthsElapsed*29 +
+ \@Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek
+ \ifnum \tmpc < 19440%
+ \ifnum \tmpc < 9924%
+ \else% % New moon at 9 h. 204 p. or later
+ \ifnum \tmpa = 2% % on Tuesday ...
+ \@CheckLeapHebrewYear{#1}% of a common year
+ \if@HebrewLeap%
+ \else%
+ \advance #2 by 1%
+ \fi%
+ \fi%
+ \fi%
+ \ifnum \tmpc < 16789%
+ \else% % New moon at 15 h. 589 p. or later
+ \ifnum \tmpa = 1% % on Monday ...
+ \advance #1 by -1%
+ \@CheckLeapHebrewYear{#1}% at the end of leap year
+ \if@HebrewLeap%
+ \advance #2 by 1%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \advance #2 by 1% % new moon at or after midday
+ \fi%
+ \@Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek
+ \ifnum \tmpa = 0% % if Sunday ...
+ \advance #2 by 1%
+ \else% %
+ \ifnum \tmpa = 3% % Wednesday ...
+ \advance #2 by 1%
+ \else%
+ \ifnum \tmpa = 5% % or Friday
+ \advance #2 by 1%
+ \fi%
+ \fi%
+ \fi%
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@DaysInHebrewYear#1#2{%
+ {%
+ \countdef\tmpe = 12% % \tmpe==\count12
+ \@HebrewElapsedDays{#1}{\tmpe}%
+ \advance #1 by 1%
+ \@HebrewElapsedDays{#1}{#2}%
+ \advance #2 by -\tmpe%
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@HebrewDaysInPriorMonths#1#2#3{%
+ {%
+ \countdef\tmpf= 14% % \tmpf==\count14
+ #3 = \ifcase #1% % Days in prior month of regular year
+ 0 \or% % no month number 0
+ 0 \or% % Tishri
+ 30 \or% % Heshvan
+ 59 \or% % Kislev
+ 89 \or% % Tebeth
+ 118 \or% % Shebat
+ 148 \or% % Adar I
+ 148 \or% % Adar II
+ 177 \or% % Nisan
+ 207 \or% % Iyar
+ 236 \or% % Sivan
+ 266 \or% % Tammuz
+ 295 \or% % Av
+ 325 \or% % Elul
+ 400% % Dummy
+ \fi%
+ \@CheckLeapHebrewYear{#2}%
+ \if@HebrewLeap% % in leap year
+ \ifnum #1 > 6% % if month after Adar I
+ \advance #3 by 30% % add 30 days
+ \fi%
+ \fi%
+ \@DaysInHebrewYear{#2}{\tmpf}%
+ \ifnum #1 > 3%
+ \ifnum \tmpf = 353% %
+ \advance #3 by -1% %
+ \fi% % Short Kislev
+ \ifnum \tmpf = 383% %
+ \advance #3 by -1% %
+ \fi% %
+ \fi%
+ \ifnum #1 > 2%
+ \ifnum \tmpf = 355% %
+ \advance #3 by 1% %
+ \fi% % Long Heshvan
+ \ifnum \tmpf = 385% %
+ \advance #3 by 1% %
+ \fi% %
+ \fi%
+ \global\@common = #3}%
+ #3 = \@common}
+\def\@FixedFromHebrew#1#2#3#4{%
+ {%
+ #4 = #1%
+ \@HebrewDaysInPriorMonths{#2}{#3}{#1}%
+ \advance #4 by #1% % Add days in prior months this year
+ \@HebrewElapsedDays{#3}{#1}%
+ \advance #4 by #1% % Add days in prior years
+ \advance #4 by -1373429% % Subtract days before Gregorian
+ \global\@common = #4}% % 01.01.0001
+ #4 = \@common}
+\def\@GregorianDaysInPriorMonths#1#2#3{%
+ {%
+ #3 = \ifcase #1%
+ 0 \or% % no month number 0
+ 0 \or%
+ 31 \or%
+ 59 \or%
+ 90 \or%
+ 120 \or%
+ 151 \or%
+ 181 \or%
+ 212 \or%
+ 243 \or%
+ 273 \or%
+ 304 \or%
+ 334%
+ \fi%
+ \@CheckIfGregorianLeap{#2}%
+ \if@GregorianLeap%
+ \ifnum #1 > 2% % if month after February
+ \advance #3 by 1% % add leap day
+ \fi%
+ \fi%
+ \global\@common = #3}%
+ #3 = \@common}
+\def\@GregorianDaysInPriorYears#1#2{%
+ {%
+ \countdef\tmpc = 4% % \tmpc==\count4
+ \countdef\tmpb = 2% % \tmpb==\count2
+ \tmpb = #1% %
+ \advance \tmpb by -1% %
+ \tmpc = \tmpb% % \tmpc = \tmpb = year-1
+ \multiply \tmpc by 365% % Days in prior years =
+ #2 = \tmpc% % = 365*(year-1) ...
+ \tmpc = \tmpb% %
+ \divide \tmpc by 4% % \tmpc = (year-1)/4
+ \advance #2 by \tmpc% % ... plus Julian leap days ...
+ \tmpc = \tmpb% %
+ \divide \tmpc by 100% % \tmpc = (year-1)/100
+ \advance #2 by -\tmpc% % ... minus century years ...
+ \tmpc = \tmpb% %
+ \divide \tmpc by 400% % \tmpc = (year-1)/400
+ \advance #2 by \tmpc% % ... plus 4-century years.
+ \global\@common = #2}%
+ #2 = \@common}
+\def\@AbsoluteFromGregorian#1#2#3#4{%
+ {%
+ \countdef\tmpd = 0% % \tmpd==\count0
+ #4 = #1% % days so far this month
+ \@GregorianDaysInPriorMonths{#2}{#3}{\tmpd}%
+ \advance #4 by \tmpd% % add days in prior months
+ \@GregorianDaysInPriorYears{#3}{\tmpd}%
+ \advance #4 by \tmpd% % add days in prior years
+ \global\@common = #4}%
+ #4 = \@common}
+\def\HebrewFromGregorian#1#2#3#4#5#6{%
+ {%
+ \countdef\tmpx= 17% % \tmpx==\count17
+ \countdef\tmpy= 18% % \tmpy==\count18
+ \countdef\tmpz= 19% % \tmpz==\count19
+ #6 = #3% %
+ \global\advance #6 by 3761% approximation from above
+ \@AbsoluteFromGregorian{#1}{#2}{#3}{#4}%
+ \tmpz = 1 \tmpy = 1%
+ \@FixedFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}%
+ \ifnum \tmpx > #4% %
+ \global\advance #6 by -1% Hyear = Gyear + 3760
+ \@FixedFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}%
+ \fi% %
+ \advance #4 by -\tmpx% % Days in this year
+ \advance #4 by 1% %
+ #5 = #4% %
+ \divide #5 by 30% % Approximation for month from below
+ \loop% % Search for month
+ \@HebrewDaysInPriorMonths{#5}{#6}{\tmpx}%
+ \ifnum \tmpx < #4%
+ \advance #5 by 1%
+ \tmpy = \tmpx%
+ \repeat%
+ \global\advance #5 by -1%
+ \global\advance #4 by -\tmpy}}
+\ProcessOptions*
+% \end{macrocode}
+% \iffalse
+%</hebrewcal.sty>
+%<*hijrical.sty>
+% \fi
+% \clearpage
+%
+% \subsection{hijrical.sty}
+% \begin{macrocode}
+\ProvidesPackage{hijrical}
+ [2010/07/12 v0.2 %
+ Islamic calendar]
+\RequirePackage{calc}
+\RequirePackage{arabicnumbers}
+\@ifpackageloaded{bidi}{}{\newif\if@RTL\@RTLfalse}
+\@ifpackageloaded{l3calc}{\PackageError{hijrical}{\MessageBreak
+Package l3calc is loaded, which replaces the functionality of
+calc. Computation of Hijri dates will not work properly with
+% FIXME by Arthur: François couldn’t possibly mean ‘l3calc’ on the
+% following line :-) Find out if he meant ‘calc’.
+l3calc! The latest version of expl3 on CTAN no longer loads
+l3calc. Please update expl3!
+}{}}{}
+
+\@ifundefined{@Remainder}{\input{cal-util.def}}{}
+
+%% The following functions are straightforward implementation
+%% of Reingold & Dershowitz, Calendrical Calculations, The Millenium Edition
+%%
+
+\def\@FixedFromHijri#1#2#3#4{% year,month,day,counter
+\@ifundefined{c@#4}{\newcounter{#4}}{}%
+\setcounter{tmpA}{#2/2}% see errata of Reingold+Dershowitz
+%\message{tmpA is \thetmpA}%
+\setcounter{tmpB}{(3+11*#1)/30}%
+%\message{tmpB is \thetmpB}%
+\setcounter{#4}{227014+(#1-1)*354+\value{tmpB}+(29*(#2-1))+\value{tmpA}+#3}%
+}
+
+\newcounter{Hijriday}\newcounter{Hijrimonth}\newcounter{Hijriyear}
+
+\def\HijriFromGregorian#1#2#3{% year,month,day
+\@FixedFromGregorian{#1}{#2}{#3}{RDdate}%
+\setcounter{Hijriyear}{(30*(\value{RDdate}-227015)+10646)/10631}%
+\@FixedFromHijri{\value{Hijriyear}}{1}{1}{tmpx}%
+%\message{tmpx is \thetmpx}%
+\setcounter{tmpB}{\value{RDdate}-\value{tmpx}}%
+%\message{tmpB is \thetmpB}%
+\setcounter{Hijrimonth}{((11*\value{tmpB})+330)/325}%
+\@FixedFromHijri{\value{Hijriyear}}{\value{Hijrimonth}}{1}{tmpy}%
+%\message{tmpy is \thetmpy}%
+\setcounter{Hijriday}{1+\value{RDdate}-\value{tmpy}}%
+}
+
+%\HijriFromGregorian{\year}{\month}{\day}%
+
+%\def\PlainHijritoday{%
+%\theHijriday.\theHijrimonth.\theHijriyear}
+
+\def\Hijridate#1#2#3{%
+ \HijriFromGregorian{#1}{#2}{#3}%
+ \FormatHijriDate}
+
+% added option \Hijritoday[n] (default 0) for adjusting the date + n days
+\@ifundefined{@hijri@correction}{\gdef\@hijri@correction{0}}{}
+\newcommand\Hijritoday[1][\@hijri@correction]{%
+ \@ifundefined{c@adj@day}{\global\newcounter{adj@day}}{}%
+ \setcounter{adj@day}{\the\day+#1}%
+ \Hijridate{\year}{\month}{\value{adj@day}}}
+%\def\Hijritoday{\Hijridate{\year}{\month}{\day}}
+\let\hijritoday=\Hijritoday
+%FIXME necessary?
+%\def\Hijrisetreg{%
+% \HijriFromGregorian{\year}{\month}{\day}}
+
+\def\HijriMonthTranslit#1{\ifcase#1\or Muḥarram\or Ṣafar\or Rabīʿ I\or Rabīʿ II\or%
+Jumādā I\or Jumādā II\or Rajab\or Shaʿbān\or Ramaḍān\or%
+Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
+
+\def\HijriMonthArabic#1{\ifcase#1\or محرم\or صفر\or ربيع الأول\or ربيع الآخر\or%
+جمادى الأولى\or جمادى الآخرة\or رجب\or شعبان\or رمضان\or%
+شوال\or ذو القعدة\or ذو الحجة\fi}
+
+%% This macro is now locale-aware!
+\def\FormatHijriDate{%
+ \@ifundefined{FormatHijriDate@\languagename}%
+ {\if@RTL\FormatHijriDate@defaultRTL\else\FormatHijriDate@defaultLTR\fi}%
+ {\csname FormatHijriDate@\languagename\endcsname}}
+
+\newcommand\DefineFormatHijriDate[2]{%
+ \@namedef{FormatHijriDate@#1}{#2}}
+
+% we provide this as a reasonable default.
+% Further definitions are in polyglossia’s language definition files.
+\DefineFormatHijriDate{defaultRTL}{\@ensure@RTL{%
+\arabicdigits{\value{Hijriday}}\space\HijriMonthArabic{\value{Hijrimonth}}\space\arabicdigits{\value{Hijriyear}}}}
+
+\DefineFormatHijriDate{defaultLTR}{%
+\number\value{Hijriday}\space\HijriMonthTranslit{\value{Hijrimonth}}\space\number\value{Hijriyear}}
+% \end{macrocode}
+% \iffalse
+%</hijrical.sty>
+%<*polyglossia-french.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-french.lua}
+% \begin{macrocode}
+require('polyglossia-punct')
+
+local function set_left_space(lang, char, kern, rubber)
+ polyglossia.add_left_spaced_character(lang, char, kern, "space", rubber)
+end
+
+local function set_right_space(lang, char, kern, rubber)
+ polyglossia.add_right_spaced_character(lang, char, kern, "space", rubber)
+end
+
+local function activate_french_punct(thincolonspace, autospaceguillemets)
+ -- We need different language tags here to make switching of options possible
+ -- within a paragraph.
+ local lang = "french"
+ if thincolonspace then
+ lang = lang.."-thincolon"
+ end
+ if autospaceguillemets then
+ lang = lang.."-autospace"
+ end
+
+ polyglossia.activate_punct(lang)
+ polyglossia.clear_spaced_characters(lang)
+
+ if thincolonspace then
+ set_left_space(lang, ':', 0.5)
+ else
+ set_left_space(lang, ':', 1, true) -- stretchable and shrinkable space
+ end
+
+ set_left_space(lang, '!', 0.5)
+ set_left_space(lang, '?', 0.5)
+ set_left_space(lang, ';', 0.5)
+ set_left_space(lang, '‼', 0.5)
+ set_left_space(lang, '⁇', 0.5)
+ set_left_space(lang, '⁈', 0.5)
+ set_left_space(lang, '⁉', 0.5)
+ set_left_space(lang, '‽', 0.5) -- U+203D (interrobang)
+
+ if autospaceguillemets then
+ set_left_space(lang, '»', 0.5)
+ set_left_space(lang, '›', 0.5)
+ set_right_space(lang, '«', 0.5)
+ set_right_space(lang, '‹', 0.5)
+ end
+end
+
+local function deactivate_french_punct()
+ polyglossia.deactivate_punct()
+end
+
+polyglossia.activate_french_punct = activate_french_punct
+polyglossia.deactivate_french_punct = deactivate_french_punct
+% \end{macrocode}
+% \iffalse
+%</polyglossia-french.lua>
+%<*polyglossia-korean.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-korean.lua}
+% \begin{macrocode}
+--
+-- polyglossia-korean.lua
+--
+
+local glyph_id = node.id"glyph"
+local hbox_id = node.id"hlist"
+local vbox_id = node.id"vlist"
+local glue_id = node.id"glue"
+local penalty_id = node.id"penalty"
+local disc_id = node.id"disc"
+
+--
+-- attr_korean: variant = plain (0), classic (1), modern (2)
+--
+local attr_korean = luatexbase.attributes["xpg@attr@korean"]
+local attr_josa = luatexbase.attributes["xpg@attr@autojosa"]
+
+--
+-- characters after which linebreak is not allowed
+--
+local nobr_after = {
+ [0x28] = 1, -- ( LEFT PARENTHESIS
+ [0x3C] = 1, -- < LESS-THAN SIGN
+ [0x5B] = 1, -- [ LEFT SQUARE BRACKET
+ [0x60] = 1, -- ` GRAVE ACCENT
+ [0x7B] = 1, -- { LEFT CURLY BRACKET
+ [0xAB] = 1, -- « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ [0x2018] = 1, -- ‘ LEFT SINGLE QUOTATION MARK
+ [0x201C] = 1, -- “ LEFT DOUBLE QUOTATION MARK
+ [0x2329] = 1, -- 〈 LEFT-POINTING ANGLE BRACKET
+ [0x3008] = 1, -- 〈 LEFT ANGLE BRACKET
+ [0x300A] = 1, -- 《 LEFT DOUBLE ANGLE BRACKET
+ [0x300C] = 1, -- 「 LEFT CORNER BRACKET
+ [0x300E] = 1, -- 『 LEFT WHITE CORNER BRACKET
+ [0x3010] = 1, -- 【 LEFT BLACK LENTICULAR BRACKET
+ [0x3014] = 1, -- 〔 LEFT TORTOISE SHELL BRACKET
+ [0x3016] = 1, -- 〖 LEFT WHITE LENTICULAR BRACKET
+ [0x3018] = 1, -- 〘 LEFT WHITE TORTOISE SHELL BRACKET
+ [0x301A] = 1, -- 〚 LEFT WHITE SQUARE BRACKET
+ [0x301D] = 1, -- 〝 REVERSED DOUBLE PRIME QUOTATION MARK
+ [0xFE17] = 1, -- ︗ PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET
+ [0xFE35] = 1, -- ︵ PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
+ [0xFE37] = 1, -- ︷ PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
+ [0xFE39] = 1, -- ︹ PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
+ [0xFE3B] = 1, -- ︻ PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
+ [0xFE3D] = 1, -- ︽ PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET
+ [0xFE3F] = 1, -- ︿ PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET
+ [0xFE41] = 1, -- ﹁ PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+ [0xFE43] = 1, -- ﹃ PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+ [0xFE47] = 1, -- ﹇ PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET
+ [0xFE59] = 1, -- ﹙ SMALL LEFT PARENTHESIS
+ [0xFE5B] = 1, -- ﹛ SMALL LEFT CURLY BRACKET
+ [0xFE5D] = 1, -- ﹝ SMALL LEFT TORTOISE SHELL BRACKET
+ [0xFF08] = 1, -- ( FULLWIDTH LEFT PARENTHESIS
+ [0xFF3B] = 1, -- [ FULLWIDTH LEFT SQUARE BRACKET
+ [0xFF5B] = 1, -- { FULLWIDTH LEFT CURLY BRACKET
+ [0xFF5F] = 1, -- ⦅ FULLWIDTH LEFT WHITE PARENTHESIS
+ [0xFF62] = 1, -- 「 HALFWIDTH LEFT CORNER BRACKET
+}
+
+--
+-- characters before which linebreak is not allowed
+-- (currently, not much differences among the followings)
+-- 1: normal chars
+-- 2: hangul jamo vowels and trailing consonants
+-- 3: kana small letters
+-- 0: dashes (supress visible spacing)
+--
+local nobr_before = setmetatable({
+ [0x21] = 1, -- ! EXCLAMATION MARK
+ [0x22] = 1, -- " QUOTATION MARK
+ [0x27] = 1, -- ' APOSTROPHE
+ [0x29] = 1, -- ) RIGHT PARENTHESIS
+ [0x2C] = 1, -- , COMMA
+ [0x2D] = 0, -- - HYPHEN-MINUS
+ [0x2E] = 1, -- . FULL STOP
+ [0x2F] = 0, -- / SOLIDUS
+ [0x3A] = 0, -- : COLON
+ [0x3B] = 1, -- ; SEMICOLON
+ [0x3E] = 1, -- > GREATER-THAN SIGN
+ [0x3F] = 1, -- ? QUESTION MARK
+ [0x5C] = 0, -- \ REVERSE SOLIDUS
+ [0x5D] = 1, -- ] RIGHT SQUARE BRACKET
+ [0x7D] = 1, -- } RIGHT CURLY BRACKET
+ [0x7E] = 0, -- ~ TILDE
+ [0xB7] = 1, -- · MIDDLE DOT
+ [0xBB] = 1, -- » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ [0x2013] = 0, -- – EN DASH
+ [0x2014] = 0, -- — EM DASH
+ [0x2015] = 1, -- ― HORIZONTAL BAR
+ [0x2019] = 1, -- ’ RIGHT SINGLE QUOTATION MARK
+ [0x201D] = 1, -- ” RIGHT DOUBLE QUOTATION MARK
+ [0x2025] = 1, -- ‥ TWO DOT LEADER
+ [0x2026] = 1, -- … HORIZONTAL ELLIPSIS
+ [0x232A] = 1, -- 〉 RIGHT-POINTING ANGLE BRACKET
+ [0x3001] = 1, -- 、 IDEOGRAPHIC COMMA
+ [0x3002] = 1, -- 。 IDEOGRAPHIC FULL STOP
+ [0x3005] = 1, -- 々 IDEOGRAPHIC ITERATION MARK
+ [0x3009] = 1, -- 〉 RIGHT ANGLE BRACKET
+ [0x300B] = 1, -- 》 RIGHT DOUBLE ANGLE BRACKET
+ [0x300D] = 1, -- 」 RIGHT CORNER BRACKET
+ [0x300F] = 1, -- 』 RIGHT WHITE CORNER BRACKET
+ [0x3011] = 1, -- 】 RIGHT BLACK LENTICULAR BRACKET
+ [0x3015] = 1, -- 〕 RIGHT TORTOISE SHELL BRACKET
+ [0x3017] = 1, -- 〗 RIGHT WHITE LENTICULAR BRACKET
+ [0x3019] = 1, -- 〙 RIGHT WHITE TORTOISE SHELL BRACKET
+ [0x301B] = 1, -- 〛 RIGHT WHITE SQUARE BRACKET
+ [0x301C] = 1, -- 〜 WAVE DASH
+ [0x301E] = 1, -- 〞 DOUBLE PRIME QUOTATION MARK
+ [0x301F] = 1, -- 〟 LOW DOUBLE PRIME QUOTATION MARK
+ [0x3035] = 1, -- 〵 VERTICAL KANA REPEAT MARK LOWER HALF
+ [0x303B] = 1, -- 〻 VERTICAL IDEOGRAPHIC ITERATION MARK
+ [0x303C] = 1, -- 〼 MASU MARK
+ [0x3041] = 3, -- ぁ HIRAGANA LETTER SMALL A
+ [0x3043] = 3, -- ぃ HIRAGANA LETTER SMALL I
+ [0x3045] = 3, -- ぅ HIRAGANA LETTER SMALL U
+ [0x3047] = 3, -- ぇ HIRAGANA LETTER SMALL E
+ [0x3049] = 3, -- ぉ HIRAGANA LETTER SMALL O
+ [0x3063] = 3, -- っ HIRAGANA LETTER SMALL TU
+ [0x3083] = 3, -- ゃ HIRAGANA LETTER SMALL YA
+ [0x3085] = 3, -- ゅ HIRAGANA LETTER SMALL YU
+ [0x3087] = 3, -- ょ HIRAGANA LETTER SMALL YO
+ [0x308E] = 3, -- ゎ HIRAGANA LETTER SMALL WA
+ [0x3095] = 3, -- ゕ HIRAGANA LETTER SMALL KA
+ [0x3096] = 3, -- ゖ HIRAGANA LETTER SMALL KE
+ [0x3099] = 1, -- COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
+ [0x309A] = 1, -- COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ [0x309B] = 1, -- ゛ KATAKANA-HIRAGANA VOICED SOUND MARK
+ [0x309C] = 1, -- ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ [0x309D] = 1, -- ゝ HIRAGANA ITERATION MARK
+ [0x309E] = 1, -- ゞ HIRAGANA VOICED ITERATION MARK
+ [0x30A0] = 1, -- ゠ KATAKANA-HIRAGANA DOUBLE HYPHEN
+ [0x30A1] = 3, -- ァ KATAKANA LETTER SMALL A
+ [0x30A3] = 3, -- ィ KATAKANA LETTER SMALL I
+ [0x30A5] = 3, -- ゥ KATAKANA LETTER SMALL U
+ [0x30A7] = 3, -- ェ KATAKANA LETTER SMALL E
+ [0x30A9] = 3, -- ォ KATAKANA LETTER SMALL O
+ [0x30C3] = 3, -- ッ KATAKANA LETTER SMALL TU
+ [0x30E3] = 3, -- ャ KATAKANA LETTER SMALL YA
+ [0x30E5] = 3, -- ュ KATAKANA LETTER SMALL YU
+ [0x30E7] = 3, -- ョ KATAKANA LETTER SMALL YO
+ [0x30EE] = 3, -- ヮ KATAKANA LETTER SMALL WA
+ [0x30F5] = 3, -- ヵ KATAKANA LETTER SMALL KA
+ [0x30F6] = 3, -- ヶ KATAKANA LETTER SMALL KE
+ [0x30FB] = 1, -- ・ KATAKANA MIDDLE DOT
+ [0x30FC] = 1, -- ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
+ [0x30FD] = 1, -- ヽ KATAKANA ITERATION MARK
+ [0x30FE] = 1, -- ヾ KATAKANA VOICED ITERATION MARK
+ [0xFE30] = 1, -- ︰ PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+ [0xFE31] = 1, -- ︱ PRESENTATION FORM FOR VERTICAL EM DASH
+ [0xFE32] = 1, -- ︲ PRESENTATION FORM FOR VERTICAL EN DASH
+ [0xFE36] = 1, -- ︶ PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
+ [0xFE38] = 1, -- ︸ PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
+ [0xFE3A] = 1, -- ︺ PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
+ [0xFE3C] = 1, -- ︼ PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
+ [0xFE3E] = 1, -- ︾ PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET
+ [0xFE40] = 1, -- ﹀ PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET
+ [0xFE42] = 1, -- ﹂ PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+ [0xFE44] = 1, -- ﹄ PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+ [0xFE48] = 1, -- ﹈ PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET
+ [0xFE5A] = 1, -- ﹚ SMALL RIGHT PARENTHESIS
+ [0xFE5C] = 1, -- ﹜ SMALL RIGHT CURLY BRACKET
+ [0xFE5E] = 1, -- ﹞ SMALL RIGHT TORTOISE SHELL BRACKET
+ [0xFF01] = 1, -- ! FULLWIDTH EXCLAMATION MARK
+ [0xFF09] = 1, -- ) FULLWIDTH RIGHT PARENTHESIS
+ [0xFF0C] = 1, -- , FULLWIDTH COMMA
+ [0xFF0E] = 1, -- . FULLWIDTH FULL STOP
+ [0xFF1A] = 1, -- : FULLWIDTH COLON
+ [0xFF1B] = 1, -- ; FULLWIDTH SEMICOLON
+ [0xFF1F] = 1, -- ? FULLWIDTH QUESTION MARK
+ [0xFF3D] = 1, -- ] FULLWIDTH RIGHT SQUARE BRACKET
+ [0xFF5D] = 1, -- } FULLWIDTH RIGHT CURLY BRACKET
+ [0xFF60] = 1, -- ⦆ FULLWIDTH RIGHT WHITE PARENTHESIS
+ [0xFF61] = 1, -- 。 HALFWIDTH IDEOGRAPHIC FULL STOP
+ [0xFF63] = 1, -- 」 HALFWIDTH RIGHT CORNER BRACKET
+ [0xFF64] = 1, -- 、 HALFWIDTH IDEOGRAPHIC COMMA
+ [0xFF65] = 1, -- ・ HALFWIDTH KATAKANA MIDDLE DOT
+ [0xFF9E] = 1, -- ゙ HALFWIDTH KATAKANA VOICED SOUND MARK
+ [0xFF9F] = 1, -- ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+}, { __index = function(_,c)
+ if c >= 0x1160 and c <= 0x11FF then return 2 end
+ if c >= 0xD7B0 and c <= 0xD7FF then return 2 end
+ if c >= 0x302A and c <= 0x302F then return 1 end
+ if c >= 0x31F0 and c <= 0x31FF then return 3 end
+ if c >= 0xFF67 and c <= 0xFF70 then return 3 end
+ if c >= 0xFE00 and c <= 0xFE0F then return 1 end
+ if c >= 0xFE10 and c <= 0xFE19 and not (c == 0xFE17) then return 1 end
+ if c >= 0xFE50 and c <= 0xFE58 then return 1 end
+ if c >= 0xE0100 and c <= 0xE01EF then return 1 end
+ end
+})
+
+--
+-- whether 'c' is a cjk character
+--
+local function is_cjk (c)
+ return c >= 0xAC00 and c <= 0xD7FF
+ or c >= 0x1100 and c <= 0x11FF
+ or c >= 0xA960 and c <= 0xA97F
+ or c >= 0x2E80 and c <= 0x9FFF
+ or c >= 0xF900 and c <= 0xFAFF
+ or c >= 0xFE10 and c <= 0xFE1F
+ or c >= 0xFE30 and c <= 0xFE6F
+ or c >= 0xFF00 and c <= 0xFFEF
+ or c >= 0x1F100 and c <= 0x1F2FF
+ or c >= 0x20000 and c <= 0x2FA1F
+ or nobr_after[c] and c > 0x2014
+ or nobr_before[c] and c > 0x2014
+end
+
+--
+-- classify cjk characters
+-- 1: openings
+-- 2: closings
+-- 3: centered chars
+-- 4: full stops
+-- 5: ellipses
+-- 6: exclamation and question marks
+-- 0: all others
+--
+local charclass = setmetatable({
+ [0x2018] = 1, [0x201C] = 1, [0x2329] = 1, [0x3008] = 1,
+ [0x300A] = 1, [0x300C] = 1, [0x300E] = 1, [0x3010] = 1,
+ [0x3014] = 1, [0x3016] = 1, [0x3018] = 1, [0x301A] = 1,
+ [0x301D] = 1, [0xFE17] = 1, [0xFE35] = 1, [0xFE37] = 1,
+ [0xFE39] = 1, [0xFE3B] = 1, [0xFE3D] = 1, [0xFE3F] = 1,
+ [0xFE41] = 1, [0xFE43] = 1, [0xFE47] = 1, [0xFF08] = 1,
+ [0xFF3B] = 1, [0xFF5B] = 1, [0xFF5F] = 1, [0xFF62] = 1,
+ [0x2019] = 2, [0x201D] = 2, [0x232A] = 2, [0x3001] = 2,
+ [0x3009] = 2, [0x300B] = 2, [0x300D] = 2, [0x300F] = 2,
+ [0x3011] = 2, [0x3015] = 2, [0x3017] = 2, [0x3019] = 2,
+ [0x301B] = 2, [0x301E] = 2, [0x301F] = 2, [0xFE10] = 2,
+ [0xFE11] = 2, [0xFE18] = 2, [0xFE36] = 2, [0xFE38] = 2,
+ [0xFE3A] = 2, [0xFE3C] = 2, [0xFE3E] = 2, [0xFE40] = 2,
+ [0xFE42] = 2, [0xFE44] = 2, [0xFE48] = 2, [0xFF09] = 2,
+ [0xFF0C] = 2, [0xFF3D] = 2, [0xFF5D] = 2, [0xFF60] = 2,
+ [0xFF63] = 2, [0xFF64] = 2, [0x00B7] = 3, [0x30FB] = 3,
+ [0xFF1A] = 3, [0xFF1B] = 3, [0xFF65] = 3, [0x3002] = 4,
+ [0xFE12] = 4, [0xFF0E] = 4, [0xFF61] = 4, [0x2015] = 5,
+ [0x2025] = 5, [0x2026] = 5, [0xFE19] = 5, [0xFE30] = 5,
+ [0xFE31] = 5, [0xFE15] = 6, [0xFE16] = 6, [0xFF01] = 6,
+ [0xFF1F] = 6,
+}, { __index = function() return 0 end })
+
+--
+-- table for spacing between char classes
+-- 1 stands for 0.5*fontsize when variant=classic
+--
+local intercharclass = { [0] =
+ { [0] = nil, {1,1}, nil, {.5,.5} },
+ { [0] = nil, nil, nil, {.5,.5} },
+ { [0] = {1,1}, {1,1}, nil, {.5,.5}, nil, {1,1}, {1,1} },
+ { [0] = {.5,.5},{.5,.5},{.5,.5},{1,.5}, {.5,.5},{.5,.5},{.5,.5} },
+ { [0] = {1,0}, {1,0}, nil, {1.5,.5},nil, {1,0}, {1,0} },
+ { [0] = nil, {1,1}, nil, {.5,.5} },
+ { [0] = {1,1}, {1,1}, nil, {.5,.5} },
+}
+
+--
+-- get a new penalty node
+--
+local function get_new_penalty (p)
+ local penalty = node.new("penalty")
+ penalty.penalty = p
+ return penalty
+end
+
+--
+-- get a new glue node
+--
+local function get_new_glue (...)
+ local glue = node.new("glue")
+ node.setglue(glue, ...)
+ return glue
+end
+
+--
+-- return 0.5*fontsize of given fontid
+-- space: true if variant=modern; then 0.5*interword_space
+--
+local function get_font_size (fid, space)
+ local size = font.getparameters(fid)
+ if space then
+ size = size and size.space or 196608
+ else
+ size = size and size.quad or 655360
+ end
+ return size/2
+end
+
+--
+-- charclass 1 thru 4 will be packed in \hbox to 0.5em{\hss? curr \hss?}
+-- when variant=classic/modern
+--
+local function glyph_to_box (head, curr, class)
+ local g, h = curr
+ local size = get_font_size(g.font)
+ head, curr = node.remove(head, curr)
+ g.next, g.prev = nil, nil
+ local hss = get_new_glue(0, 65536, 65536, 2, 2)
+ if class == 1 then
+ h, hss.next, g.prev = hss, g, hss
+ elseif class == 2 or class == 4 then
+ h, g.next, hss.prev = g, hss, g
+ else
+ local hss2 = node.copy(hss)
+ h, hss.next, g.prev, g.next, hss2.prev = hss, g, hss, hss2, g
+ end
+ h = nodes.simple_font_handler(h)
+ local box = node.hpack(h, size, "exactly")
+ if curr then
+ head, curr = node.insert_before(head, curr, box)
+ else
+ head, curr = node.insert_after(head, node.tail(head), box)
+ end
+ return head, curr
+end
+
+--
+-- insert spacing defined as charclass[a][b] between a and b
+-- f: fontid
+-- var: variant = plain, classic, modern
+-- cc: charclass of current char
+-- nc: charclass of next char
+-- nobr: linebreak is not allowed
+--
+local function insert_cjk_penalty_glue (head, curr, f, var, cc, nc, nobr)
+ if nobr or cc == 1 or nc > 1 then
+ local penalty = get_new_penalty(10000)
+ head, curr = node.insert_after(head, curr, penalty)
+ end
+ local factor = get_font_size(f, var == 2)
+ local t = intercharclass[cc][nc]
+ local glue = get_new_glue(t[1]*factor, nil, t[2]*factor)
+ head, curr = node.insert_after(head, curr, glue)
+ return head, curr
+end
+
+--
+-- insert inter-character spacing in other normal cases
+-- f: fontid
+-- var: variant = plain, classic, modern
+-- x: true between cjk and non-cjk (a little more spacing)
+--
+local function insert_penalty_glue (head, curr, f, var, x)
+ if var ~= 1 then
+ local penalty = get_new_penalty(50)
+ head, curr = node.insert_after(head, curr, penalty)
+ end
+ local size, glue = get_font_size(f, x and var == 2)
+ if x then
+ glue = get_new_glue(size/2, size/4, size/8)
+ else
+ glue = get_new_glue(0, size/10, size/50)
+ end
+ head, curr = node.insert_after(head, curr, glue)
+ return head, curr
+end
+
+--
+-- main process for linebreak and inter-character spacing
+-- lb: true if pre_linebreak_filter
+--
+local function korean_break (head, lb)
+ local curr = head
+ while curr do
+ if curr.id == glyph_id then
+ local var = node.has_attribute(curr, attr_korean)
+ if var then
+ local c, f = curr.char or 0, curr.font or 0
+ local cc, cjkc = charclass[c], is_cjk(c)
+
+ -- compress cjk punctuations when charclass is 1 thru 4
+ if var > 0 and cc > 0 and cc < 5 then
+ head, curr = glyph_to_box(head, curr, cc)
+ end
+
+ local next = curr.next
+ if next and next.id == glyph_id then
+ local n = next.char or 0
+ local nc = charclass[n]
+ local nobr = nobr_before[n] or nobr_after[c]
+
+ -- insert spacing as of intercharclass
+ if var > 0 and intercharclass[cc][nc] then
+ head, curr = insert_cjk_penalty_glue(head, curr, f, var, cc, nc, nobr)
+
+ -- or insert spacing when linebreak is allowed
+ elseif not nobr then
+ local cjkn = is_cjk(n)
+
+ -- if curr or next is cjk char
+ if cjkc or cjkn then
+
+ -- if between cjk and non-cjk
+ if var > 0 and not (cjkc and cjkn) and nobr_before[c] ~= 0 then
+ head, curr = insert_penalty_glue(head, curr, f, var, true)
+
+ -- or under pre_linebreak_filter
+ elseif lb then
+ head, curr = insert_penalty_glue(head, curr, f, var)
+ end
+ end
+ end
+ end
+ end
+ end
+ curr = curr.next
+ end
+ return head
+end
+
+--
+-- process for reordering hangul tone marks (U+302E, U+302F)
+-- some hangul fonts (eg. Noto CJK) are so designed that hangul tone marks
+-- should be moved to the first position of a syllable.
+-- Currently, this functionality is not provided by luaotfload.
+--
+local function reorder_tm (head)
+ local curr, tone = node.slide(head)
+ while curr do
+ if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then
+ local f = font.getfont(curr.font) or font.fonts[curr.font]
+ if f and f.hb then -- harfbuzz do the right thing
+ tone = nil
+ else
+ local c, wd = curr.char or 0, curr.width or 0
+ if (c == 0x302E or c == 0x302F) and wd > 0 then
+ tone = curr
+ elseif tone and not nobr_before[c] then
+ head = node.remove(head, tone)
+ tone.next, tone.prev = nil, nil
+ head, curr = node.insert_before(head, curr, tone)
+ tone = nil
+ end
+ end
+ end
+ curr = curr.prev
+ end
+ return head
+end
+
+--
+-- automatic josa selection
+--
+local josa_table = {
+ -- consonant ㄹ, vowel, other consonants
+ [0xAC00] = {0xC774, 0xAC00, 0xC774}, -- 가 => 이, 가, 이
+ [0xC740] = {0xC740, 0xB294, 0xC740}, -- 은 => 은, 는, 은
+ [0xC744] = {0xC744, 0xB97C, 0xC744}, -- 을 => 을, 를, 을
+ [0xC640] = {0xACFC, 0xC640, 0xACFC}, -- 와 => 과, 와, 과
+ [0xC73C] = {nil, nil, 0xC73C}, -- 으(로) => , , 으
+ [0xC774] = {0xC774, nil, 0xC774}, -- 이(라) => 이, , 이
+}
+
+--
+-- helper function for number-like characters
+--
+local function josa_char_num (t, c)
+ c = c % 10 + 0x30
+ return t[c] or 2
+end
+
+--
+-- decide josa selection
+--
+local josa_code = setmetatable({
+ [0x30] = 3, [0x31] = 1, [0x33] = 3, [0x36] = 3, [0x37] = 1,
+ [0x38] = 1, [0x4C] = 1, [0x4D] = 3, [0x4E] = 3, [0x6C] = 1,
+ [0x6D] = 3, [0x6E] = 3, [0xFB02] = 1, [0xFB04] = 1,
+},{ __index = function(t,c)
+ if c >= 0xAC00 and c <= 0xD7A3 then
+ c = (c - 0xAC00) % 28 + 0x11A7
+ end
+ if c >= 0x11A8 and c <= 0x11FF then
+ if c == 0x11AF then return 1 end
+ return 3
+ end
+ if c >= 0xD7CB and c <= 0xD7FB then return 3 end
+ if c >= 0x2170 and c <= 0x217F then c = c - 0x10 end
+ if c >= 0x2160 and c <= 0x216F then
+ if c >= 0x216C then return 3 end
+ return josa_char_num(t, c - 0x215F)
+ end
+ if c >= 0x2460 and c <= 0x2473 then return josa_char_num(t, c - 0x245F) end
+ if c >= 0x2474 and c <= 0x2487 then return josa_char_num(t, c - 0x2473) end
+ if c >= 0x2488 and c <= 0x249B then return josa_char_num(t, c - 0x2487) end
+ if c >= 0x249C and c <= 0x24B5 then return t[c - 0x249C + 0x61] or 2 end
+ if c >= 0x24B6 and c <= 0x24CF then return t[c - 0x24B6 + 0x61] or 2 end
+ if c >= 0x24D0 and c <= 0x24E9 then return t[c - 0x24D0 + 0x61] or 2 end
+ if c >= 0x3131 and c <= 0x318E then
+ if c == 0x3139 then return 1 end
+ if c >= 0x314F and c <= 0x3163 or c >= 0x3187 then return 2 end
+ return 3
+ end
+ if c >= 0x3260 and c <= 0x327E then c = c - 0x60 end
+ if c >= 0x3200 and c <= 0x321E then
+ if c == 0x3203 then return 1 end
+ if c >= 0x320E then return 2 end
+ return 3
+ end
+ if c >= 0xFF10 and c <= 0xFF19 then return josa_char_num(t, c - 0xFF10) end
+ if c >= 0xFF21 and c <= 0xFF3A then return t[c - 0xFF21 + 0x61] or 2 end
+ if c >= 0xFF41 and c <= 0xFF5A then return t[c - 0xFF41 + 0x61] or 2 end
+ return 2
+ end
+})
+
+--
+-- obtain char that comes just before the josa
+--
+local function get_prev_char (p)
+ while p do
+ if p.id == glyph_id then
+ local pc = p.char or 0
+ if not nobr_after[pc] then
+ if not nobr_before[pc] or nobr_before[pc] >= 2 then
+ return pc
+ end
+ end
+ elseif p.id == hbox_id or p.id == vbox_id then
+ local pc = get_prev_char(node.slide(p.head))
+ if pc then return pc end
+ end
+ p = p.prev
+ end
+end
+
+--
+-- main process of josa selection
+--
+local function auto_josa (head)
+ local curr, tofree = head, {}
+ while curr do
+ if curr.id == glyph_id then
+ local josa = node.has_attribute(curr, attr_josa)
+ if josa then
+ local cc = curr.char or 0
+ if josa == 0 then
+ josa = josa_code[get_prev_char(curr.prev) or 0x30]
+ end
+ if cc == 0xC774 then
+ local n = curr.next
+ if n and n.char and n.char >= 0xAC00 and n.char <= 0xD7A3 then
+ else
+ cc = 0xAC00
+ end
+ end
+ local new = josa_table[cc]
+ if new then
+ cc = new[josa]
+ if cc then
+ curr.char = cc
+ else
+ head = node.remove(head, curr)
+ table.insert(tofree, curr)
+ end
+ end
+ node.unset_attribute(curr, attr_josa)
+ end
+ end
+ curr = curr.next
+ end
+ for _,v in ipairs(tofree) do node.free(v) end
+ return head
+end
+
+--
+-- now register to luatex callbacks
+-- As char value of glyphs can be changed by opentype GSUB process,
+-- we have to occupy the first position among callback functions.
+--
+local prepend_to_callback
+if luatexbase.base_add_to_callback then
+ prepend_to_callback = function(name, func, desc)
+ luatexbase.add_to_callback(name, func, desc, 1)
+ end
+else
+ prepend_to_callback = function(name, func, desc)
+ local t = { {func, desc} }
+ for _,v in ipairs(luatexbase.callback_descriptions(name)) do
+ table.insert(t, {luatexbase.remove_from_callback(name, v)})
+ end
+ for _,v in ipairs(t) do
+ luatexbase.add_to_callback(name, v[1], v[2])
+ end
+ end
+end
+
+prepend_to_callback ("pre_linebreak_filter",
+ function(head)
+ head = auto_josa(head)
+ head = korean_break(head, true)
+ head = reorder_tm(head)
+ return head
+ end,
+ "polyglossia.lang_korean")
+
+prepend_to_callback ("hpack_filter",
+ function(head)
+ head = auto_josa(head)
+ head = korean_break(head)
+ head = reorder_tm(head)
+ return head
+ end,
+ "polyglossia.lang_korean")
+
+-- vim:ft=lua:tw=0:sw=4:ts=4:expandtab
+% \end{macrocode}
+% \iffalse
+%</polyglossia-korean.lua>
+%<*polyglossia-latin.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-latin.lua}
+% \begin{macrocode}
+require('polyglossia-punct')
+
+-- For ecclesiastic Latin (and sometimes for Italian) a very small space is
+-- used for the punctuation. The ecclesiastic package uses a space of
+-- 0.3\fontdimen2, where \fontdimen2 is a interword space, which is typically
+-- between 1/4 and 1/3 of a quad. We choose a half of a \thinspace here.
+local hairspace = 0.08333 -- 1/12
+
+local function space_left(char)
+ polyglossia.add_left_spaced_character('latin', char, hairspace, 'quad')
+end
+
+local function space_right(char)
+ polyglossia.add_right_spaced_character('latin', char, hairspace, 'quad')
+end
+
+polyglossia.clear_spaced_characters('latin')
+space_left('!')
+space_left('?')
+space_left('‼')
+space_left('⁇')
+space_left('⁈')
+space_left('⁉')
+space_left('‽') -- U+203D (interrobang)
+space_left(':')
+space_left(';')
+space_left('»')
+space_left('›')
+space_right('«')
+space_right('‹')
+
+local function activate_latin_punct()
+ polyglossia.activate_punct('latin')
+end
+
+local function deactivate_latin_punct()
+ polyglossia.deactivate_punct()
+end
+
+polyglossia.activate_latin_punct = activate_latin_punct
+polyglossia.deactivate_latin_punct = deactivate_latin_punct
+% \end{macrocode}
+% \iffalse
+%</polyglossia-latin.lua>
+%<*polyglossia-punct.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-punct.lua}
+% \begin{macrocode}
+require('polyglossia') -- just in case...
+
+local add_to_callback = luatexbase.add_to_callback
+local remove_from_callback = luatexbase.remove_from_callback
+local priority_in_callback = luatexbase.priority_in_callback
+local new_attribute = luatexbase.new_attribute
+
+local node = node
+
+local insert_node_before = node.insert_before
+local insert_node_after = node.insert_after
+local remove_node = node.remove
+local has_attribute = node.has_attribute
+local node_copy = node.copy
+local new_node = node.new
+local end_of_math = node.end_of_math
+local getnext = node.getnext
+local getprev = node.getprev
+
+-- node types according to node.types()
+local glue_code = node.id"glue"
+local glyph_code = node.id"glyph"
+local penalty_code = node.id"penalty"
+local kern_code = node.id"kern"
+local math_code = node.id"math"
+
+-- we need some node subtypes
+local userkern = 1
+local userskip = 0
+local removable_skip = {
+ [0] = true, -- userskip
+ [13] = true, -- spaceskip
+ [14] = true, -- xspaceskip
+}
+
+-- we make a new node, so that we can copy it later on
+local kern_node = new_node(kern_code)
+kern_node.subtype = userkern -- this kern can be removed later on
+
+local function get_kern_node(dim)
+ local n = node_copy(kern_node)
+ n.kern = dim
+ return n
+end
+
+local glue_node = new_node(glue_code)
+glue_node.subtype = userskip
+
+local function get_glue_node(dim, stretch, shrink)
+ local n = node_copy(glue_node)
+ n.width = dim
+ n.stretch = stretch
+ n.shrink = shrink
+ return n
+end
+
+local penalty_node = new_node(penalty_code)
+penalty_node.penalty = 10000
+
+local function get_penalty_node()
+ return node_copy(penalty_node)
+end
+
+-- all possible space characters according to section 6.2 of the Unicode Standard
+-- https://www.unicode.org/versions/Unicode12.0.0/ch06.pdf
+local space_chars = {
+ [0x20] = true, -- space
+ [0xA0] = true, -- no-break space
+ [0x1680] = true, -- ogham space mark
+ [0x2000] = true, -- en quad
+ [0x2001] = true, -- em quad
+ [0x2002] = true, -- en space
+ [0x2003] = true, -- em space
+ [0x2004] = true, -- three-per-em-space
+ [0x2005] = true, -- four-per-em space
+ [0x2006] = true, -- six-per-em space
+ [0x2007] = true, -- figure space
+ [0x2008] = true, -- punctuation space
+ [0x2009] = true, -- thin space
+ [0x200A] = true, -- hair space
+ [0x202F] = true, -- narrow no-break space
+ [0x205F] = true, -- medium mathematical space
+ [0x3000] = true -- ideographic space
+}
+
+-- all left bracket characters, referenced by their Unicode slot
+local left_bracket_chars = {
+ [0x28] = true, -- left parenthesis
+ [0x5B] = true, -- left square bracket
+ [0x7B] = true, -- left curly bracket
+ [0x27E8] = true -- mathematical left angle bracket
+}
+
+-- all right bracket characters, referenced by their Unicode slot
+local right_bracket_chars = {
+ [0x29] = true, -- right parenthesis
+ [0x5D] = true, -- right square bracket
+ [0x7D] = true, -- right curly bracket
+ [0x27E9] = true -- mathematical right angle bracket
+}
+
+-- question and exclamation marks, referenced by their Unicode slot
+local question_exclamation_chars = {
+ [0x21] = true, -- exclamation mark !
+ [0x3F] = true, -- question mark ?
+ [0x203C] = true, -- double exclamation mark ‼
+ [0x203D] = true, -- interrobang ‽
+ [0x2047] = true, -- double question mark ⁇
+ [0x2048] = true, -- question exclamation mark ⁈
+ [0x2049] = true -- exclamation question mark ⁉
+}
+
+-- from nodes-tst.lua, adapted
+local function somespace(n)
+ if n then
+ local id, subtype = n.id, n.subtype
+ if id == glue_code then
+ -- it is dangerous to remove all the type of glue
+ return removable_skip[subtype]
+ elseif id == kern_code then
+ -- remove only user's kern
+ return subtype == userkern
+ elseif id == glyph_code then
+ return space_chars[n.char]
+ end
+ end
+end
+
+local function someleftbracket(n)
+ if n then
+ local id = n.id
+ if id == glyph_code then
+ return left_bracket_chars[n.char]
+ end
+ end
+end
+
+local function somerightbracket(n)
+ if n then
+ local id = n.id
+ if id == glyph_code then
+ return right_bracket_chars[n.char]
+ end
+ end
+end
+
+local function question_exclamation_sequence(n1, n2)
+ if n1 and n2 then
+ local id1 = n1.id
+ local id2 = n2.id
+ if id1 == glyph_code and id2 == glyph_code then
+ return question_exclamation_chars[n1.char] and question_exclamation_chars[n2.char]
+ end
+ end
+end
+
+-- idem
+local function somepenalty(n, value)
+ if n then
+ local id = n.id
+ if id == penalty_code then
+ if value then
+ return n.penalty == value
+ else
+ return true
+ end
+ end
+ end
+end
+
+local punct_attr = new_attribute("polyglossia_punct")
+
+local lang_id = {}
+local lang_counter = 0
+local left_space = {}
+local right_space = {}
+
+local function ensure_lang_id(lang)
+ if not lang_id[lang] then
+ lang_counter = lang_counter + 1
+ lang_id[lang] = lang_counter
+ end
+ return lang_id[lang]
+end
+
+local function clear_spaced_characters(lang)
+ local id = ensure_lang_id(lang)
+ left_space[id] = {}
+ right_space[id] = {}
+end
+
+local function illegal_unit(unit)
+ if unit then
+ texio.write_nl('Illegal spacing unit "'..unit..'".')
+ else
+ texio.write_nl('Spacing unit is a nil value.')
+ end
+end
+
+local function add_left_spaced_character(lang, char, kern, unit, rubber)
+-- The parameter kern is a number meant as a fraction of the unit.
+-- The unit can be "quad" (1em) or "space" (interword space).
+-- The parameter rubber is a Boolean value indicating if the inserted space is
+-- stretchable and shrinkable (only relevant if the unit is "space").
+ local id = ensure_lang_id(lang)
+ if unit == "quad" or unit == "space" then
+ left_space[id][char] = {}
+ left_space[id][char]["kern"] = kern
+ left_space[id][char]["unit"] = unit
+ left_space[id][char]["rubber"] = rubber
+ else
+ illegal_unit(unit)
+ end
+end
+
+local function add_right_spaced_character(lang, char, kern, unit, rubber)
+ local id = ensure_lang_id(lang)
+ if unit == "quad" or unit == "space" then
+ right_space[id][char] = {}
+ right_space[id][char]["kern"] = kern
+ right_space[id][char]["unit"] = unit
+ right_space[id][char]["rubber"] = rubber
+ else
+ illegal_unit(unit)
+ end
+end
+
+-- from typo-spa.lua, adapted
+local function process(head)
+ local current = head
+ while current do
+ local id = current.id
+ if id == glyph_code then
+ local attr = has_attribute(current, punct_attr)
+ if attr then
+ local char, leftspace, rightspace
+ if current.char <= 0x10FFFF then -- greater values may cause problems with utf8.char
+ char = utf8.char(current.char)
+ leftspace = left_space[attr][char]
+ rightspace = right_space[attr][char]
+ end
+ if leftspace or rightspace then
+ local fontparameters = fonts.hashes.parameters[current.font]
+ local unit, stretch, shrink, spacing_node
+ if leftspace and fontparameters then
+ local prev = getprev(current)
+ local space_exception = false
+ if prev then
+ -- do not add space after left (opening) bracket and between question/exclamation marks
+ space_exception = someleftbracket(prev) or question_exclamation_sequence(prev, current)
+ -- TODO: there is a question here: do we override a preceding space or not?...
+ while somespace(prev) do
+ head = remove_node(head, prev)
+ prev = getprev(current)
+ end
+ if somepenalty(prev, 10000) then
+ head = remove_node(head, prev)
+ end
+ end
+ if leftspace.unit == "quad" then
+ unit = fontparameters.quad
+ spacing_node = get_kern_node(leftspace.kern*unit)
+ elseif leftspace.unit == "space" then
+ unit = fontparameters.space
+ if leftspace.rubber then
+ stretch = leftspace.kern*fontparameters.space_stretch
+ shrink = leftspace.kern*fontparameters.space_shrink
+ spacing_node = get_glue_node(leftspace.kern*unit, stretch, shrink)
+ head = insert_node_before(head, current, get_penalty_node())
+ else
+ spacing_node = get_kern_node(leftspace.kern*unit)
+ end
+ end
+ if not space_exception then
+ head = insert_node_before(head, current, spacing_node)
+ end
+ end
+ if rightspace and fontparameters then
+ local next = getnext(current)
+ local space_exception = false
+ if next then
+ -- do not add space before right (closing) bracket
+ space_exception = somerightbracket(next)
+ local nextnext = getnext(next)
+ if somepenalty(next, 10000) and somespace(nextnext) then
+ head, next = remove_node(head, next)
+ end
+ while somespace(next) do
+ head, next = remove_node(head, next)
+ end
+ end
+ if rightspace.unit == "quad" then
+ unit = fontparameters.quad
+ spacing_node = get_kern_node(rightspace.kern*unit)
+ elseif rightspace.unit == "space" then
+ unit = fontparameters.space
+ if rightspace.rubber then
+ stretch = rightspace.kern*fontparameters.space_stretch
+ shrink = rightspace.kern*fontparameters.space_shrink
+ spacing_node = get_glue_node(rightspace.kern*unit, stretch, shrink)
+ if not space_exception then
+ head, current = insert_node_after(head, current, get_penalty_node())
+ end
+ else
+ spacing_node = get_kern_node(rightspace.kern*unit)
+ end
+ end
+ if not space_exception then
+ head, current = insert_node_after(head, current, spacing_node)
+ end
+ end
+ end
+ end
+ elseif id == math_code then
+ -- warning: this is a feature of luatex > 0.76
+ current = end_of_math(current) -- weird, can return nil .. no math end?
+ end
+ current = getnext(current) -- no error even if current is nil
+ end
+ return head
+end
+
+local function activate(lang)
+ local id = ensure_lang_id(lang)
+ -- We set the punctuation attribute to a language id here. This is
+ -- important to be able to intermix languages with different spacings
+ -- in one paragraph.
+ tex.setattribute(punct_attr, id)
+ for _, callback_name in ipairs{ "pre_linebreak_filter", "hpack_filter" } do
+ if not priority_in_callback(callback_name, "polyglossia-punct.process") then
+ add_to_callback(callback_name, process, "polyglossia-punct.process", 1)
+ end
+ end
+end
+
+local function deactivate()
+ tex.setattribute(punct_attr, -0x7FFFFFFF) -- this value means "unset"
+ -- Though it would make compilation slightly faster, it is not possible to
+ -- safely uncomment the following lines. Imagine the following case: you
+ -- start a paragraph by some spaced punctuation text, then, in the same
+ -- paragraph, you change the language to something else, and thus call the
+ -- following lines. This means that, at the end of the paragraph, the
+ -- function won't be in the callback, so the beginning of the paragraph
+ -- won't be processed by it.
+ -- if priority_in_callback(callback_name, "polyglossia-punct.process") then
+ -- remove_from_callback(callback_name, "polyglossia-punct.process")
+ -- end
+end
+
+polyglossia.activate_punct = activate
+polyglossia.deactivate_punct = deactivate
+polyglossia.add_left_spaced_character = add_left_spaced_character
+polyglossia.add_right_spaced_character = add_right_spaced_character
+polyglossia.clear_spaced_characters = clear_spaced_characters
+% \end{macrocode}
+% \iffalse
+%</polyglossia-punct.lua>
+%<*polyglossia-sanskrit.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-sanskrit.lua}
+% \begin{macrocode}
+require('polyglossia-punct')
+
+-- How do we now, in Lua, what a \thinspace is? In the LaTeX source (latex.ltx)
+-- it is defined as:
+-- \def\thinspace{\leavevmode@ifvmode\kern .16667em }
+-- I see no way of seeing if it has been overriden or not. So we stick to this
+-- value.
+local thinspace = 0.16667 -- 1/6
+
+local function space_left(char)
+ polyglossia.add_left_spaced_character('sanskrit', char, thinspace, 'quad')
+end
+
+polyglossia.clear_spaced_characters('sanskrit')
+space_left('!')
+space_left('?')
+space_left('‼')
+space_left('⁇')
+space_left('⁈')
+space_left('⁉')
+space_left('‽') -- U+203D (interrobang)
+space_left(':')
+space_left(';')
+space_left('।') -- danda, U+0964
+space_left('॥') -- double danda, U+0965
+
+local function activate_sanskrit_punct()
+ polyglossia.activate_punct('sanskrit')
+end
+
+local function deactivate_sanskrit_punct()
+ polyglossia.deactivate_punct()
+end
+
+polyglossia.activate_sanskrit_punct = activate_sanskrit_punct
+polyglossia.deactivate_sanskrit_punct = deactivate_sanskrit_punct
+% \end{macrocode}
+% \iffalse
+%</polyglossia-sanskrit.lua>
+%<*polyglossia-tibt.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-tibt.lua}
+% \begin{macrocode}
+require('polyglossia') -- just in case...
+
+local add_to_callback = luatexbase.add_to_callback
+local remove_from_callback = luatexbase.remove_from_callback
+local priority_in_callback = luatexbase.priority_in_callback
+
+local next, type = next, type
+
+local nodes, fonts, node = nodes, fonts, node
+
+local nodecodes = nodes.nodecodes --- <= preloaded node.types()
+
+local insert_node_before = node.insert_before
+local insert_node_after = node.insert_after
+local remove_node = nodes.remove
+local copy_node = node.copy
+local has_attribute = node.has_attribute
+
+local end_of_math = node.end_of_math
+if not end_of_math then -- luatex < .76
+ local traverse_nodes = node.traverse_id
+ local math_code = nodecodes.math
+ local end_of_math = function (n)
+ for n in traverse_nodes(math_code, n.next) do
+ return n
+ end
+ end
+end
+
+-- node types as of April 2013
+local glyph_code = nodecodes.glyph
+local penalty_code = nodecodes.penalty
+local kern_code = nodecodes.kern
+
+-- we make a new node, so that we can copy it later on
+local penalty_node = node.new(penalty_code)
+penalty_node.penalty = 50 -- corresponds to the penalty LaTeX sets at explicit hyphens
+
+local function get_penalty_node()
+ return copy_node(penalty_node)
+end
+
+local xpgtibtattr = luatexbase.attributes['xpg@tibteol']
+
+local tsheg = unicode.utf8.byte('་')
+
+-- from typo-spa.lua
+local function process(head)
+ local start = head
+ -- head is always begin of par (whatsit), so we have at least two prev nodes
+ -- penalty followed by glue
+ while start do
+ local id = start.id
+ if id == glyph_code then
+ local attr = has_attribute(start, xpgtibtattr)
+ if attr and attr > 0 then
+ if start.char == tsheg then
+ if start.next then
+ insert_node_after(head,start,get_penalty_node())
+ end
+ end
+ end
+ elseif id == math_code then
+ -- warning: this is a feature of luatex > 0.76
+ start = end_of_math(start) -- weird, can return nil .. no math end?
+ end
+ if start then
+ start = start.next
+ end
+ end
+ return head
+end
+
+local callback_name = "pre_linebreak_filter"
+
+local function activate()
+ if not priority_in_callback (callback_name, "polyglossia-tibt.process") then
+ add_to_callback(callback_name, process, "polyglossia-tibt.process", 1)
+ end
+end
+
+local function desactivate()
+ if priority_in_callback (callback_name, "polyglossia-tibt.process") then
+ remove_from_callback(callback_name, "polyglossia-tibt.process")
+ end
+end
+
+polyglossia.activate_tibt_eol = activate
+polyglossia.desactivate_tibt_eol = desactivate
+% \end{macrocode}
+% \iffalse
+%</polyglossia-tibt.lua>
+%<*polyglossia.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia.lua}
+% \begin{macrocode}
+
+local module_name = "polyglossia"
+local polyglossia_module = {
+ name = module_name,
+ version = 1.3,
+ date = "2013/05/11",
+ description = "Polyglossia",
+ author = "Elie Roux",
+ copyright = "Elie Roux",
+ license = "CC0"
+}
+
+luatexbase.provides_module(polyglossia_module)
+
+local log_info = function(message, ...)
+ luatexbase.module_info(module_name, message:format(...))
+end
+local log_warn = function(message, ...)
+ luatexbase.module_warning(module_name, message:format(...))
+end
+
+polyglossia = polyglossia or {}
+local polyglossia = polyglossia
+
+local function select_language(lang, id)
+ polyglossia.current_language = lang
+end
+
+local function set_default_language(lang, id)
+ polyglossia.default_language = lang
+end
+
+local byte = utf8.codepoint -- use standard module of lua 5.3
+
+local check_char
+
+if luaotfload and luaotfload.aux and luaotfload.aux.font_has_glyph then
+ local font_has_glyph = luaotfload.aux.font_has_glyph
+ function check_char(chr)
+ local codepoint = tonumber(chr) or byte(chr)
+ if font_has_glyph(font.current(), codepoint) then
+ tex.sprint('1')
+ else
+ tex.sprint('0')
+ end
+ end
+else
+ function check_char(chr) -- always in current font
+ local fontid = font.current()
+ local fontdata = font.getfont(fontid) or font.fonts[fontid]
+ local chardata = fontdata.characters
+ local codepoint = tonumber(chr) or byte(chr)
+ if chardata and chardata[codepoint] then
+ tex.sprint('1')
+ else
+ tex.sprint('0')
+ end
+ end
+end
+
+local function load_tibt_eol()
+ require('polyglossia-tibt')
+end
+
+-- predefined l@nohyphenation or LuaTeX's maximum value for \language
+local nohyphid = luatexbase.registernumber'l@nohyphenation' or 16383
+
+-- key `nohyphenation` is for .sty file when possibly undefined l@nohyphenation
+local newloader_loaded_languages = { nohyphenation = nohyphid }
+
+local newloader_available_languages = require'language.dat.lua'
+-- Suggestion by Dohyun Kim on #129
+local t = { }
+for k, v in pairs(newloader_available_languages) do
+ t[k] = v
+ for _, vv in pairs(v.synonyms) do
+ t[vv] = v
+ end
+end
+newloader_available_languages = t
+
+-- LaTeX's language register is \count19
+local lang_register = 19
+
+-- New hyphenation pattern loader: use language.dat.lua directly and the language identifiers
+local function newloader(langentry)
+ local loaded_language = newloader_loaded_languages[langentry]
+ if loaded_language then
+ local langid = lang.id(loaded_language)
+ log_info('Language %s already loaded; id is %i', langentry, langid)
+ return langid
+ else
+ local langdata = newloader_available_languages[langentry]
+ if langdata then
+
+ local special = langdata.special
+ if special then
+ -- language0 (USenglish) is already included in the format
+ if special == 'language0' then
+ return 0
+
+ -- disabled language should not be used for utf-8 text
+ elseif special:find'^disabled:' then
+ log_warn('Hyphenation of language %s %s', langentry, special)
+ return nohyphid
+ end
+ end
+
+ -- language info will be written into the .log file
+ local s = { "Language data for " .. langentry }
+ for k, v in pairs(langdata) do
+ if type(v) == 'table' then -- for 'synonyms'
+ s[#s+1] = k .. "\t" .. table.concat(v,',')
+ else
+ s[#s+1] = k .. "\t" .. tostring(v)
+ end
+ end
+ log_info(table.concat(s,"\n"))
+
+ --
+ -- LaTeX's \newlanguage increases language register (count19),
+ -- whereas LuaTeX's lang.new() increases its own language id.
+ -- So when a user has declared, say, \newlanguage\lang@xyz, then
+ -- these two numbers do not match each other. If we do not consider
+ -- this possible situation, our newloader() function will
+ -- unfortunately overwrite the language \lang@xyz.
+ --
+ -- Threfore here we will compare LaTeX's \newlanguage number with
+ -- LuaTeX's lang.new() id and select the bigger one for our new
+ -- language object. Also we will update LaTeX's language register
+ -- by this new id, so that another possible \newlanguage should not
+ -- overwrite our language object.
+ --
+ -- get next \newlanguage allocation number
+ local langcnt = tex.count[lang_register] + 1
+ -- get new lang object
+ local langobject = lang.new()
+ local langid = lang.id(langobject)
+ -- get bigger one between \newlanguage and new lang obj id
+ local newlangid = math.max(langcnt, langid)
+ -- set language register for possible \newlanguage
+ tex.setcount('global', lang_register, newlangid)
+ -- get new lang object if needeed
+ if langid ~= newlangid then
+ langobject = lang.new(newlangid)
+ end
+
+ -- load hyphenation patterns and exceptions
+ for _,v in ipairs{ 'patterns', 'hyphenation' } do
+ local data = langdata[v]
+ if data and data ~= '' then
+ -- cope with comma separated list, such as serbian
+ for _,vv in ipairs(data:explode',+') do
+ local filepath = kpse.find_file(vv)
+ if filepath then
+ local fh = io.open(filepath)
+ lang[v](langobject, fh:read'a')
+ fh:close()
+ else
+ log_warn('Hyphenation file %s not found', vv)
+ end
+ end
+ end
+ end
+
+ newloader_loaded_languages[langentry] = langobject
+
+ log_info('Language %s was not yet loaded; created with id %i',
+ langentry, newlangid)
+ return newlangid
+ else
+ log_warn('Language %s not found in language.dat.lua', langentry)
+ return nohyphid
+ end
+ end
+end
+
+polyglossia.select_language = select_language
+polyglossia.set_default_language = set_default_language
+polyglossia.check_char = check_char
+polyglossia.load_tibt_eol = load_tibt_eol
+polyglossia.newloader = newloader
+polyglossia.newloader_loaded_languages = newloader_loaded_languages
+-- global variables:
+-- polyglossia.default_language
+-- polyglossia.current_language
+% \end{macrocode}
+% \iffalse
+%</polyglossia.lua>
+%<*babel-hebrewalph.def>
+% \fi
+% \clearpage
+%
+% \subsection{babel-hebrewalph.def}
+% \begin{macrocode}
+\ProvidesFile{babel-hebrewalph.def}
+ [2010/03/02 %
+ Babel definitions for Hebrew numerals^^J
+ Adapted from hebrew.ldf (2005/03/30 v2.3h)]
+\newif\if@gim@apost % whether we print apostrophes (gereshayim)
+\newif\if@gim@final % whether we use final or initial letters
+\newcommand*\hebrewnumeral[1]{%
+ \expandafter\@hebrew@numeral\expandafter{\the\numexpr#1}%
+}
+\newcommand*\Hebrewnumeral[1]{%
+ \expandafter\@Hebrew@numeral\expandafter{\the\numexpr#1}%
+}
+\newcommand*\Hebrewnumeralfinal[1]{%
+ \expandafter\@Hebrew@numeralfinal\expandafter{\the\numexpr#1}%
+}
+\newrobustcmd*{\@hebrew@numeral}[1] % no apostrophe, no final letters
+ {{\@gim@finalfalse\@gim@apostfalse\@hebrew@@numeral{#1}}}
+\newrobustcmd*{\@Hebrew@numeral}[1] % apostrophe, no final letters
+ {{\@gim@finalfalse\@gim@aposttrue\@hebrew@@numeral{#1}}}
+\newrobustcmd*{\@Hebrew@numeralfinal}[1] % apostrophe, final letters
+ {{\@gim@finaltrue\@gim@aposttrue\@hebrew@@numeral{#1}}}
+\newcommand*{\@hebrew@@numeral}[1]{%
+ \ifnum#1<\z@\space\xpg@warning{Illegal value (#1) for Hebrew numeral}%
+ \else
+ \@tempcnta=#1\@tempcntb=#1\relax
+ \divide\@tempcntb by 1000
+ \ifnum\@tempcntb=0\gim@nomil\@tempcnta\relax
+ \else{\@gim@apostfalse\@gim@finalfalse\@hebrew@numeral\@tempcntb}׳%
+ \multiply\@tempcntb by 1000\relax
+ \advance\@tempcnta by -\@tempcntb\relax
+ \gim@nomil\@tempcnta\relax
+ \fi
+ \fi
+}
+\def\hebrew@alph@zero{}
+\newcommand*{\gim@nomil}[1]{\@tempcnta=#1\@gim@prevfalse
+ \@tempcntb=\@tempcnta\divide\@tempcntb by 100\relax % hundreds digit
+ \ifcase\@tempcntb % print nothing if no hundreds
+ \or\gim@print{100}{ק}%
+ \or\gim@print{200}{ר}%
+ \or\gim@print{300}{ש}%
+ \or\gim@print{400}{ת}%
+ \or ת\@gim@prevtrue\gim@print{500}{ק}%
+ \or ת\@gim@prevtrue\gim@print{600}{ר}%
+ \or ת\@gim@prevtrue\gim@print{700}{ש}%
+ \or ת\@gim@prevtrue\gim@print{800}{ת}%
+ \or ת\@gim@prevtrue ת\gim@print{900}{ק}%
+ \fi
+ \@tempcntb=\@tempcnta\divide\@tempcntb by 10\relax % tens digit
+ \ifcase\@tempcntb % print nothing if no tens
+ \or % number between 10 and 19
+ \ifnum\@tempcnta = 16 \gim@print {9}{ט}% tet-zayin
+ \else\ifnum\@tempcnta = 15 \gim@print {9}{ט}% tet-vav
+ \else \gim@print{10}{י}%
+ \fi % \@tempcnta = 15
+ \fi % \@tempcnta = 16
+ \or\gim@print{20}{\if@gim@final ך\else כ\fi}%
+ \or\gim@print{30}{ל}%
+ \or\gim@print{40}{\if@gim@final ם\else מ\fi}%
+ \or\gim@print{50}{\if@gim@final ן\else נ\fi}%
+ \or\gim@print{60}{ס}%
+ \or\gim@print{70}{ע}%
+ \or\gim@print{80}{\if@gim@final ף\else פ\fi}%
+ \or\gim@print{90}{\if@gim@final ץ\else צ\fi}%
+ \fi
+ \ifcase\@tempcnta
+ \hebrew@alph@zero% empty but can be defined if desired
+ \or\gim@print{1}{א}%
+ \or\gim@print{2}{ב}%
+ \or\gim@print{3}{ג}%
+ \or\gim@print{4}{ד}%
+ \or\gim@print{5}{ה}%
+ \or\gim@print{6}{ו}%
+ \or\gim@print{7}{ז}%
+ \or\gim@print{8}{ח}%
+ \or\gim@print{9}{ט}%
+ \fi
+}
+\newif\if@gim@prev % flag if a previous letter has been typeset
+\newcommand*{\gim@print}[2]{% #2 is a letter, #1 is its value.
+ \advance\@tempcnta by -#1\relax% deduct the value from the remainder
+ \ifnum\@tempcnta=0% if this is the last letter
+ \if@gim@prev\if@gim@apost ״\fi#2%
+ \else#2\if@gim@apost ׳\fi\fi%
+ \else{\@gim@finalfalse#2}\@gim@prevtrue\fi}
+\def\Alphfinal#1{\expandafter\@Alphfinal\csname c@#1\endcsname}%
+\providecommand*{\@Alphfinal}[1]{\Hebrewnumeralfinal{#1}}
+% \end{macrocode}
+% \iffalse
+%</babel-hebrewalph.def>
+%<*babelsh.def>
+% \fi
+% \clearpage
+%
+% \subsection{babelsh.def}
+% \begin{macrocode}
+\ifx\initiate@active@char\@undefined
+\else
+ \bbl@afterfi\endinput
+\fi
+\ProvidesFile{babelsh.def}
+ [2019/09/30 %
+ Babel common definitions for shorthands^^J
+ Taken verbatim from babel files (2019/09/27 v3.34)]
+%
+% ------------------------------------------------------------------------------
+%
+% lines 52 to 56 from babel.sty
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@stripslash{\expandafter\@gobble\string}
+\def\bbl@add#1#2{%
+ \bbl@ifunset{\bbl@stripslash#1}%
+ {\def#1{#2}}%
+ {\expandafter\def\expandafter#1\expandafter{#1#2}}}
+%
+% ------------------------------------------------------------------------------
+%
+% line 73 to 74 from babel.sty
+%
+% ------------------------------------------------------------------------------
+%
+\long\def\bbl@afterelse#1\else#2\fi{\fi#1}
+\long\def\bbl@afterfi#1\fi{\fi#1}
+%
+% ------------------------------------------------------------------------------
+%
+% line 399 from babel.sty
+%
+% ------------------------------------------------------------------------------
+%
+\let\bbl@opt@shorthands\@nnil
+%
+% ------------------------------------------------------------------------------
+%
+% lines 432 to 445 from babel.sty
+%
+% ------------------------------------------------------------------------------
+%
+\ifx\bbl@opt@shorthands\@nnil
+ \def\bbl@ifshorthand#1#2#3{#2}%
+\else\ifx\bbl@opt@shorthands\@empty
+ \def\bbl@ifshorthand#1#2#3{#3}%
+\else
+ \def\bbl@ifshorthand#1{%
+ \bbl@xin@{\string#1}{\bbl@opt@shorthands}%
+ \ifin@
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+ \edef\bbl@opt@shorthands{%
+ \expandafter\bbl@sh@string\bbl@opt@shorthands\@empty}%
+%
+% ------------------------------------------------------------------------------
+%
+% line 450 from babel.sty
+%
+% ------------------------------------------------------------------------------
+%
+\fi\fi
+%
+% ------------------------------------------------------------------------------
+%
+% lines 389 to 424 from switch.def
+%
+% ------------------------------------------------------------------------------
+%
+\ifx\PackageError\@undefined
+ \def\bbl@error#1#2{%
+ \begingroup
+ \newlinechar=`\^^J
+ \def\\{^^J(babel) }%
+ \errhelp{#2}\errmessage{\\#1}%
+ \endgroup}
+ \def\bbl@warning#1{%
+ \begingroup
+ \newlinechar=`\^^J
+ \def\\{^^J(polyglossia) }%
+ \message{\\#1}%
+ \endgroup}
+ \def\bbl@info#1{%
+ \begingroup
+ \newlinechar=`\^^J
+ \def\\{^^J}%
+ \wlog{#1}%
+ \endgroup}
+\else
+ \def\bbl@error#1#2{%
+ \begingroup
+ \def\\{\MessageBreak}%
+ \PackageError{polyglossia}{#1}{#2}%
+ \endgroup}
+ \def\bbl@warning#1{%
+ \begingroup
+ \def\\{\MessageBreak}%
+ \PackageWarning{polyglossia}{#1}%
+ \endgroup}
+ \def\bbl@info#1{%
+ \begingroup
+ \def\\{\MessageBreak}%
+ \PackageInfo{polyglossia}{#1}%
+ \endgroup}
+\fi
+%
+% ------------------------------------------------------------------------------
+%
+% lines 48 to 69 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\ifx\bbl@ifshorthand\@undefined
+ \let\bbl@opt@shorthands\@nnil
+ \def\bbl@ifshorthand#1#2#3{#2}%
+ \let\bbl@language@opts\@empty
+ \ifx\babeloptionstrings\@undefined
+ \let\bbl@opt@strings\@nnil
+ \else
+ \let\bbl@opt@strings\babeloptionstrings
+ \fi
+ \def\BabelStringsDefault{generic}
+ \def\bbl@tempa{normal}
+ \ifx\babeloptionmath\bbl@tempa
+ \def\bbl@mathnormal{\noexpand\textormath}
+ \fi
+ \def\AfterBabelLanguage#1#2{}
+ \ifx\BabelModifiers\@undefined\let\BabelModifiers\relax\fi
+ \let\bbl@afterlang\relax
+ \def\bbl@opt@safe{BR}
+ \ifx\@uclclist\@undefined\let\@uclclist\@empty\fi
+ \ifx\bbl@trace\@undefined\def\bbl@trace#1{}\fi
+ \expandafter\newif\csname ifbbl@single\endcsname
+\fi
+%
+% ------------------------------------------------------------------------------
+%
+% line 108 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@csarg#1#2{\expandafter#1\csname bbl@#2\endcsname}%
+
+% ------------------------------------------------------------------------------
+%
+% lines 110 to 116 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+
+\def\bbl@loop#1#2#3{\bbl@@loop#1{#3}#2,\@nnil,}
+\def\bbl@loopx#1#2{\expandafter\bbl@loop\expandafter#1\expandafter{#2}}
+\def\bbl@@loop#1#2#3,{%
+ \ifx\@nnil#3\relax\else
+ \def#1{#3}#2\bbl@afterfi\bbl@@loop#1{#2}%
+ \fi}
+\def\bbl@for#1#2#3{\bbl@loopx#1{#2}{\ifx#1\@empty\else#3\fi}}
+
+% ------------------------------------------------------------------------------
+%
+% lines 125 to 130 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@exp#1{%
+ \begingroup
+ \let\\\noexpand
+ \def\<##1>{\expandafter\noexpand\csname##1\endcsname}%
+ \edef\bbl@exp@aux{\endgroup#1}%
+ \bbl@exp@aux}
+%
+% ------------------------------------------------------------------------------
+%
+% lines 144 to 149 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@ifunset#1{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+%
+% ------------------------------------------------------------------------------
+%
+% lines 234 to 243 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\chardef\bbl@engine=%
+ \ifx\directlua\@undefined
+ \ifx\XeTeXinputencoding\@undefined
+ \z@
+ \else
+ \tw@
+ \fi
+ \else
+ \@ne
+ \fi
+%
+% ------------------------------------------------------------------------------
+%
+% lines 255 to 258 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@withactive#1#2{%
+ \begingroup
+ \lccode`~=`#2\relax
+ \lowercase{\endgroup#1~}}
+%
+% ------------------------------------------------------------------------------
+%
+% lines 293 to 301 from babel.def
+%
+% NOTE: In order to avoid importing more unneeded definitions, this macro
+% does nothing for us.
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@usehooks#1#2{}
+%
+% ------------------------------------------------------------------------------
+%
+% lines 443 to 558 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@add@special#1{% 1:a macro like \", \?, etc.
+ \bbl@add\dospecials{\do#1}% test @sanitize = \relax, for back. compat.
+ \bbl@ifunset{@sanitize}{}{\bbl@add\@sanitize{\@makeother#1}}%
+ \ifx\nfss@catcodes\@undefined\else % TODO - same for above
+ \begingroup
+ \catcode`#1\active
+ \nfss@catcodes
+ \ifnum\catcode`#1=\active
+ \endgroup
+ \bbl@add\nfss@catcodes{\@makeother#1}%
+ \else
+ \endgroup
+ \fi
+ \fi}
+\def\bbl@remove@special#1{%
+ \begingroup
+ \def\x##1##2{\ifnum`#1=`##2\noexpand\@empty
+ \else\noexpand##1\noexpand##2\fi}%
+ \def\do{\x\do}%
+ \def\@makeother{\x\@makeother}%
+ \edef\x{\endgroup
+ \def\noexpand\dospecials{\dospecials}%
+ \expandafter\ifx\csname @sanitize\endcsname\relax\else
+ \def\noexpand\@sanitize{\@sanitize}%
+ \fi}%
+ \x}
+\def\bbl@active@def#1#2#3#4{%
+ \@namedef{#3#1}{%
+ \expandafter\ifx\csname#2@sh@#1@\endcsname\relax
+ \bbl@afterelse\bbl@sh@select#2#1{#3@arg#1}{#4#1}%
+ \else
+ \bbl@afterfi\csname#2@sh@#1@\endcsname
+ \fi}%
+ \long\@namedef{#3@arg#1}##1{%
+ \expandafter\ifx\csname#2@sh@#1@\string##1@\endcsname\relax
+ \bbl@afterelse\csname#4#1\endcsname##1%
+ \else
+ \bbl@afterfi\csname#2@sh@#1@\string##1@\endcsname
+ \fi}}%
+\def\initiate@active@char#1{%
+ \bbl@ifunset{active@char\string#1}%
+ {\bbl@withactive
+ {\expandafter\@initiate@active@char\expandafter}#1\string#1#1}%
+ {}}
+\def\@initiate@active@char#1#2#3{%
+ \bbl@csarg\edef{oricat@#2}{\catcode`#2=\the\catcode`#2\relax}%
+ \ifx#1\@undefined
+ \bbl@csarg\edef{oridef@#2}{\let\noexpand#1\noexpand\@undefined}%
+ \else
+ \bbl@csarg\let{oridef@@#2}#1%
+ \bbl@csarg\edef{oridef@#2}{%
+ \let\noexpand#1%
+ \expandafter\noexpand\csname bbl@oridef@@#2\endcsname}%
+ \fi
+ \ifx#1#3\relax
+ \expandafter\let\csname normal@char#2\endcsname#3%
+ \else
+ \bbl@info{Making #2 an active character}%
+ \ifnum\mathcode`#2=\ifodd\bbl@engine"1000000 \else"8000 \fi
+ \@namedef{normal@char#2}{%
+ \textormath{#3}{\csname bbl@oridef@@#2\endcsname}}%
+ \else
+ \@namedef{normal@char#2}{#3}%
+ \fi
+ \bbl@restoreactive{#2}%
+ \AtBeginDocument{%
+ \catcode`#2\active
+ \if@filesw
+ \immediate\write\@mainaux{\catcode`\string#2\active}%
+ \fi}%
+ \expandafter\bbl@add@special\csname#2\endcsname
+ \catcode`#2\active
+ \fi
+ \let\bbl@tempa\@firstoftwo
+ \if\string^#2%
+ \def\bbl@tempa{\noexpand\textormath}%
+ \else
+ \ifx\bbl@mathnormal\@undefined\else
+ \let\bbl@tempa\bbl@mathnormal
+ \fi
+ \fi
+ \expandafter\edef\csname active@char#2\endcsname{%
+ \bbl@tempa
+ {\noexpand\if@safe@actives
+ \noexpand\expandafter
+ \expandafter\noexpand\csname normal@char#2\endcsname
+ \noexpand\else
+ \noexpand\expandafter
+ \expandafter\noexpand\csname bbl@doactive#2\endcsname
+ \noexpand\fi}%
+ {\expandafter\noexpand\csname normal@char#2\endcsname}}%
+ \bbl@csarg\edef{doactive#2}{%
+ \expandafter\noexpand\csname user@active#2\endcsname}%
+ \bbl@csarg\edef{active@#2}{%
+ \noexpand\active@prefix\noexpand#1%
+ \expandafter\noexpand\csname active@char#2\endcsname}%
+ \bbl@csarg\edef{normal@#2}{%
+ \noexpand\active@prefix\noexpand#1%
+ \expandafter\noexpand\csname normal@char#2\endcsname}%
+ \expandafter\let\expandafter#1\csname bbl@normal@#2\endcsname
+ \bbl@active@def#2\user@group{user@active}{language@active}%
+ \bbl@active@def#2\language@group{language@active}{system@active}%
+ \bbl@active@def#2\system@group{system@active}{normal@char}%
+ \expandafter\edef\csname\user@group @sh@#2@@\endcsname
+ {\expandafter\noexpand\csname normal@char#2\endcsname}%
+ \expandafter\edef\csname\user@group @sh@#2@\string\protect@\endcsname
+ {\expandafter\noexpand\csname user@active#2\endcsname}%
+ \if\string'#2%
+ \let\prim@s\bbl@prim@s
+ \let\active@math@prime#1%
+ \fi
+ \bbl@usehooks{initiateactive}{{#1}{#2}{#3}}}
+\@ifpackagewith{babel}{KeepShorthandsActive}%
+ {\let\bbl@restoreactive\@gobble}%
+ {\def\bbl@restoreactive#1{%
+ \bbl@exp{%
+%
+% ------------------------------------------------------------------------------
+%
+% lines 561 to 755 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+ \\\AtEndOfPackage
+ {\catcode`#1=\the\catcode`#1\relax}}}%
+ \AtEndOfPackage{\let\bbl@restoreactive\@gobble}}
+\def\bbl@sh@select#1#2{%
+ \expandafter\ifx\csname#1@sh@#2@sel\endcsname\relax
+ \bbl@afterelse\bbl@scndcs
+ \else
+ \bbl@afterfi\csname#1@sh@#2@sel\endcsname
+ \fi}
+\def\active@prefix#1{%
+ \ifx\protect\@typeset@protect
+ \else
+ \ifx\protect\@unexpandable@protect
+ \noexpand#1%
+ \else
+ \protect#1%
+ \fi
+ \expandafter\@gobble
+ \fi}
+\newif\if@safe@actives
+\@safe@activesfalse
+\def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi}
+\def\bbl@activate#1{%
+ \bbl@withactive{\expandafter\let\expandafter}#1%
+ \csname bbl@active@\string#1\endcsname}
+\def\bbl@deactivate#1{%
+ \bbl@withactive{\expandafter\let\expandafter}#1%
+ \csname bbl@normal@\string#1\endcsname}
+\def\bbl@firstcs#1#2{\csname#1\endcsname}
+\def\bbl@scndcs#1#2{\csname#2\endcsname}
+\def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil}
+\def\@decl@short#1#2#3\@nil#4{%
+ \def\bbl@tempa{#3}%
+ \ifx\bbl@tempa\@empty
+ \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@scndcs
+ \bbl@ifunset{#1@sh@\string#2@}{}%
+ {\def\bbl@tempa{#4}%
+ \expandafter\ifx\csname#1@sh@\string#2@\endcsname\bbl@tempa
+ \else
+ \bbl@info
+ {Redefining #1 shorthand \string#2\\%
+ in language \CurrentOption}%
+ \fi}%
+ \@namedef{#1@sh@\string#2@}{#4}%
+ \else
+ \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@firstcs
+ \bbl@ifunset{#1@sh@\string#2@\string#3@}{}%
+ {\def\bbl@tempa{#4}%
+ \expandafter\ifx\csname#1@sh@\string#2@\string#3@\endcsname\bbl@tempa
+ \else
+ \bbl@info
+ {Redefining #1 shorthand \string#2\string#3\\%
+ in language \CurrentOption}%
+ \fi}%
+ \@namedef{#1@sh@\string#2@\string#3@}{#4}%
+ \fi}
+\def\textormath{%
+ \ifmmode
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\def\user@group{user}
+\def\language@group{english}
+\def\system@group{system}
+\def\useshorthands{%
+ \@ifstar\bbl@usesh@s{\bbl@usesh@x{}}}
+\def\bbl@usesh@s#1{%
+ \bbl@usesh@x
+ {\AddBabelHook{babel-sh-\string#1}{afterextras}{\bbl@activate{#1}}}%
+ {#1}}
+\def\bbl@usesh@x#1#2{%
+ \bbl@ifshorthand{#2}%
+ {\def\user@group{user}%
+ \initiate@active@char{#2}%
+ #1%
+ \bbl@activate{#2}}%
+ {\bbl@error
+ {Cannot declare a shorthand turned off (\string#2)}
+ {Sorry, but you cannot use shorthands which have been\\%
+ turned off in the package options}}}
+\def\user@language@group{user@\language@group}
+\def\bbl@set@user@generic#1#2{%
+ \bbl@ifunset{user@generic@active#1}%
+ {\bbl@active@def#1\user@language@group{user@active}{user@generic@active}%
+ \bbl@active@def#1\user@group{user@generic@active}{language@active}%
+ \expandafter\edef\csname#2@sh@#1@@\endcsname{%
+ \expandafter\noexpand\csname normal@char#1\endcsname}%
+ \expandafter\edef\csname#2@sh@#1@\string\protect@\endcsname{%
+ \expandafter\noexpand\csname user@active#1\endcsname}}%
+ \@empty}
+\newcommand\defineshorthand[3][user]{%
+ \edef\bbl@tempa{\zap@space#1 \@empty}%
+ \bbl@for\bbl@tempb\bbl@tempa{%
+ \if*\expandafter\@car\bbl@tempb\@nil
+ \edef\bbl@tempb{user@\expandafter\@gobble\bbl@tempb}%
+ \@expandtwoargs
+ \bbl@set@user@generic{\expandafter\string\@car#2\@nil}\bbl@tempb
+ \fi
+ \declare@shorthand{\bbl@tempb}{#2}{#3}}}
+\def\languageshorthands#1{\def\language@group{#1}}
+\def\aliasshorthand#1#2{%
+ \bbl@ifshorthand{#2}%
+ {\expandafter\ifx\csname active@char\string#2\endcsname\relax
+ \ifx\document\@notprerr
+ \@notshorthand{#2}%
+ \else
+ \initiate@active@char{#2}%
+ \expandafter\let\csname active@char\string#2\expandafter\endcsname
+ \csname active@char\string#1\endcsname
+ \expandafter\let\csname normal@char\string#2\expandafter\endcsname
+ \csname normal@char\string#1\endcsname
+ \bbl@activate{#2}%
+ \fi
+ \fi}%
+ {\bbl@error
+ {Cannot declare a shorthand turned off (\string#2)}
+ {Sorry, but you cannot use shorthands which have been\\%
+ turned off in the package options}}}
+\def\@notshorthand#1{%
+ \bbl@error{%
+ The character `\string #1' should be made a shorthand character;\\%
+ add the command \string\useshorthands\string{#1\string} to
+ the preamble.\\%
+ I will ignore your instruction}%
+ {You may proceed, but expect unexpected results}}
+\newcommand*\shorthandon[1]{\bbl@switch@sh\@ne#1\@nnil}
+\DeclareRobustCommand*\shorthandoff{%
+ \@ifstar{\bbl@shorthandoff\tw@}{\bbl@shorthandoff\z@}}
+\def\bbl@shorthandoff#1#2{\bbl@switch@sh#1#2\@nnil}
+\def\bbl@switch@sh#1#2{%
+ \ifx#2\@nnil\else
+ \bbl@ifunset{bbl@active@\string#2}%
+ {\bbl@error
+ {I cannot switch `\string#2' on or off--not a shorthand}%
+ {This character is not a shorthand. Maybe you made\\%
+ a typing mistake? I will ignore your instruction}}%
+ {\ifcase#1%
+ \catcode`#212\relax
+ \or
+ \catcode`#2\active
+ \or
+ \csname bbl@oricat@\string#2\endcsname
+ \csname bbl@oridef@\string#2\endcsname
+ \fi}%
+ \bbl@afterfi\bbl@switch@sh#1%
+ \fi}
+\def\babelshorthand{\active@prefix\babelshorthand\bbl@putsh}
+\def\bbl@putsh#1{%
+ \bbl@ifunset{bbl@active@\string#1}%
+ {\bbl@putsh@i#1\@empty\@nnil}%
+ {\csname bbl@active@\string#1\endcsname}}
+\def\bbl@putsh@i#1#2\@nnil{%
+ \csname\languagename @sh@\string#1@%
+ \ifx\@empty#2\else\string#2@\fi\endcsname}
+\ifx\bbl@opt@shorthands\@nnil\else
+ \let\bbl@s@initiate@active@char\initiate@active@char
+ \def\initiate@active@char#1{%
+ \bbl@ifshorthand{#1}{\bbl@s@initiate@active@char{#1}}{}}
+ \let\bbl@s@switch@sh\bbl@switch@sh
+ \def\bbl@switch@sh#1#2{%
+ \ifx#2\@nnil\else
+ \bbl@afterfi
+ \bbl@ifshorthand{#2}{\bbl@s@switch@sh#1{#2}}{\bbl@switch@sh#1}%
+ \fi}
+ \let\bbl@s@activate\bbl@activate
+ \def\bbl@activate#1{%
+ \bbl@ifshorthand{#1}{\bbl@s@activate{#1}}{}}
+ \let\bbl@s@deactivate\bbl@deactivate
+ \def\bbl@deactivate#1{%
+ \bbl@ifshorthand{#1}{\bbl@s@deactivate{#1}}{}}
+\fi
+\newcommand\ifbabelshorthand[3]{\bbl@ifunset{bbl@active@\string#1}{#3}{#2}}
+\def\bbl@prim@s{%
+ \prime\futurelet\@let@token\bbl@pr@m@s}
+\def\bbl@if@primes#1#2{%
+ \ifx#1\@let@token
+ \expandafter\@firstoftwo
+ \else\ifx#2\@let@token
+ \bbl@afterelse\expandafter\@firstoftwo
+ \else
+ \bbl@afterfi\expandafter\@secondoftwo
+ \fi\fi}
+\begingroup
+ \catcode`\^=7 \catcode`\*=\active \lccode`\*=`\^
+ \catcode`\'=12 \catcode`\"=\active \lccode`\"=`\'
+ \lowercase{%
+ \gdef\bbl@pr@m@s{%
+ \bbl@if@primes"'%
+ \pr@@@s
+ {\bbl@if@primes*^\pr@@@t\egroup}}}
+\endgroup
+\initiate@active@char{~}
+\declare@shorthand{system}{~}{\leavevmode\nobreak\ }
+\bbl@activate{~}
+%
+% ------------------------------------------------------------------------------
+%
+% lines 890 to 927 from babel.def
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@allowhyphens{\ifvmode\else\nobreak\hskip\z@skip\fi}
+\def\bbl@t@one{T1}
+\def\allowhyphens{\ifx\cf@encoding\bbl@t@one\else\bbl@allowhyphens\fi}
+\newcommand\babelnullhyphen{\char\hyphenchar\font}
+\def\babelhyphen{\active@prefix\babelhyphen\bbl@hyphen}
+\def\bbl@hyphen{%
+ \@ifstar{\bbl@hyphen@i @}{\bbl@hyphen@i\@empty}}
+\def\bbl@hyphen@i#1#2{%
+ \bbl@ifunset{bbl@hy@#1#2\@empty}%
+ {\csname bbl@#1usehyphen\endcsname{\discretionary{#2}{}{#2}}}%
+ {\csname bbl@hy@#1#2\@empty\endcsname}}
+\def\bbl@usehyphen#1{%
+ \leavevmode
+ \ifdim\lastskip>\z@\mbox{#1}\else\nobreak#1\fi
+ \nobreak\hskip\z@skip}
+\def\bbl@@usehyphen#1{%
+ \leavevmode\ifdim\lastskip>\z@\mbox{#1}\else#1\fi}
+\def\bbl@hyphenchar{%
+ \ifnum\hyphenchar\font=\m@ne
+ \babelnullhyphen
+ \else
+ \char\hyphenchar\font
+ \fi}
+\def\bbl@hy@soft{\bbl@usehyphen{\discretionary{\bbl@hyphenchar}{}{}}}
+\def\bbl@hy@@soft{\bbl@@usehyphen{\discretionary{\bbl@hyphenchar}{}{}}}
+\def\bbl@hy@hard{\bbl@usehyphen\bbl@hyphenchar}
+\def\bbl@hy@@hard{\bbl@@usehyphen\bbl@hyphenchar}
+\def\bbl@hy@nobreak{\bbl@usehyphen{\mbox{\bbl@hyphenchar}}}
+\def\bbl@hy@@nobreak{\mbox{\bbl@hyphenchar}}
+\def\bbl@hy@repeat{%
+ \bbl@usehyphen{%
+ \discretionary{\bbl@hyphenchar}{\bbl@hyphenchar}{\bbl@hyphenchar}}}
+\def\bbl@hy@@repeat{%
+ \bbl@@usehyphen{%
+ \discretionary{\bbl@hyphenchar}{\bbl@hyphenchar}{\bbl@hyphenchar}}}
+\def\bbl@hy@empty{\hskip\z@skip}
+\def\bbl@hy@@empty{\discretionary{}{}{}}
+\def\bbl@disc#1#2{\nobreak\discretionary{#2-}{}{#1}\bbl@allowhyphens}
+%
+% ------------------------------------------------------------------------------
+%
+% end of the code copied from babel files
+%
+% ------------------------------------------------------------------------------
+%
+\def\bbl@disc@german#1#2{%
+ \nobreak\discretionary{#2-}{}{#1}}
+% \end{macrocode}
+% \iffalse
+%</babelsh.def>
+%<*cal-util.def>
+% \fi
+% \clearpage
+%
+% \subsection{cal-util.def}
+% \begin{macrocode}
+%%%%%%%%%%%%% cal-util.def %%%%%%%%%%%%%%%%
+% Macros shared by hijrical and hebrewcal %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% the following is adapted from hebcal.sty in babel
+\def\@Remainder#1#2#3{%
+ #3 = #1% % c = a
+ \divide #3 by #2% % c = a/b
+ \multiply #3 by -#2% % c = -b(a/b)
+ \advance #3 by #1}% % c = a - b(a/b)
+\newif\if@Divisible
+\def\@CheckIfDivisible#1#2{%
+ {%
+ \countdef\tmpx=0% % temporary variable
+ \@Remainder{#1}{#2}{\tmpx}%
+ \ifnum\tmpx=0%
+ \global\@Divisibletrue%
+ \else%
+ \global\@Divisiblefalse%
+ \fi}}
+\newif\if@GregorianLeap
+\def\@CheckIfGregorianLeap#1{%
+ {%
+ \@CheckIfDivisible{#1}{4}%
+ \if@Divisible%
+ \@CheckIfDivisible{#1}{100}%
+ \if@Divisible%
+ \@CheckIfDivisible{#1}{400}%
+ \if@Divisible%
+ \global\@GregorianLeaptrue%
+ \else%
+ \global\@GregorianLeapfalse%
+ \fi%
+ \else%
+ \global\@GregorianLeaptrue%
+ \fi%
+ \else%
+ \global\@GregorianLeapfalse%
+ \fi%
+ }}
+%%
+
+\newcounter{tmpA}\newcounter{tmpB}
+\newcounter{tmpC}\newcounter{tmpD}
+\newcounter{tmpE}\newcounter{tmpF}
+
+
+%% This is an algorithm from Reingold & Dershowitz,
+%% Calendrical Calculations, The Millenium Edition
+%%
+\def\@FixedFromGregorian#1#2#3#4{%
+ \setcounter{tmpA}{(#1-1)*365}%
+ \setcounter{tmpB}{(#1-1)/4}%
+ \setcounter{tmpC}{(#1-1)/100}%
+ \setcounter{tmpD}{(#1-1)/400}%
+ \setcounter{tmpE}{(367*#2-362)/12}%
+ \ifnum#2<3%
+ \setcounter{tmpF}{0}%
+ \else%
+ \@CheckIfGregorianLeap{#1}%
+ \if@GregorianLeap%
+ \setcounter{tmpF}{-1}%
+ \else%
+ \setcounter{tmpF}{-2}%
+ \fi%
+ \fi%
+ \@ifundefined{c@#4}{\global\newcounter{#4}}{}%
+ \setcounter{#4}{\value{tmpA}+\value{tmpB}-\value{tmpC}+\value{tmpD}+\value{tmpE}+\value{tmpF}+#3}%
+}
+% \end{macrocode}
+% \iffalse
+%</cal-util.def>
+%<*xgreek-fixes.def>
+% \fi
+% \clearpage
+%
+% \subsection{xgreek-fixes.def}
+% \begin{macrocode}
+% the following fixes are taken verbatim from xgreek.sty:
+% \message{Package `xgreek' version 3.0.1 by Apostolos Syropoulos}
+\global\lccode"0370="0371 \global\uccode"0370="0370
+\global\lccode"0371="0371 \global\uccode"0371="0370
+\global\lccode"0372="0373 \global\uccode"0372="0372
+\global\lccode"0373="0373 \global\uccode"0373="0372
+\global\lccode"0376="0377 \global\uccode"0376="0376
+\global\lccode"0377="0377 \global\uccode"0377="0376
+\global\lccode"03FD="037B \global\uccode"03FD="03FD
+\global\lccode"037B="037B \global\uccode"037B="03FD
+\global\lccode"03FE="037C \global\uccode"03FE="03FE
+\global\lccode"037C="037C \global\uccode"037C="03FE
+\global\lccode"03FF="037D \global\uccode"03FF="03FF
+\global\lccode"037D="037D \global\uccode"037D="03FF
+\global\lccode"0386="03AC \global\uccode"0386="0391
+\global\lccode"0388="03AD \global\uccode"0388="0395
+\global\lccode"0389="03AC \global\uccode"0389="0397
+\global\lccode"038A="03AF \global\uccode"038A="0399
+\global\lccode"038C="03CC \global\uccode"038C="039F
+\global\lccode"038E="03CD \global\uccode"038E="03A5
+\global\lccode"038F="03CE \global\uccode"038F="03A9
+\global\lccode"0390="0390 \global\uccode"0390="03AA
+\global\lccode"0391="03B1 \global\uccode"0391="0391
+\global\lccode"0392="03B2 \global\uccode"0392="0392
+\global\lccode"0393="03B3 \global\uccode"0393="0393
+\global\lccode"0394="03B4 \global\uccode"0394="0394
+\global\lccode"0395="03B5 \global\uccode"0395="0395
+\global\lccode"0396="03B6 \global\uccode"0396="0396
+\global\lccode"0397="03B7 \global\uccode"0397="0397
+\global\lccode"0398="03B8 \global\uccode"0398="0398
+\global\lccode"0399="03B9 \global\uccode"0399="0399
+\global\lccode"039A="03BA \global\uccode"039A="039A
+\global\lccode"039B="03BB \global\uccode"039B="039B
+\global\lccode"039C="03BC \global\uccode"039C="039C
+\global\lccode"039D="03BD \global\uccode"039D="039D
+\global\lccode"039E="03BE \global\uccode"039E="039E
+\global\lccode"039F="03BF \global\uccode"039F="039F
+\global\lccode"03A0="03C0 \global\uccode"03A0="03A0
+\global\lccode"03A1="03C1 \global\uccode"03A1="03A1
+\global\lccode"03A3="03C3 \global\uccode"03A3="03A3
+\global\lccode"03A4="03C4 \global\uccode"03A4="03A4
+\global\lccode"03A5="03C5 \global\uccode"03A5="03A5
+\global\lccode"03A6="03C6 \global\uccode"03A6="03A6
+\global\lccode"03A7="03C7 \global\uccode"03A7="03A7
+\global\lccode"03A8="03C8 \global\uccode"03A8="03A8
+\global\lccode"03A9="03C9 \global\uccode"03A9="03A9
+\global\lccode"03AA="03CA \global\uccode"03AA="03AA
+\global\lccode"03AB="03CB \global\uccode"03AB="03AB
+\global\lccode"03AC="03AC \global\uccode"03AC="0391
+\global\lccode"03AD="03AD \global\uccode"03AD="0395
+\global\lccode"03AE="03AE \global\uccode"03AE="0397
+\global\lccode"03AF="03AF \global\uccode"03AF="0399
+\global\lccode"03B0="03B0 \global\uccode"03B0="03AB
+\global\lccode"03B1="03B1 \global\uccode"03B1="0391
+\global\lccode"03B2="03B2 \global\uccode"03B2="0392
+\global\lccode"03B3="03B3 \global\uccode"03B3="0393
+\global\lccode"03B4="03B4 \global\uccode"03B4="0394
+\global\lccode"03B5="03B5 \global\uccode"03B5="0395
+\global\lccode"03B6="03B6 \global\uccode"03B6="0396
+\global\lccode"03B7="03B7 \global\uccode"03B7="0397
+\global\lccode"03B8="03B8 \global\uccode"03B8="0398
+\global\lccode"03B9="03B9 \global\uccode"03B9="0399
+\global\lccode"03BA="03BA \global\uccode"03BA="039A
+\global\lccode"03BB="03BB \global\uccode"03BB="039B
+\global\lccode"03BC="03BC \global\uccode"03BC="039C
+\global\lccode"03BD="03BD \global\uccode"03BD="039D
+\global\lccode"03BE="03BE \global\uccode"03BE="039E
+\global\lccode"03BF="03BF \global\uccode"03BF="039F
+\global\lccode"03C0="03C0 \global\uccode"03C0="03A0
+\global\lccode"03C1="03C1 \global\uccode"03C1="03A1
+\global\lccode"03C2="03C2 \global\uccode"03C2="03A3
+\global\lccode"03C3="03C3 \global\uccode"03C3="03A3
+\global\lccode"03C4="03C4 \global\uccode"03C4="03A4
+\global\lccode"03C5="03C5 \global\uccode"03C5="03A5
+\global\lccode"03C6="03C6 \global\uccode"03C6="03A6
+\global\lccode"03C7="03C7 \global\uccode"03C7="03A7
+\global\lccode"03C8="03C8 \global\uccode"03C8="03A8
+\global\lccode"03C9="03C9 \global\uccode"03C9="03A9
+\global\lccode"03CA="03CA \global\uccode"03CA="03AA
+\global\lccode"03CB="03CB \global\uccode"03CB="03AB
+\global\lccode"03CC="03CC \global\uccode"03CC="039F
+\global\lccode"03CD="03CD \global\uccode"03CD="03A5
+\global\lccode"03CE="03CE \global\uccode"03CE="03A9
+\global\lccode"03D0="03D0 \global\uccode"03D0="0392
+\global\lccode"03D1="03D1 \global\uccode"03D1="0398
+\global\lccode"03D2="03C5 \global\uccode"03D2="03A5
+\global\lccode"03D3="03CD \global\uccode"03D3="03A5
+\global\lccode"03D4="03CB \global\uccode"03D4="03AB
+\global\lccode"03D5="03C6 \global\uccode"03D5="03A6
+\global\lccode"03D6="03C0 \global\uccode"03D6="03A0
+\global\lccode"03DA="03DB \global\uccode"03DA="03DA
+\global\lccode"03DB="03DB \global\uccode"03DB="03DA
+\global\lccode"03DC="03DD \global\uccode"03DC="03DC
+\global\lccode"03DD="03DD \global\uccode"03DD="03DC
+\global\lccode"03DE="03DF \global\uccode"03DE="03DE
+\global\lccode"03DF="03DF \global\uccode"03DF="03DE
+\global\lccode"03E0="03E1 \global\uccode"03E0="03E0
+\global\lccode"03E1="03E1 \global\uccode"03E1="03E0
+\global\lccode"03F0="03BA \global\uccode"03F0="039A
+\global\lccode"03F1="03C1 \global\uccode"03F1="03A1
+\global\lccode"03F2="03F2 \global\uccode"03F2="03F9
+\global\lccode"03F9="03F2 \global\uccode"03F9="03F9
+\global\lccode"1F00="1F00 \global\uccode"1F00="0391
+\global\lccode"1F01="1F01 \global\uccode"1F01="0391
+\global\lccode"1F02="1F02 \global\uccode"1F02="0391
+\global\lccode"1F03="1F03 \global\uccode"1F03="0391
+\global\lccode"1F04="1F04 \global\uccode"1F04="0391
+\global\lccode"1F05="1F05 \global\uccode"1F05="0391
+\global\lccode"1F06="1F06 \global\uccode"1F06="0391
+\global\lccode"1F07="1F07 \global\uccode"1F07="0391
+\global\lccode"1F08="1F00 \global\uccode"1F08="0391
+\global\lccode"1F09="1F01 \global\uccode"1F09="0391
+\global\lccode"1F0A="1F02 \global\uccode"1F0A="0391
+\global\lccode"1F0B="1F03 \global\uccode"1F0B="0391
+\global\lccode"1F0C="1F04 \global\uccode"1F0C="0391
+\global\lccode"1F0D="1F05 \global\uccode"1F0D="0391
+\global\lccode"1F0E="1F06 \global\uccode"1F0E="0391
+\global\lccode"1F0F="1F07 \global\uccode"1F0F="0391
+\global\lccode"1F10="1F10 \global\uccode"1F10="0395
+\global\lccode"1F11="1F11 \global\uccode"1F11="0395
+\global\lccode"1F12="1F12 \global\uccode"1F12="0395
+\global\lccode"1F13="1F13 \global\uccode"1F13="0395
+\global\lccode"1F14="1F14 \global\uccode"1F14="0395
+\global\lccode"1F15="1F15 \global\uccode"1F15="0395
+\global\lccode"1F18="1F10 \global\uccode"1F18="0395
+\global\lccode"1F19="1F11 \global\uccode"1F19="0395
+\global\lccode"1F1A="1F12 \global\uccode"1F1A="0395
+\global\lccode"1F1B="1F13 \global\uccode"1F1B="0395
+\global\lccode"1F1C="1F14 \global\uccode"1F1C="0395
+\global\lccode"1F1D="1F15 \global\uccode"1F1D="0395
+\global\lccode"1F20="1F20 \global\uccode"1F20="0397
+\global\lccode"1F21="1F21 \global\uccode"1F21="0397
+\global\lccode"1F22="1F22 \global\uccode"1F22="0397
+\global\lccode"1F23="1F23 \global\uccode"1F23="0397
+\global\lccode"1F24="1F24 \global\uccode"1F24="0397
+\global\lccode"1F25="1F25 \global\uccode"1F25="0397
+\global\lccode"1F26="1F26 \global\uccode"1F26="0397
+\global\lccode"1F27="1F27 \global\uccode"1F27="0397
+\global\lccode"1F28="1F20 \global\uccode"1F28="0397
+\global\lccode"1F29="1F21 \global\uccode"1F29="0397
+\global\lccode"1F2A="1F22 \global\uccode"1F2A="0397
+\global\lccode"1F2B="1F23 \global\uccode"1F2B="0397
+\global\lccode"1F2C="1F24 \global\uccode"1F2C="0397
+\global\lccode"1F2D="1F25 \global\uccode"1F2D="0397
+\global\lccode"1F2E="1F26 \global\uccode"1F2E="0397
+\global\lccode"1F2F="1F27 \global\uccode"1F2F="0397
+\global\lccode"1F30="1F30 \global\uccode"1F30="0399
+\global\lccode"1F31="1F31 \global\uccode"1F31="0399
+\global\lccode"1F32="1F32 \global\uccode"1F32="0399
+\global\lccode"1F33="1F33 \global\uccode"1F33="0399
+\global\lccode"1F34="1F34 \global\uccode"1F34="0399
+\global\lccode"1F35="1F35 \global\uccode"1F35="0399
+\global\lccode"1F36="1F36 \global\uccode"1F36="0399
+\global\lccode"1F37="1F37 \global\uccode"1F37="0399
+\global\lccode"1F38="1F30 \global\uccode"1F38="0399
+\global\lccode"1F39="1F31 \global\uccode"1F39="0399
+\global\lccode"1F3A="1F32 \global\uccode"1F3A="0399
+\global\lccode"1F3B="1F33 \global\uccode"1F3B="0399
+\global\lccode"1F3C="1F34 \global\uccode"1F3C="0399
+\global\lccode"1F3D="1F35 \global\uccode"1F3D="0399
+\global\lccode"1F3E="1F36 \global\uccode"1F3E="0399
+\global\lccode"1F3F="1F37 \global\uccode"1F3F="0399
+\global\lccode"1F40="1F40 \global\uccode"1F40="039F
+\global\lccode"1F41="1F41 \global\uccode"1F41="039F
+\global\lccode"1F42="1F42 \global\uccode"1F42="039F
+\global\lccode"1F43="1F43 \global\uccode"1F43="039F
+\global\lccode"1F44="1F44 \global\uccode"1F44="039F
+\global\lccode"1F45="1F45 \global\uccode"1F45="039F
+\global\lccode"1F48="1F40 \global\uccode"1F48="039F
+\global\lccode"1F49="1F41 \global\uccode"1F49="039F
+\global\lccode"1F4A="1F42 \global\uccode"1F4A="039F
+\global\lccode"1F4B="1F43 \global\uccode"1F4B="039F
+\global\lccode"1F4C="1F44 \global\uccode"1F4C="039F
+\global\lccode"1F4D="1F45 \global\uccode"1F4D="039F
+\global\lccode"1F50="1F50 \global\uccode"1F50="03A5
+\global\lccode"1F51="1F51 \global\uccode"1F51="03A5
+\global\lccode"1F52="1F52 \global\uccode"1F52="03A5
+\global\lccode"1F53="1F53 \global\uccode"1F53="03A5
+\global\lccode"1F54="1F54 \global\uccode"1F54="03A5
+\global\lccode"1F55="1F55 \global\uccode"1F55="03A5
+\global\lccode"1F56="1F56 \global\uccode"1F56="03A5
+\global\lccode"1F57="1F57 \global\uccode"1F57="03A5
+\global\lccode"1F59="1F51 \global\uccode"1F59="03A5
+\global\lccode"1F5B="1F53 \global\uccode"1F5B="03A5
+\global\lccode"1F5D="1F55 \global\uccode"1F5D="03A5
+\global\lccode"1F5F="1F57 \global\uccode"1F5F="03A5
+\global\lccode"1F60="1F60 \global\uccode"1F60="03A9
+\global\lccode"1F61="1F61 \global\uccode"1F61="03A9
+\global\lccode"1F62="1F62 \global\uccode"1F62="03A9
+\global\lccode"1F63="1F63 \global\uccode"1F63="03A9
+\global\lccode"1F64="1F64 \global\uccode"1F64="03A9
+\global\lccode"1F65="1F65 \global\uccode"1F65="03A9
+\global\lccode"1F66="1F66 \global\uccode"1F66="03A9
+\global\lccode"1F67="1F67 \global\uccode"1F67="03A9
+\global\lccode"1F68="1F60 \global\uccode"1F68="03A9
+\global\lccode"1F69="1F61 \global\uccode"1F69="03A9
+\global\lccode"1F6A="1F62 \global\uccode"1F6A="03A9
+\global\lccode"1F6B="1F63 \global\uccode"1F6B="03A9
+\global\lccode"1F6C="1F64 \global\uccode"1F6C="03A9
+\global\lccode"1F6D="1F65 \global\uccode"1F6D="03A9
+\global\lccode"1F6E="1F66 \global\uccode"1F6E="03A9
+\global\lccode"1F6F="1F67 \global\uccode"1F6F="03A9
+\global\lccode"1F70="1F70 \global\uccode"1F70="0391
+\global\lccode"1F71="1F71 \global\uccode"1F71="0391
+\global\lccode"1F72="1F72 \global\uccode"1F72="0395
+\global\lccode"1F73="1F73 \global\uccode"1F73="0395
+\global\lccode"1F74="1F74 \global\uccode"1F74="0397
+\global\lccode"1F75="1F75 \global\uccode"1F75="0397
+\global\lccode"1F76="1F76 \global\uccode"1F76="0399
+\global\lccode"1F77="1F77 \global\uccode"1F77="0399
+\global\lccode"1F78="1F78 \global\uccode"1F78="039F
+\global\lccode"1F79="1F79 \global\uccode"1F79="039F
+\global\lccode"1F7A="1F7A \global\uccode"1F7A="03A5
+\global\lccode"1F7B="1F7B \global\uccode"1F7B="03A5
+\global\lccode"1F7C="1F7C \global\uccode"1F7C="03A9
+\global\lccode"1F7D="1F7D \global\uccode"1F7D="03A9
+\global\lccode"1F80="1F80 \global\uccode"1F80="1FBC
+\global\lccode"1F81="1F81 \global\uccode"1F81="1FBC
+\global\lccode"1F82="1F82 \global\uccode"1F82="1FBC
+\global\lccode"1F83="1F83 \global\uccode"1F83="1FBC
+\global\lccode"1F84="1F84 \global\uccode"1F84="1FBC
+\global\lccode"1F85="1F85 \global\uccode"1F85="1FBC
+\global\lccode"1F86="1F86 \global\uccode"1F86="1FBC
+\global\lccode"1F87="1F87 \global\uccode"1F87="1FBC
+\global\lccode"1F88="1F80 \global\uccode"1F88="1FBC
+\global\lccode"1F89="1F81 \global\uccode"1F89="1FBC
+\global\lccode"1F8A="1F82 \global\uccode"1F8A="1FBC
+\global\lccode"1F8B="1F83 \global\uccode"1F8B="1FBC
+\global\lccode"1F8C="1F84 \global\uccode"1F8C="1FBC
+\global\lccode"1F8D="1F85 \global\uccode"1F8D="1FBC
+\global\lccode"1F8E="1F86 \global\uccode"1F8E="1FBC
+\global\lccode"1F8F="1F87 \global\uccode"1F8F="1FBC
+\global\lccode"1F90="1F90 \global\uccode"1F90="1FCC
+\global\lccode"1F91="1F91 \global\uccode"1F91="1FCC
+\global\lccode"1F92="1F92 \global\uccode"1F92="1FCC
+\global\lccode"1F93="1F93 \global\uccode"1F93="1FCC
+\global\lccode"1F94="1F94 \global\uccode"1F94="1FCC
+\global\lccode"1F95="1F95 \global\uccode"1F95="1FCC
+\global\lccode"1F96="1F96 \global\uccode"1F96="1FCC
+\global\lccode"1F97="1F97 \global\uccode"1F97="1FCC
+\global\lccode"1F98="1F90 \global\uccode"1F98="1FCC
+\global\lccode"1F99="1F91 \global\uccode"1F99="1FCC
+\global\lccode"1F9A="1F92 \global\uccode"1F9A="1FCC
+\global\lccode"1F9B="1F93 \global\uccode"1F9B="1FCC
+\global\lccode"1F9C="1F94 \global\uccode"1F9C="1FCC
+\global\lccode"1F9D="1F95 \global\uccode"1F9D="1FCC
+\global\lccode"1F9E="1F96 \global\uccode"1F9E="1FCC
+\global\lccode"1F9F="1F97 \global\uccode"1F9F="1FCC
+\global\lccode"1FA0="1FA0 \global\uccode"1FA0="1FFC
+\global\lccode"1FA1="1FA1 \global\uccode"1FA1="1FFC
+\global\lccode"1FA2="1FA2 \global\uccode"1FA2="1FFC
+\global\lccode"1FA3="1FA3 \global\uccode"1FA3="1FFC
+\global\lccode"1FA4="1FA4 \global\uccode"1FA4="1FFC
+\global\lccode"1FA5="1FA5 \global\uccode"1FA5="1FFC
+\global\lccode"1FA6="1FA6 \global\uccode"1FA6="1FFC
+\global\lccode"1FA7="1FA7 \global\uccode"1FA7="1FFC
+\global\lccode"1FA8="1FA0 \global\uccode"1FA8="1FFC
+\global\lccode"1FA9="1FA1 \global\uccode"1FA9="1FFC
+\global\lccode"1FAA="1FA2 \global\uccode"1FAA="1FFC
+\global\lccode"1FAB="1FA3 \global\uccode"1FAB="1FFC
+\global\lccode"1FAC="1FA4 \global\uccode"1FAC="1FFC
+\global\lccode"1FAD="1FA5 \global\uccode"1FAD="1FFC
+\global\lccode"1FAE="1FA6 \global\uccode"1FAE="1FFC
+\global\lccode"1FAF="1FA7 \global\uccode"1FAF="1FFC
+\global\lccode"1FB0="1FB0 \global\uccode"1FB0="1FB8
+\global\lccode"1FB1="1FB1 \global\uccode"1FB1="1FB9
+\global\lccode"1FB2="1FB2 \global\uccode"1FB2="1FBC
+\global\lccode"1FB3="1FB3 \global\uccode"1FB3="1FBC
+\global\lccode"1FB4="1FB4 \global\uccode"1FB4="1FBC
+\global\lccode"1FB6="1FB6 \global\uccode"1FB6="0391
+\global\lccode"1FB7="1FB7 \global\uccode"1FB7="1FBC
+\global\lccode"1FB8="1FB0 \global\uccode"1FB8="1FB8
+\global\lccode"1FB9="1FB1 \global\uccode"1FB9="1FB9
+\global\lccode"1FBA="1F70 \global\uccode"1FBA="0391
+\global\lccode"1FBB="1F71 \global\uccode"1FBB="0391
+\global\lccode"1FBC="1FB3 \global\uccode"1FBC="1FBC
+\global\lccode"1FBD="1FBD \global\uccode"1FBD="1FBD
+\global\lccode"1FC2="1FC2 \global\uccode"1FC2="1FCC
+\global\lccode"1FC3="1FC3 \global\uccode"1FC3="1FCC
+\global\lccode"1FC4="1FC4 \global\uccode"1FC4="1FCC
+\global\lccode"1FC6="1FC6 \global\uccode"1FC6="0397
+\global\lccode"1FC7="1FC7 \global\uccode"1FC7="1FCC
+\global\lccode"1FC8="1F72 \global\uccode"1FC8="0395
+\global\lccode"1FC9="1F73 \global\uccode"1FC9="0395
+\global\lccode"1FCA="1F74 \global\uccode"1FCA="0397
+\global\lccode"1FCB="1F75 \global\uccode"1FCB="0397
+\global\lccode"1FCC="1FC3 \global\uccode"1FCC="1FCC
+\global\lccode"1FD0="1FD0 \global\uccode"1FD0="1FD8
+\global\lccode"1FD1="1FD1 \global\uccode"1FD1="1FD9
+\global\lccode"1FD2="1FD2 \global\uccode"1FD2="03AA
+\global\lccode"1FD3="1FD3 \global\uccode"1FD3="03AA
+\global\lccode"1FD6="1FD6 \global\uccode"1FD6="0399
+\global\lccode"1FD7="1FD7 \global\uccode"1FD7="03AA
+\global\lccode"1FD8="1FD0 \global\uccode"1FD8="1FD8
+\global\lccode"1FD9="1FD1 \global\uccode"1FD9="1FD9
+\global\lccode"1FDA="1F76 \global\uccode"1FDA="0399
+\global\lccode"1FDB="1F77 \global\uccode"1FDB="0399
+\global\lccode"1FE0="1FE0 \global\uccode"1FE0="1FE8
+\global\lccode"1FE1="1FE1 \global\uccode"1FE1="1FE9
+\global\lccode"1FE2="1FE2 \global\uccode"1FE2="03AB
+\global\lccode"1FE3="1FE3 \global\uccode"1FE3="03AB
+\global\lccode"1FE4="1FE4 \global\uccode"1FE4="03A1
+\global\lccode"1FE5="1FE5 \global\uccode"1FE5="03A1
+\global\lccode"1FE6="1FE6 \global\uccode"1FE6="03A5
+\global\lccode"1FE7="1FE7 \global\uccode"1FE7="03AB
+\global\lccode"1FE8="1FE0 \global\uccode"1FE8="1FE8
+\global\lccode"1FE9="1FE1 \global\uccode"1FE9="1FE9
+\global\lccode"1FEA="1F7A \global\uccode"1FEA="03A5
+\global\lccode"1FEB="1F7B \global\uccode"1FEB="03A5
+\global\lccode"1FEC="1FE5 \global\uccode"1FEC="1FEC
+\global\lccode"1FF2="1FF2 \global\uccode"1FF2="1FFC
+\global\lccode"1FF3="1FF3 \global\uccode"1FF3="1FFC
+\global\lccode"1FF4="1FF4 \global\uccode"1FF4="1FFC
+\global\lccode"1FF6="1FF6 \global\uccode"1FF6="03A9
+\global\lccode"1FF7="1FF7 \global\uccode"1FF7="1FFC
+\global\lccode"1FF8="1F78 \global\uccode"1FF8="039F
+\global\lccode"1FF9="1F79 \global\uccode"1FF9="039F
+\global\lccode"1FFA="1F7C \global\uccode"1FFA="03A9
+\global\lccode"1FFB="1F7D \global\uccode"1FFB="03A9
+\global\lccode"1FFC="1FF3 \global\uccode"1FFC="1FFC
+% \end{macrocode}
+% \iffalse
+%</xgreek-fixes.def>
%<*gloss-acadien.ldf>
% \fi
% \clearpage
@@ -2697,7 +8367,7 @@ to track the issues and follow progress.
}
\def\noextras@afrikaans{%
- \noafrikaans@shorthands%
+ \ifafrikaans@babelshorthands\noafrikaans@shorthands\fi%
}
\def\blockextras@afrikaans{%
@@ -3152,12 +8822,6 @@ to track the issues and follow progress.
% \subsection{gloss-arabic.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-arabic.ldf}[polyglossia: module for arabic]
-\ifluatex
- \xpg@warning{Arabic is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
\RequireBidi
\RequirePackage{arabicnumbers}
\RequirePackage{hijrical}
@@ -3192,6 +8856,8 @@ and may look very wrong.}
\setlanguagealias*[locale=default]{arabic}{apd}
\setlanguagealias*[locale=mashriq]{arabic}{ar-PS}
+\define@boolkey{arabic}[arabic@]{abjadalph}[true]{}
+
\newif\ifeastern@numerals
\def\tmp@mashriq{mashriq}
\def\tmp@maghrib{maghrib}
@@ -3326,6 +8992,19 @@ and may look very wrong.}
\def\@ornatebracearabic#1{\RL{\char"FD3F\@arabic#1\char"FD3E}}
\def\@ornatebracealph#1{\RL{\char"FD3F\@alph#1\char"FD3E}}
+\def\abjadalph#1{\expandafter\arabic@abjad@alph{\number#1}}
+
+% This is a poor man's Arabic alphanumeric. It just uses the alphabet and
+% thus ends at 28.
+\def\arabic@abjad@alph#1{\ifcase#1%
+ \or ا\or ب\or\abjad@three\or د\or و\or ه‍\or ز%
+ \or ح\or ط\or ي\or ك\or ل\or م\or ن%
+ \or س\or ع\or ف\or ص\or ق\or ر\or ش%
+ \or ت\or ث\or خ\or ذ\or ض\or ظ\or غ%
+ \else\xpg@ill@value{#1}{arabic@abjad@alph}\fi%
+}
+
+
\def\abjadmaghribi#1{%
\ifnum#1>1999\xpg@ill@value{#1}{abjad}%
\else
@@ -3360,8 +9039,13 @@ and may look very wrong.}
\ifnum#1=\z@\fi\abj@maghribi@num@iii}
\def\arabic@numbers{%
+ \ifarabic@abjadalph
+ \let\@alph\abjadalph%
+ \let\@Alph\abjadalph%
+ \else
\let\@alph\abjad%
\let\@Alph\abjad%
+ \fi
}
\def\noarabic@numbers{%
@@ -3994,7 +9678,7 @@ and may look very wrong.}
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
\ifx\cyrdash\undefined
- \def\cyrdash{\hbox to.8em{--\hss--}}%
+ \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}%
\fi
\declare@shorthand{belarusian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
@@ -4179,7 +9863,7 @@ and may look very wrong.}
\def\noextras@belarusian{%
\ifcyrillic@numerals\nobelarusian@numbers\fi%
- \nobelarusian@shorthands%
+ \ifbelarusian@babelshorthands\nobelarusian@shorthands\fi%
}
\def\blockextras@belarusian{%
@@ -4205,13 +9889,6 @@ and may look very wrong.}
\ProvidesFile{gloss-bengali.ldf}[polyglossia: module for bengali]
-\ifluatex
- \xpg@warning{Bengali is not supported with LuaTeX.\MessageBreak
- I will proceed with the compilation, but\MessageBreak
- the output is not guaranteed to be correct\MessageBreak
- and may look very wrong.}
-\fi
-
\RequirePackage{devanagaridigits}
\RequirePackage{bengalidigits}
@@ -4796,18 +10473,23 @@ and may look very wrong.}
\csname normal@char\string"\endcsname l%
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
- \setbox0\hbox{l}\setbox1\hbox{l\/}%
+ \setbox0\hbox{l}%
\xpg@if@char@available{00B7}%
- {\setbox2\hbox{\char"00B7}}%
- {\setbox2\hbox{.}}%
- \advance\raiselldim by \the\fontdimen5\the\font
+ {\setbox2\hbox{\char"00B7}\setbox1\hbox{l}}%
+ {\setbox2\hbox{.}\setbox1\hbox{l\/}}%
+ \setbox3\hbox{.}%
+ \advance\raiselldim by \the\fontdimen5\the\font%
\advance\raiselldim by -\ht2%
\leftllkern=-.25\wd0%
\advance\leftllkern by \wd1%
\advance\leftllkern by -\wd0%
+ \advance\leftllkern by -0.5\wd2%
+ \advance\leftllkern by 0.5\wd3%
\rightllkern=-.25\wd0%
\advance\rightllkern by -\wd1%
\advance\rightllkern by \wd0%
+ \advance\rightllkern by -0.5\wd2%
+ \advance\rightllkern by 0.5\wd3%
\allowhyphens\discretionary{l-}{l}%
{\hbox{l}\kern\leftllkern\xpg@raiseddot%
\kern\rightllkern\hbox{l}}\allowhyphens
@@ -4819,19 +10501,24 @@ and may look very wrong.}
\csname normal@char\string"\endcsname L%
\else
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
- \setbox0\hbox{L}\setbox1\hbox{L\/}%
+ \setbox0\hbox{L}%
\xpg@if@char@available{00B7}%
- {\setbox2\hbox{\char"00B7}}%
- {\setbox2\hbox{.}}%
+ {\setbox2\hbox{\char"00B7}\setbox1\hbox{L}}%
+ {\setbox2\hbox{.}\setbox1\hbox{L\/}}%
+ \setbox3\hbox{.}%
\advance\raiselldim by .5\ht0%
\advance\raiselldim by -.5\ht2%
\leftllkern=-.125\wd0%
\advance\leftllkern by \wd1%
\advance\leftllkern by -\wd0%
+ \advance\leftllkern by -0.5\wd2%
+ \advance\leftllkern by 0.5\wd3%
\rightllkern=-\wd0%
\divide\rightllkern by 6%
\advance\rightllkern by -\wd1%
\advance\rightllkern by \wd0%
+ \advance\rightllkern by -0.5\wd2%
+ \advance\rightllkern by 0.5\wd3%
\allowhyphens\discretionary{L-}{L}%
{\hbox{L}\kern\leftllkern\xpg@raiseddot%
\kern\rightllkern\hbox{L}}\allowhyphens
@@ -4889,7 +10576,7 @@ and may look very wrong.}
\space de~\number\year}}
\def\noextras@catalan{%
- \nocatalan@shorthands%
+ \ifcatalan@babelshorthands\nocatalan@shorthands\fi%
}
\def\blockextras@catalan{%
@@ -5184,7 +10871,7 @@ and may look very wrong.}
}
\def\noextras@croatian{%
- \nocroatian@shorthands%
+ \ifcroatian@babelshorthands\nocroatian@shorthands\fi%
}
\def\blockextras@croatian{%
@@ -5313,7 +11000,7 @@ and may look very wrong.}
\chardef\czech@boundary=4095 %
\def\newXeTeXintercharclass{%
\e@alloc\XeTeXcharclass\chardef
- \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}
+ \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}%
\else
\chardef\czech@boundary=255
\fi
@@ -5342,6 +11029,24 @@ and may look very wrong.}
% Add nonbreakable space after single-letter word to
% prevent them to land at the end of a line
+% vlna code taken and adapted from xevlna.sty
+\ifxetex
+ \def\czech@nointerchartoks{\let\czech@interchartoks\czech@PreCSpreposition}%
+ \def\czech@PreCSpreposition{%
+ \def\next{}%
+ \ifnum\catcode`\ =10 % nothing will be done in verbatim
+ \ifmmode % nothing in math
+ \else
+ \let\czech@interchartoks\czech@nointerchartoks
+ \let\next\czech@ExamineCSpreposition
+ \fi\fi
+ \next%
+ }%
+ \def\czech@ExamineCSpreposition #1{#1\futurelet\next\czech@ProcessCSpreposition}%
+ \def\czech@ProcessCSpreposition{\ifx\next\czech@XeTeXspace\nobreak\fi}%
+ \futurelet\czech@XeTeXspace{ }\czech@nointerchartoks
+\fi
+
\def\czech@vlna{%
\ifluatex
\preventsingleon
@@ -5368,21 +11073,8 @@ and may look very wrong.}
\XeTeXcharclass `\a \czech@nonsyllabicpreposition
\XeTeXcharclass `\I \czech@nonsyllabicpreposition
\XeTeXcharclass `\i \czech@nonsyllabicpreposition
- \XeTeXinterchartoks \czech@boundary \czech@nonsyllabicpreposition {\czech@interchartoks}
- \XeTeXinterchartoks \czech@openpunctuation \czech@nonsyllabicpreposition {\czech@interchartoks}
- \def\czech@nointerchartoks{\let\czech@interchartoks\czech@PreCSpreposition}
- \def\czech@PreCSpreposition{\def\next{}%
- \ifnum\catcode`\ =10 % nothing will be done in verbatim
- \ifmmode % nothing in math
- \else
- \let\czech@interchartoks\czech@nointerchartoks
- \let\next\czech@ExamineCSpreposition
- \fi \fi
- \next%
- }
- \def\czech@ExamineCSpreposition ##1{##1\futurelet\next\czech@ProcessCSpreposition}
- \def\czech@ProcessCSpreposition{\ifx\next\czech@XeTeXspace\nobreak\fi}
- \futurelet\czech@XeTeXspace{ }\czech@nointerchartoks
+ \XeTeXinterchartoks \czech@boundary \czech@nonsyllabicpreposition {\czech@interchartoks}%
+ \XeTeXinterchartoks \czech@openpunctuation \czech@nonsyllabicpreposition {\czech@interchartoks}%
\fi
}
@@ -5448,7 +11140,7 @@ and may look very wrong.}
}
\def\noextras@czech{%
- \noczech@shorthands%
+ \ifczech@babelshorthands\noczech@shorthands\fi%
\noczech@hyphens%
\noczech@vlna%
\ifxetex\XeTeXinterchartokenstate=0\fi%
@@ -5526,11 +11218,12 @@ and may look very wrong.}
\def\proofname{Bevis}%
\def\glossaryname{Gloseliste}%
}
+
\def\datedanish{%
\def\today{\number\day.~\ifcase\month\or
januar\or februar\or marts\or april\or maj\or juni\or
juli\or august\or september\or oktober\or november\or december\fi
- \space\number\year}
+ \space\number\year}%
}
% \end{macrocode}
@@ -5843,12 +11536,7 @@ and may look very wrong.}
% \subsection{gloss-divehi.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-divehi.ldf}[polyglossia: module for divehi]
-\ifluatex
- \xpg@warning{Divehi is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\RequireBidi
\PolyglossiaSetup{divehi}{
bcp47=dv,
@@ -6006,7 +11694,7 @@ and may look very wrong.}
}
\def\noextras@dutch{%
- \nodutch@shorthands%
+ \ifdutch@babelshorthands\nodutch@shorthands\fi%
}
\def\blockextras@dutch{%
@@ -6721,7 +12409,7 @@ and may look very wrong.}
\space\number\year}}
\def\noextras@finnish{%
- \nofinnish@shorthands%
+ \iffinnish@babelshorthands\nofinnish@shorthands\fi%
}
\def\blockextras@finnish{%
@@ -7604,7 +13292,7 @@ and may look very wrong.}
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
\ifx\cyrdash\undefined
- \def\cyrdash{\hbox to.8em{--\hss--}}%
+ \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}%
\fi
\declare@shorthand{georgian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
@@ -7749,7 +13437,7 @@ and may look very wrong.}
\def\noextras@georgian{%
\ifgeorgian@numerals\nogeorgian@numbers\fi%
- \nogeorgian@shorthands%
+ \ifgeorgian@babelshorthands\nogeorgian@shorthands\fi%
}
\def\blockextras@georgian{%
@@ -7970,14 +13658,14 @@ and may look very wrong.}
\declare@shorthand{german}{"R}{\textormath{\bbl@disc@german R{RR}}{R}}%
\declare@shorthand{german}{"t}{\textormath{\bbl@disc@german t{tt}}{t}}%
\declare@shorthand{german}{"T}{\textormath{\bbl@disc@german T{TT}}{T}}%
- \declare@shorthand{german}{"f}{\textormath{\bbl@discff}{f}}%
+ \declare@shorthand{german}{"f}{\texorpdfstring{\textormath{\bbl@discff}{f}}{f}}%
\def\bbl@discff{\penalty\@M
- \afterassignment\bbl@insertff \let\bbl@nextff= }%
+ \afterassignment\bbl@insertff \cslet{bbl@nextff}{ }}%
\def\bbl@insertff{%
\if f\bbl@nextff
\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
{\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\bbl@nextff}}%
- \let\bbl@nextff=f%
+ \cslet{bbl@nextff}{f}%
\declare@shorthand{german}{"-}{\nobreak\-\nobreak\hskip\z@skip}%
\declare@shorthand{german}{"|}{\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}}{}}%
\declare@shorthand{german}{""}{\hskip\z@skip}%
@@ -8082,15 +13770,15 @@ and may look very wrong.}
}
\def\noextras@german{%
- \nogerman@shorthands%
+ \ifgerman@babelshorthands\nogerman@shorthands\fi%
}
\def\blockextras@german{%
- \ifgerman@babelshorthands\german@shorthands\fi
+ \ifgerman@babelshorthands\german@shorthands\fi%
}
\def\inlineextras@german{%
- \ifgerman@babelshorthands\german@shorthands\fi
+ \ifgerman@babelshorthands\german@shorthands\fi%
}
% \end{macrocode}
@@ -8579,12 +14267,7 @@ and may look very wrong.}
% \subsection{gloss-hebrew.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-hebrew.ldf}[polyglossia: module for hebrew]
-\ifluatex
- \xpg@warning{Hebrew is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\RequireBidi
\RequirePackage{hebrewcal}
@@ -8691,23 +14374,23 @@ and may look very wrong.}
\fi
}
-% Bidi inserts an RTL mark (0x200f) before any number, forcing numbers to
-% RTL. Hebrew uses LTR numbers, though. So we insert an LTR mark to revert
-% the directionality
\ifxetex
- \newcommand\xpg@hebrew@DigitsDotDashInterCharToks{\ifbool{@nonlatin}{\char"200E }{}}
+ \let\xpg@orig@DigitsDotDashInterCharToks\DigitsDotDashInterCharToks%
\fi
\def\hebrew@ltr@numbers{%
\ifxetex
- \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\xpg@hebrew@DigitsDotDashInterCharToks}%
+ % Bidi inserts an RTL mark (0x200f) between number and number separator (- .),
+ % forcing numbers to RTL. This is wrong for Hebrew.
+ % So we defunc the respective command.
+ \renewcommand*{\DigitsDotDashInterCharToks}{}
\fi%
}
\def\nohebrew@ltr@numbers{%
\ifxetex
- % This is bidi's original intervention
- \XeTeXinterchartoks \bidi@sepmark@charclass \bidi@digits@charclass = {\DigitsDotDashInterCharToks}%
+ % Restore bidi's \DigitsDotDashInterCharToks
+ \let\DigitsDotDashInterCharToks\xpg@orig@DigitsDotDashInterCharToks%
\fi%
}
@@ -8852,7 +14535,7 @@ and may look very wrong.}
\def\listfigurename{चित्रों की सूची}%
\def\listtablename{तालिकाओं की सूची}%
\def\pagename{पृष्ठ}%
- \def\partname{खणड}%
+ \def\partname{खण्ड}%
\def\prefacename{प्रस्तावना}% प्राक्कथन
\def\refname{हवाले}%
\def\tablename{तालिका}%
@@ -9572,21 +15255,21 @@ and may look very wrong.}
\def\noextras@italian{%
- \lccode\string"2019=\z@
- \noitalian@shorthands
- \xpgit@savedvalues
+ \lccode\string"2019=\z@%
+ \ifitalian@babelshorthands\noitalian@shorthands\fi%
+ \xpgit@savedvalues%
}
\def\blockextras@italian{%
- \lccode\string"2019=\string"2019
- \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
- \finalhyphendemerits=50000000
- \ifitalian@babelshorthands\italian@shorthands\fi
+ \lccode\string"2019=\string"2019%
+ \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000%
+ \finalhyphendemerits=50000000%
+ \ifitalian@babelshorthands\italian@shorthands\fi%
}
\def\inlineextras@italian{%
- \lccode\string"2019=\string"2019
- \ifitalian@babelshorthands\italian@shorthands\fi
+ \lccode\string"2019=\string"2019%
+ \ifitalian@babelshorthands\italian@shorthands\fi%
}
%%% CHANGES END %%%
% \end{macrocode}
@@ -9880,12 +15563,7 @@ and may look very wrong.}
%
% This work consists of the file gloss-kannada.ldf
\ProvidesFile{gloss-kannada.ldf}[polyglossia: module for kannada]
-\ifluatex
- \xpg@warning{Kannada is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\PolyglossiaSetup{kannada}{
bcp47=kn,
script=Kannada,
@@ -10720,7 +16398,9 @@ and may look very wrong.}
% \subsection{gloss-kurdish.ldf}
% \begin{macrocode}
% Created on September 1, 2019
-% Sina Ahmadi (https://sinaahmadi.github.io/)
+% Last updated on May 17, 2020
+% Sina Ahmadi (ahmadi.sina@outlook.com)
+% For more information, visit the Kurdish XeLaTeX Users Group at https://github.com/KurdishXeLaTeX
\ProvidesFile{gloss-kurdish.ldf}[polyglossia: module for Kurdish]
\RequireBidi
@@ -10848,7 +16528,6 @@ and may look very wrong.}
\define@key{kurdish}{locale}[default]{%
\def\@kurdish@locale{#1}}
-
%TODO add option for CALENDAR
% Register default options
@@ -10859,9 +16538,9 @@ and may look very wrong.}
}%
\def\kurdishNativemonth#1{\ifcase#1%
- \or رێبه‌ندان\or ره‌شه‌مێ\or خاكه‌لێوه‌\or گوڵان\or جۆزه‌ردان\or پووشپه‌ڕ\or خه‌رمانان\or گه‌لاوێژ\or ره‌زبه‌ر\or گه‌ڵارێزان\or سه‌رماوه‌ز\or به‌فرانبار\fi}
+ \or رێبەندان\or رەشەمێ\or خاكەلێوە\or گوڵان\or جۆزەردان\or پووشپەڕ\or خەرمانان\or گەلاوێژ\or رەزبەر\or گەڵارێزان\or سەرماوەز\or بەفرانبار\fi}
\def\kurdishmonth#1{\ifcase#1%
- \or کانونی دووەم\or شوبات\or ئازار\or نیسان\or ئایار\or حوزه‌یران\or ته‌ممووز\or ئاب\or ئه‌یلوول\or تشرینی یه‌كه‌م\or تشرینی دووهه‌م\or كانوونی یه‌كه‌م\fi}
+ \or كانوونی دووهەم\or شوبات\or ئازار\or نیسان\or ئایار\or حوزەیران\or تەممووز\or ئاب\or ئەیلوول\or تشرینی یەكەم\or تشرینی دووهەم\or كانوونی یەكەم\fi}
%\Hijritoday is now locale-aware and will format the date with this macro:
\DefineFormatHijriDate{kurdish}{%
@@ -10871,27 +16550,27 @@ and may look very wrong.}
}
\def\captionskurdish@sorani@arabic{%
- \def\prefacename{\@ensure@RTL{پێشه‌كی}}%
- \def\refname{\@ensure@RTL{سه‌رچاوه‌کان}}%
- \def\abstractname{\@ensure@RTL{پوخته‌}}%
- \def\bibname{\@ensure@RTL{کتێبنامه‌}}%
- \def\chaptername{\@ensure@RTL{به‌ندی}}%
+ \def\prefacename{\@ensure@RTL{پێشەكی}}%
+ \def\refname{\@ensure@RTL{سەرچاوەکان}}%
+ \def\abstractname{\@ensure@RTL{پوختە}}%
+ \def\bibname{\@ensure@RTL{کتێبنامە}}%
+ \def\chaptername{\@ensure@RTL{بەندی}}%
\def\appendixname{\@ensure@RTL{پاشکۆ}}%
- \def\contentsname{\@ensure@RTL{نێوه‌ڕۆک}}%
- \def\listfigurename{\@ensure@RTL{لیستی وێنه‌کان}}%
- \def\listtablename{\@ensure@RTL{لیستی خشته‌کان}}%
+ \def\contentsname{\@ensure@RTL{نێوەڕۆک}}%
+ \def\listfigurename{\@ensure@RTL{لیستی وێنەکان}}%
+ \def\listtablename{\@ensure@RTL{لیستی خشتەکان}}%
\def\indexname{\@ensure@RTL{پێنوێن}}%
- \def\figurename{\@ensure@RTL{وێنه‌}}%
- \def\tablename{\@ensure@RTL{خشتە}}%
- \def\partname{\@ensure@RTL{به‌شی}}%
+ \def\figurename{\@ensure@RTL{وێنەی}}%
+ \def\tablename{\@ensure@RTL{خشتەی}}%
+ \def\partname{\@ensure@RTL{بەشی}}%
\def\enclname{\@ensure@RTL{هاوپێچ}}%
- \def\ccname{\@ensure@RTL{روونووس}}%
+ \def\ccname{\@ensure@RTL{ڕوونووس}}%
\def\headtoname{\@ensure@RTL{بۆ}}%
- \def\pagename{\@ensure@RTL{لاپه‌ڕه‌}}%
- \def\seename{\@ensure@RTL{چاو لێکه‌ن}}%
- \def\alsoname{\@ensure@RTL{هه‌روه‌ها چاو لێکه‌ن}}%
+ \def\pagename{\@ensure@RTL{لاپەڕە}}%
+ \def\seename{\@ensure@RTL{چاو لێکەن}}%
+ \def\alsoname{\@ensure@RTL{هەروەها چاو لێکەن}}%
\def\proofname{\@ensure@RTL{سەلماندن}}%
- \def\glossaryname{\@ensure@RTL{فه‌رهه‌نگۆک}}%
+ \def\glossaryname{\@ensure@RTL{فەرهەنگۆک}}%
}
\def\captionskurdish@sorani@latin{%
@@ -10901,17 +16580,17 @@ and may look very wrong.}
\def\bibname{Kitêbname}%
\def\chaptername{Bendî}%
\def\appendixname{Paşko}%
- \def\contentsname{Nêwerrok}%
+ \def\contentsname{Nêweřok}%
\def\listfigurename{Lîstî Wênekan}%
\def\listtablename{Lîstî Xiştekan}%
- \def\indexname{Pêrrist}%
+ \def\indexname{Pêřist}%
\def\figurename{Wêney}%
\def\tablename{Xiştey}%
\def\partname{Beşî}%
\def\enclname{Hawpêç}%
- \def\ccname{Rûnûs}%
+ \def\ccname{Řûnûs}%
\def\headtoname{Bo}%
- \def\pagename{Laperre}%
+ \def\pagename{Lapeře}%
\def\seename{Çaw lêken}%
\def\alsoname{Herweha çaw lêken}%
\def\proofname{Selmandin}%
@@ -10920,7 +16599,7 @@ and may look very wrong.}
\def\captionskurdish@kurmanji@latin{%
\def\prefacename{Peşgotin}%
- \def\refname{Pirtuken bijartî}%
+ \def\refname{Jêder}%
\def\abstractname{Kurtebîr}%
\def\bibname{Çavkanîya Pirtukan}%
\def\chaptername{Serê}%
@@ -10937,14 +16616,14 @@ and may look very wrong.}
\def\headtoname{Ji bo}%
\def\pagename{Rûpelê}%
\def\seename{binêra}%
- \def\alsoname{le vêya ji binêra}%
+ \def\alsoname{li vêya jî binêra}%
\def\proofname{Delîl}%
\def\glossaryname{Çavkanîya lêkolînê}%
}
\def\captionskurdish@kurmanji@arabic{%
\def\prefacename{\@ensure@RTL{پێشگۆتن}}%
- \def\refname{\@ensure@RTL{پرتووکێن بژارتی}}%
+ \def\refname{\@ensure@RTL{ژێدەر}}%
\def\abstractname{\@ensure@RTL{کورتەبیر}}%
\def\bibname{\@ensure@RTL{چاڤکانییا پرتووکان}}%
\def\chaptername{\@ensure@RTL{سەرێ}}%
@@ -10976,17 +16655,17 @@ and may look very wrong.}
\def\datekurdish@sorani@latin{%
\def\today{%
- \number\day.~\ifcase\month\or
+ \number\day ~\ifcase\month\or
\januaryname\or \februaryname\or \marchname\or \aprilname\or
\mayname\or \junename\or \julyname\or \augustname\or
\septembername\or \octobername\or \novembername\or
\decembername\or \@ctrerr\fi~\number\year}%
\def\ontoday{%
- \number\day’ê~\ifcase\month\or
+ \number\day î~\ifcase\month\or
\januaryname\or \februaryname\or \marchname\or \aprilname\or
\mayname\or \junename\or \julyname\or \augustname\or
\septembername\or \octobername\or \novembername\or
- \decembername\or \@ctrerr\fi ê~\number\year}%
+ \decembername\or \@ctrerr\fi î~\number\year}%
\def\januaryname{Kanûnî Yekem}%
\def\februaryname{Şubat}%
\def\marchname{Azar}%
@@ -11003,13 +16682,13 @@ and may look very wrong.}
\def\datekurdish@kurmanji@latin{%
\def\today{%
- \number\day.~\ifcase\month\or
+ \number\day ~\ifcase\month\or
\januaryname\or \februaryname\or \marchname\or \aprilname\or
\mayname\or \junename\or \julyname\or \augustname\or
\septembername\or \octobername\or \novembername\or
\decembername\or \@ctrerr\fi~\number\year}%
\def\ontoday{%
- \number\day’ê~\ifcase\month\or
+ \number\day ê~\ifcase\month\or
\januaryname\or \februaryname\or \marchname\or \aprilname\or
\mayname\or \junename\or \julyname\or \augustname\or
\septembername\or \octobername\or \novembername\or
@@ -11028,8 +16707,11 @@ and may look very wrong.}
\def\decembername{Çileya Pêşîn}%
}
+\def\kurdishmonthkurmanji#1{\ifcase#1%
+ چلەیا پاشین \or شبات \or ئادار \or نیسان \or گولان \or حەزیران \or تیرمەهـ \or تەباخ \or ئیلۆن \or چریا پێشین \or چریا پاشین \or چلەیا پێشین\fi}
+
\def\datekurdish@kurmanji@arabic{%
- \datekurdish@sorani@arabic% FIXME: correct?
+ \def\today{\@ensure@RTL{\kurdishnumber\day\space\kurdishmonthkurmanji{\month}\space\kurdishnumber\year}}%
}
% TODO: babel-kurmanji has these "alternative" month names
@@ -11193,12 +16875,7 @@ and may look very wrong.}
% \subsection{gloss-lao.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-lao.ldf}[polyglossia: module for Lao]
-\ifluatex
- \xpg@warning{Lao is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\PolyglossiaSetup{lao}{
bcp47=lo,
script=Lao,
@@ -11972,7 +17649,7 @@ and may look very wrong.}
% prosodic shorthand environment.
% The active ' character may cause problems with the unicode-math package
% (in case Latin is used as a secondary language, see #394). We have to
-% turn it of if Latin is not the main language.
+% turn it off if Latin is not the main language.
\protected@write \@auxout { } { \shorthandoff {=} } % for the aux file
@@ -12932,12 +18609,7 @@ and may look very wrong.}
% \subsection{gloss-malayalam.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-malayalam.ldf}[polyglossia: module for malayalam]
-\ifluatex
- \xpg@warning{Malayalam is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
% Translations provided by Kevin & Siji, 01-11-2009
\PolyglossiaSetup{malayalam}{
@@ -13007,12 +18679,7 @@ and may look very wrong.}
% TODO implement Hindu calendar (not used in day-to-day practice)
\ProvidesFile{gloss-marathi.ldf}[polyglossia: module for marathi]
-\ifluatex
- \xpg@warning{Marathi is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\RequirePackage{devanagaridigits}
\PolyglossiaSetup{marathi}{
@@ -13066,7 +18733,7 @@ and may look very wrong.}
\def\appendixname{परिशिष्ट}%
\def\contentsname{अनुक्रमणिका}%
\def\listfigurename{आकृत्यांची सूची}%
- \def\listtablename{कोष्टक सूची}%
+ \def\listtablename{कोष्टकसूची}%
\def\indexname{सूची}%
\def\figurename{आकृती}%
\def\tablename{कोष्टक}%
@@ -13075,10 +18742,10 @@ and may look very wrong.}
\def\seename{पाहा}%
\def\alsoname{हेदेखील पाहा}%
\def\enclname{समाविष्ट}%
- \def\ccname{सी.सी.}%
+ \def\ccname{प्रत}%
\def\headtoname{प्रति}%
\def\proofname{सिद्धता}%
- \def\glossaryname{संक्षेपसूची}%
+ \def\glossaryname{संज्ञांची सूची}%
\def\authorsand{आणि}%
}
@@ -13104,23 +18771,23 @@ and may look very wrong.}
}%
}
-\def\devanagari@akshar#1{\ifcase#1\or अ\or आ\or इ\or ई\or उ\or ऊ\or ए\or ऐ\or ओ\or औ\or अं\or अः\else\@ctrerr\fi}
+\def\devanagari@akshar#1{\ifcase#1\or अ\or आ\or इ\or ई\or उ\or ऊ\or ऋ\or ऌ\or ए\or ॲ\or ऐ\or ओ\or ऑ\or औ\or अं\or अः\else\@ctrerr\fi}
\def\devanagari@alph#1{%
\ifcase#1\or क\or ख\or ग\or घ\or ङ\or च\or छ\or ज\or झ\or ञ\or ट\or ठ\or ड\or ढ\or ण\or त\or थ\or द%
- \or ध\or न\or प\or फ\or ब\or भ\or म\or य\or र\or ल\or व\or श\or ष\or स\or ह\or ळ\else\@ctrerr%
+ \or ध\or न\or प\or फ\or ब\or भ\or म\or य\or र\or ल\or व\or श\or ष\or स\or ह\or ळ\or क्ष \or ज्ञ \else\@ctrerr%
\fi%
}
\def\devanagari@letter#1{%
\ifcase#1\or एक\or दोन\or तीन\or चार\or पाच\or सहा\or सात\or आठ\or नऊ\or दहा\or अकरा\or बारा\or तेरा\or चौदा%
- \or पंधरा\or सोळा\or सतरा\or अठरा\or एकोणीस\or वीसएकवीस\or बावीस\or तेवीस\or चोवीस\or पंचवीस\or सव्वीस\or सत्तावीस\or अठाव्वीस%
- \or एकोणतीस\or तीस\or एकतीस\or बत्तीस\or तेहेत्तीस \or चौतीस \or पस्तीस \or छत्तीस \or सतदिस \or अडतीस \or एकोणचाळीस \or चाळीस %
- \or एक्केचाळीस \or बेचाळीस \or त्रेचाळीस \or चौवेचाळीस\or पंचेचाळीस \or सेहेचाळीस \or सत्तेचाळीस \or अठ्ठेचाळीस \or एकोणपन्नास \or पन्नास %
- \or एक्कावन्न \or बावन्न \or त्रेपन्न \or चोपन्न \or पंचावन्न \or छपन्न\or सत्तावन्न \or अठ्ठावन्न \or एकोणसाठ \or साठ \or एकसष्ठ \or बासष्ठ \or त्रेसष्ट %
- \or चौसष्ठ \or पासष्ठ \or सहासष्ठ \or सदुष्ठ \or अडुसष्ठ \or एकोणसत्तर\or सत्तर \or एकाहत्तर \or बहात्तर \or त्र्याहत्तर \or चौऱ्याहत्तर \or पंच्याहत्तर %
- \or शहात्तर \or सत्याहत्तर \or अठ्याहत्तर \or एकोणऐशी \or ऐंशी\or एक्याऐंशी \or ब्याऐंशी \or त्र्याऐंशी \or चौऱ्याऐंशी \or पंच्याऐंशी \or शह्यांशी \or सत्यांऐंशी %
- \or अठ्ठ्याऐंशी \or एकोणनव्वद \or नव्वद \or एक्याण्णव\or ब्याण्णव \or त्र्याण्णव \or चौऱ्याण्णव \or पंच्याण्णव \or शहाण्णव \or सत्याण्णव \or अठ्याण्णव %
+ \or पंधरा\or सोळा\or सतरा\or अठरा\or एकोणीस\or वीस\or एकवीस\or बावीस\or तेवीस\or चोवीस\or पंचवीस\or सव्वीस\or सत्तावीस\or अठ्ठावीस%
+ \or एकोणतीस\or तीस\or एकतीस\or बत्तीस\or तेहतीस \or चौतीस \or पस्तीस \or छत्तीस \or सदतीस \or अडतीस \or एकोणचाळीस \or चाळीस %
+ \or एकेचाळीस \or बेचाळीस \or त्रेचाळीस \or चव्वेचाळीस \or पंचेचाळीस \or शेहेचाळीस \or सत्तेचाळीस \or अठ्ठेचाळीस \or एकोणपन्नास \or पन्नास %
+ \or एकावन्न \or बावन्न \or त्रेपन्न \or चौपन्न \or पंचावन्न \or छप्पन्न\or सत्तावन्न \or अठ्ठावन्न \or एकोणसाठ \or साठ \or एकसष्ट \or बासष्ट \or त्रेसष्ट %
+ \or चौसष्ट \or पासष्ट \or सहासष्ट \or सदुष्ट \or अडुसष्ट \or एकोणसत्तर\or सत्तर \or एकाहत्तर \or बाहत्तर \or त्र्याहत्तर \or चौऱ्याहत्तर \or पंचाहत्तर %
+ \or शाहत्तर \or सत्त्याहत्तर \or अठ्ठ्याहत्तर \or एकोणऐंशी \or ऐंशी\or एक्याऐंशी \or ब्याऐंशी \or त्र्याऐंशी \or चौऱ्याऐंशी \or पंच्याऐंशी \or श्याऐंशी \or सत्त्याऐंशी %
+ \or अठ्ठ्याऐंशी \or एकोणनव्वद \or नव्वद \or एक्याण्णव\or ब्याण्णव \or त्र्याण्णव \or चौऱ्याण्णव \or पंचाण्णव \or शहाण्णव \or सत्त्याण्णव \or अठ्याण्णव %
\or नव्याण्णव \or शंभर\else\@ctrerr%
\fi%
}
@@ -13142,19 +18809,6 @@ and may look very wrong.}
\let\@Roman\xpg@save@Roman
}
-\def\blockextras@marathi{%
- \let\xpg@orig@baselinestretch\baselinestrech%
- \renewcommand{\baselinestretch}{1.2}%
- \renewcommand{\labelitemii}{$\rightarrow$}%
-}
-
-\let\xpg@orig@labelitemii\labelitemii
-
-\def\noextras@marathi{%
- \let\baselinestrech\xpg@orig@baselinestretch%
- \let\labelitemii\xpg@orig@labelitemii%
-}
-
% \end{macrocode}
% \iffalse
%</gloss-marathi.ldf>
@@ -13309,7 +18963,7 @@ and may look very wrong.}
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
\ifx\cyrdash\undefined
- \def\cyrdash{\hbox to.8em{--\hss--}}%
+ \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}%
\fi
\declare@shorthand{mongolian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
@@ -13423,7 +19077,7 @@ and may look very wrong.}
\def\noextras@mongolian{%
\ifcyrillic@numerals\nomongolian@numbers\fi%
- \nomongolian@shorthands%
+ \ifmongolian@babelshorthands\nomongolian@shorthands\fi%
}
\def\blockextras@mongolian{%
@@ -13925,20 +19579,20 @@ and may look very wrong.}
\finalhyphendemerits=\the\finalhyphendemerits}
}
\def\noextras@occitan{%
- \lccode\string"2019=\z@
- \nooccitan@shorthands
- \xpgoc@savedvalues
+ \lccode\string"2019=\z@%
+ \ifoccitan@babelshorthands\nooccitan@shorthands\fi%
+ \xpgoc@savedvalues%
}
\def\blockextras@occitan{%
- \lccode\string"2019=\string"2019
- \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
- \finalhyphendemerits=50000000
- \ifoccitan@babelshorthands\occitan@shorthands\fi
+ \lccode\string"2019=\string"2019%
+ \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000%
+ \finalhyphendemerits=50000000%
+ \ifoccitan@babelshorthands\occitan@shorthands\fi%
}
\def\inlineextras@occitan{%
- \lccode\string"2019=\string"2019
- \ifoccitan@babelshorthands\occitan@shorthands\fi
+ \lccode\string"2019=\string"2019%
+ \ifoccitan@babelshorthands\occitan@shorthands\fi%
}
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
@@ -13959,12 +19613,7 @@ and may look very wrong.}
% \subsection{gloss-persian.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-persian.ldf}[polyglossia: module for persian]
-\ifluatex
- \xpg@warning{Persian is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\RequireBidi
\RequirePackage{arabicnumbers}
\RequirePackage{farsical}
@@ -14211,21 +19860,21 @@ and may look very wrong.}
\def\noextras@piedmontese{%
- \lccode\string"2019=\z@
- \nopiedmontese@shorthands
- \xpgpms@savedvalues
+ \lccode\string"2019=\z@%
+ \ifpiedmontese@babelshorthands\nopiedmontese@shorthands\fi%
+ \xpgpms@savedvalues%
}
\def\blockextras@piedmontese{%
- \lccode\string"2019=\string"2019
- \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000
- \finalhyphendemerits=50000000
- \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi
+ \lccode\string"2019=\string"2019%
+ \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000%
+ \finalhyphendemerits=50000000%
+ \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi%
}
\def\inlineextras@piedmontese{%
- \lccode\string"2019=\string"2019
- \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi
+ \lccode\string"2019=\string"2019%
+ \ifpiedmontese@babelshorthands\piedmontese@shorthands\fi%
}
%%% CHANGES END %%%
% \end{macrocode}
@@ -14354,10 +20003,8 @@ and may look very wrong.}
% brazilian:
\def\portuguese@variant{brazil}%
\SetLanguageKeys{portuguese}{babelname=brazil,bcp47=pt-BR}%
- \xpg@ifdefined{brazil}{}%
- {\xpg@warning{No hyphenation patterns were loaded for "Portuguese (Brazil)"\MessageBreak
- I will use the standard patterns for Portuguese instead}%
- \adddialect\l@brazil\l@portuges\relax}%
+ % There are no specific brazil patterns
+ \adddialect\l@brazil\l@portuges\relax%
\fi
\xpg@info{Option: portuguese, variant=\xpg@val}%
}{\xpg@warning{Unknown portuguese variant `#1'}}
@@ -14621,19 +20268,26 @@ and may look very wrong.}
\xpg@info{Option: Russian, numerals=\xpg@val}%
}{\xpg@warning{Unknown Russian numerals value `#1'}}
-\define@boolkey{russian}[russian@]{indentfirst}[true]{
- \ifrussian@indentfirst
- \SetLanguageKeys{russian}{indentfirst=true}
- \else
- \SetLanguageKeys{russian}{indentfirst=false}
- \fi
+\define@boolkey{russian}[russian@]{indentfirst}[true]{%
+ \ifrussian@indentfirst
+ \SetLanguageKeys{russian}{indentfirst=true}%
+ \else
+ \SetLanguageKeys{russian}{indentfirst=false}%
+ \fi%
}
\define@boolkey{russian}[russian@]{babelshorthands}[true]{}
+% Force punctuation after heading number
+\define@boolkey{russian}[russian@]{forceheadingpunctuation}[true]{}
+
% Register default options
-\xpg@initialize@gloss@options{russian}{babelshorthands=false,spelling=modern,numerals=arabic,indentfirst=false}
+\xpg@initialize@gloss@options{russian}{babelshorthands=false,
+ spelling=modern,
+ numerals=arabic,
+ indentfirst=true,
+ forceheadingpunctuation=true}
\ifsystem@babelshorthands
@@ -14681,7 +20335,7 @@ and may look very wrong.}
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
\ifx\cyrdash\undefined
- \def\cyrdash{\hbox to.8em{--\hss--}}%
+ \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}%
\fi
\declare@shorthand{russian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
@@ -14778,39 +20432,46 @@ and may look very wrong.}
\space \number\year\space г.}%
}
-% The following is based on some ideas from ruscor.sty
+% Russian needs trailing dots in all headings
+\def\xpg@save@autodot{}
+\ifdef{\KOMAScript}{%
+ \let\xpg@save@autodot\autodot%
+}
+
\def\russian@capsformat{%
+ \ifrussian@forceheadingpunctuation%
\ifdef{\KOMAScript}{%
- \ifdef{\chapterformat}{%
- \renewcommand{\chapterformat}{\prechapter\thechapter\postchapter}}{}%
- \ifdef{\sectionformat}{%
- \renewcommand{\sectionformat}{\presection\thesection\postsection}}{}%
- \ifdef{\subsectionformat}{%
- \renewcommand{\subsectionformat}{\presubsection\thesubsection\postsubsection}}{}%
- \ifdef{\subsubsectionformat}{%
- \renewcommand{\subsubsectionformat}{\presubsubsection\thesubsubsection\postsubsubsection}}{}%
- \ifdef{\paragraphformat}{%
- \renewcommand{\paragraphformat}{\preparagraph\theparagraph\postparagraph}}{}%
- \ifdef{\subparagraphformat}{%
- \renewcommand{\subparagraphformat}{\presubparagraph\thesubparagraph\postsubparagraph}}{}%
+ \renewcommand*\autodot{.}%
}{%
+ % The following is based on some ideas from ruscor.sty
\def\@seccntformat##1{\csname pre##1\endcsname%
\csname the##1\endcsname%
\csname post##1\endcsname}%
- }%
- \def\@aftersepkern{\hspace{0.5em}}%
- \def\postchapter{.\@aftersepkern}%
- \def\postsection{.\@aftersepkern}%
- \def\postsubsection{.\@aftersepkern}%
- \def\postsubsubsection{.\@aftersepkern}%
- \def\postparagraph{.\@aftersepkern}%
- \def\postsubparagraph{.\@aftersepkern}%
- \def\prechapter{}%
- \def\presection{}%
- \def\presubsection{}%
- \def\presubsubsection{}%
- \def\preparagraph{}%
- \def\presubparagraph{}%
+ \def\@aftersepkern{\hspace{0.5em}}%
+ \def\postchapter{.\@aftersepkern}%
+ \def\postsection{.\@aftersepkern}%
+ \def\postsubsection{.\@aftersepkern}%
+ \def\postsubsubsection{.\@aftersepkern}%
+ \def\postparagraph{.\@aftersepkern}%
+ \def\postsubparagraph{.\@aftersepkern}%
+ \def\prechapter{}%
+ \def\presection{}%
+ \def\presubsection{}%
+ \def\presubsubsection{}%
+ \def\preparagraph{}%
+ \def\presubparagraph{}%
+ }%
+ \fi%
+}
+
+\def\norussian@capsformat{%
+ \ifrussian@forceheadingpunctuation%
+ \ifdef{\KOMAScript}{%
+ \let\autodot\xpg@save@autodot%
+ }{%
+ \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
+ }%
+ \fi%
}
\newcommand{\russiannumerals}[2]{\russiannumber{#2}}
@@ -14885,24 +20546,9 @@ and may look very wrong.}
}
\def\noextras@russian{%
- \ifdef{\KOMAScript}{%
- \ifdef{\chapterformat}{%
- \renewcommand{\chapterformat}{\thechapter\autodot\enskip}}{}%
- \ifdef{\sectionformat}{%
- \renewcommand{\sectionformat}{\thesection\autodot\enskip}}{}%
- \ifdef{\subsectionformat}{%
- \renewcommand{\subsectionformat}{\thesubsection\autodot\enskip}}{}%
- \ifdef{\subsubsectionformat}{%
- \renewcommand{\subsubsectionformat}{\thesubsubsection\autodot\enskip}}{}%
- \ifdef{\paragraphformat}{%
- \renewcommand{\paragraphformat}{\theparagraph\autodot\enskip}}{}%
- \ifdef{\subparagraphformat}{%
- \renewcommand{\subparagraphformat}{\thesubparagraph\autodot\enskip}}{}%
- }{%
- \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
- }%
+ \norussian@capsformat%
\ifcyrillic@numerals\norussian@numbers\fi%
- \norussian@shorthands%
+ \ifrussian@babelshorthands\norussian@shorthands\fi%
}
\def\blockextras@russian{%
@@ -15061,12 +20707,6 @@ and may look very wrong.}
% \subsection{gloss-sanskrit.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-sanskrit.ldf}[polyglossia: module for sanskrit]
-\ifluatex
- \xpg@warning{Sanskrit is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
\RequirePackage{devanagaridigits}
@@ -15249,7 +20889,8 @@ and may look very wrong.}
indentfirst=true,
fontsetup=false,
localnumeral=serbiannumerals,
- Localnumeral=Serbiannumerals
+ Localnumeral=Serbiannumerals,
+ babelname=serbian
%TODO localalph
}
@@ -15271,7 +20912,7 @@ and may look very wrong.}
\or
% latin:
\@serbian@cyrfalse
- \SetLanguageKeys{serbian}{scripttag=latn,script=Latin,bcp47=sr-Latn}
+ \SetLanguageKeys{serbian}{scripttag=latn,script=Latin,babelname=serbian,bcp47=sr-Latn}
\xpg@fontsetup@latin{serbian}%
%TODO \def\serbian@language{\language=\l@serbianlat}%
% or should we use Croatian patterns as a fallback for the time being???
@@ -15579,7 +21220,7 @@ and may look very wrong.}
\chardef\slovak@boundary=4095 %
\def\newXeTeXintercharclass{%
\e@alloc\XeTeXcharclass\chardef
- \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}
+ \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}%
\else
\chardef\slovak@boundary=255
\fi
@@ -15608,6 +21249,24 @@ and may look very wrong.}
% Add nonbreakable space after single-letter word to
% prevent them to land at the end of a line
+% vlna code taken and adapted from xevlna.sty
+\ifxetex
+ \def\slovak@nointerchartoks{\let\slovak@interchartoks\slovak@PreCSpreposition}%
+ \def\slovak@PreCSpreposition{%
+ \def\next{}%
+ \ifnum\catcode`\ =10 % nothing will be done in verbatim
+ \ifmmode % nothing in math
+ \else
+ \let\slovak@interchartoks\slovak@nointerchartoks
+ \let\next\slovak@ExamineCSpreposition
+ \fi\fi
+ \next%
+ }%
+ \def\slovak@ExamineCSpreposition #1{#1\futurelet\next\slovak@ProcessCSpreposition}%
+ \def\slovak@ProcessCSpreposition{\ifx\next\slovak@XeTeXspace\nobreak\fi}%
+ \futurelet\slovak@XeTeXspace{ }\slovak@nointerchartoks
+\fi
+
\def\slovak@vlna{%
\ifluatex
\preventsingleon
@@ -15634,21 +21293,8 @@ and may look very wrong.}
\XeTeXcharclass `\a \slovak@nonsyllabicpreposition
\XeTeXcharclass `\I \slovak@nonsyllabicpreposition
\XeTeXcharclass `\i \slovak@nonsyllabicpreposition
- \XeTeXinterchartoks \slovak@boundary \slovak@nonsyllabicpreposition {\slovak@interchartoks}
- \XeTeXinterchartoks \slovak@openpunctuation \slovak@nonsyllabicpreposition {\slovak@interchartoks}
- \def\slovak@nointerchartoks{\let\slovak@interchartoks\slovak@PreCSpreposition}
- \def\slovak@PreCSpreposition{\def\next{}%
- \ifnum\catcode`\ =10 % nothing will be done in verbatim
- \ifmmode % nothing in math
- \else
- \let\slovak@interchartoks\slovak@nointerchartoks
- \let\next\slovak@ExamineCSpreposition
- \fi \fi
- \next%
- }
- \def\slovak@ExamineCSpreposition ##1{##1\futurelet\next\slovak@ProcessCSpreposition}
- \def\slovak@ProcessCSpreposition{\ifx\next\slovak@XeTeXspace\nobreak\fi}
- \futurelet\slovak@XeTeXspace{ }\slovak@nointerchartoks
+ \XeTeXinterchartoks \slovak@boundary \slovak@nonsyllabicpreposition {\slovak@interchartoks}%
+ \XeTeXinterchartoks \slovak@openpunctuation \slovak@nonsyllabicpreposition {\slovak@interchartoks}%
\fi
}
@@ -15714,7 +21360,7 @@ and may look very wrong.}
}
\def\noextras@slovak{%
- \noslovak@shorthands%
+ \ifslovak@babelshorthands\noslovak@shorthands\fi%
\noslovak@hyphens%
\noslovak@vlna%
\ifxetex\XeTeXinterchartokenstate=0\fi%
@@ -16354,12 +22000,7 @@ and may look very wrong.}
% \subsection{gloss-syriac.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-syriac.ldf}[polyglossia: module for syriac]
-\ifluatex
- \xpg@warning{Syriac is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\RequireBidi
\RequirePackage{arabicnumbers}
@@ -16543,12 +22184,7 @@ and may look very wrong.}
% \subsection{gloss-tamil.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-tamil.ldf}[polyglossia: module for tamil]
-\ifluatex
- \xpg@warning{Tamil is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
% Translations provided by Kevin & Siji, 01-11-2009
\PolyglossiaSetup{tamil}{
@@ -16614,12 +22250,7 @@ and may look very wrong.}
% \subsection{gloss-telugu.ldf}
% \begin{macrocode}
\ProvidesFile{gloss-telugu.ldf}[polyglossia: module for telugu]
-\ifluatex
- \xpg@warning{Telugu is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
% Translations provided by Anmol Sharma <unmole.in@gmail.com>
\PolyglossiaSetup{telugu}{
@@ -16697,12 +22328,6 @@ and may look very wrong.}
%%%% Thai Linux Working Group
%%%% http://linux.thai.net/
%%%%
-\ifluatex
- \xpg@warning{Thai is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
\PolyglossiaSetup{thai}{
bcp47=th,
script=Thai,
@@ -17292,7 +22917,7 @@ and may look very wrong.}
\def\@Ccdash{\leavevmode
\nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}%
\ifx\cyrdash\undefined
- \def\cyrdash{\hbox to.8em{--\hss--}}
+ \def\cyrdash{\hbox to.8em{\textendash\hss\textendash}}%
\fi
\declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces}%
}
@@ -17370,7 +22995,7 @@ and may look very wrong.}
\def\ukrainiannumber#1{%
\ifcyrillic@numerals
\ifcyrillic@asbuk@numerals
- \serbian@asbuk@alph{#1}%
+ \ukrainian@asbuk@alph{#1}%
\else
\cyr@alph{#1}%
\fi
@@ -17382,7 +23007,7 @@ and may look very wrong.}
\def\Ukrainiannumber#1{%
\ifcyrillic@numerals
\ifcyrillic@asbuk@numerals
- \serbian@asbuk@Alph{#1}%
+ \ukrainian@asbuk@Alph{#1}%
\else
\cyr@Alph{#1}%
\fi
@@ -17402,25 +23027,29 @@ and may look very wrong.}
% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and
% thus ends at 30.
-\def\ukranian@asbuk@Alph#1{\ifcase#1\or
+\def\ukrainian@asbuk@Alph#1{\ifcase#1\or
А\or Б\or В\or Г\or Д\or Е\or Ж\or
З\or И\or К\or Л\or М\or Н\or О\or
П\or Р\or С\or Т\or У\or Ф\or Х\or
Ц\or Ч\or Ш\or Щ\or Э\or Ю\or Я%
- \else\xpg@ill@value{#1}{ukranian@asbuk@Alph}\fi%
+ \else\xpg@ill@value{#1}{ukrainian@asbuk@Alph}\fi%
}
-\def\ukranian@asbuk@alph#1{\ifcase#1\or
+\def\ukrainian@asbuk@alph#1{\ifcase#1\or
а\or б\or в\or г\or д\or е\or ж\or
з\or и\or к\or л\or м\or н\or о\or
п\or р\or с\or т\or у\or ф\or х\or
ц\or ч\or ш\or щ\or э\or ю\or я%
- \else\xpg@ill@value{#1}{ukranian@asbuk@alph}\fi%
+ \else\xpg@ill@value{#1}{ukrainian@asbuk@alph}\fi%
}
\def\ukrainian@numbers{%
- \let\@Alph\ukrainian@Alph%
- \let\@alph\ukrainian@alph%
+ \ifcyrillic@numerals
+ \def\ukrainian@alph##1{\expandafter\ukrainiannumeral\expandafter{\the##1}}%
+ \def\ukrainian@Alph##1{\expandafter\Ukrainiannumeral\expandafter{\the##1}}%
+ \let\@Alph\ukrainian@Alph%
+ \let\@alph\ukrainian@alph%
+ \fi
}
\def\noukrainian@numbers{%
@@ -17431,13 +23060,13 @@ and may look very wrong.}
\def\noextras@ukrainian{%
\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel
\ifcyrillic@numerals\noukrainian@numbers\fi
- \noukrainian@shorthands%
+ \ifukrainian@babelshorthands\noukrainian@shorthands\fi%
}
\def\blockextras@ukrainian{%
\ukrainian@capsformat%
- \ifcyrillic@numerals\ukrainian@numbers\fi
- \ifukrainian@babelshorthands\ukrainian@shorthands\fi
+ \ifcyrillic@numerals\ukrainian@numbers\fi%
+ \ifukrainian@babelshorthands\ukrainian@shorthands\fi%
}
\def\inlineextras@ukrainian{%
@@ -17492,12 +23121,7 @@ and may look very wrong.}
% \begin{macrocode}
%%% Adapted from a file contributed by Kamal Abdali
\ProvidesFile{gloss-urdu.ldf}[polyglossia: module for Urdu]
-\ifluatex
- \xpg@warning{Urdu is not supported with LuaTeX.\MessageBreak
-I will proceed with the compilation, but\MessageBreak
-the output is not guaranteed to be correct\MessageBreak
-and may look very wrong.}
-\fi
+
\RequireBidi
\RequirePackage{arabicnumbers}
\RequirePackage{hijrical}
@@ -18765,21 +24389,21 @@ local left_bracket_chars = {
-- all right bracket characters, referenced by their Unicode slot
local right_bracket_chars = {
- [0x29] = true, -- right parenthesis
- [0x5D] = true, -- right square bracket
- [0x7D] = true, -- right curly bracket
+ [0x29] = true, -- right parenthesis
+ [0x5D] = true, -- right square bracket
+ [0x7D] = true, -- right curly bracket
[0x27E9] = true -- mathematical right angle bracket
}
-- question and exclamation marks, referenced by their Unicode slot
local question_exclamation_chars = {
- [0x21] = true, -- exclamation mark !
- [0x3F] = true, -- question mark ?
+ [0x21] = true, -- exclamation mark !
+ [0x3F] = true, -- question mark ?
[0x203C] = true, -- double exclamation mark ‼
[0x203D] = true, -- interrobang ‽
[0x2047] = true, -- double question mark ⁇
[0x2048] = true, -- question exclamation mark ⁈
- [0x2049] = true, -- exclamation question mark ⁉
+ [0x2049] = true -- exclamation question mark ⁉
}
-- from nodes-tst.lua, adapted
@@ -18905,9 +24529,12 @@ local function process(head)
if id == glyph_code then
local attr = has_attribute(current, punct_attr)
if attr then
- local char = utf8.char(current.char) -- requires Lua 5.3
- local leftspace = left_space[attr][char]
- local rightspace = right_space[attr][char]
+ local char, leftspace, rightspace
+ if current.char <= 0x10FFFF then -- greater values may cause problems with utf8.char
+ char = utf8.char(current.char)
+ leftspace = left_space[attr][char]
+ rightspace = right_space[attr][char]
+ end
if leftspace or rightspace then
local fontparameters = fonts.hashes.parameters[current.font]
local unit, stretch, shrink, spacing_node
@@ -18915,14 +24542,14 @@ local function process(head)
local prev = getprev(current)
local space_exception = false
if prev then
- local prevprev = getprev(prev)
-- do not add space after left (opening) bracket and between question/exclamation marks
space_exception = someleftbracket(prev) or question_exclamation_sequence(prev, current)
- if somespace(prev) then
-- TODO: there is a question here: do we override a preceding space or not?...
- if somepenalty(prevprev, 10000) then
- head = remove_node(head, prevprev)
- end
+ while somespace(prev) do
+ head = remove_node(head, prev)
+ prev = getprev(current)
+ end
+ if somepenalty(prev, 10000) then
head = remove_node(head, prev)
end
end
@@ -18952,10 +24579,10 @@ local function process(head)
space_exception = somerightbracket(next)
local nextnext = getnext(next)
if somepenalty(next, 10000) and somespace(nextnext) then
- head = remove_node(head, next)
- head = remove_node(head, nextnext)
- elseif somespace(next) then
- head = remove_node(head, next)
+ head, next = remove_node(head, next)
+ end
+ while somespace(next) do
+ head, next = remove_node(head, next)
end
end
if rightspace.unit == "quad" then
@@ -19368,52 +24995,68 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \Finale
%
% \iffalse
-%<*../README.md>
-# THE POLYGLOSSIA PACKAGE v1.49
-## Multilingual typesetting with XeLaTeX and LuaLaTeX
+%<*Changelog>
+1.50 (09-10-2020)
-This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX
-(with a few languages incompletely supported for the latter). This version
-includes support for over 70 different languages, some of which in different
-regional or national varieties, or using a different writing system.
+New features:
-Polyglossia makes it possible to automate the following tasks:
+ * Polyglossia now uses the Harfbuzz renderer by default with LuaTeX
+ output. This brings LuaTeX on par with XeTeX for all scripts (#337).
+ The renderer can be changed via the new global luatexrenderer option.
+ * The (previously inadvertently working) hyphenrules environment that ceased
+ to work after a recent babel update is back and now officially supported.
+ The environment now also supports language options and aliases (#427).
+ * New command \setlanghyphenmins to adapt hyphenation thresholds of languages
+ and varieties.
+ * New command \abjadalph for Arabic with corresponding option (#431).
+ * Replace consecutive glues around punctuation by the correct amount of space
+ with LuaLaTeX for French, ecclesiastic Latin, and Sanskrit (#437).
-* Loading the appropriate hyphenation patterns.
-* Setting the script and language tags of the current font (if possible and
- available), using the package fontspec.
-* Switching to a font assigned by the user to a particular script or language.
-* Adjusting some typographical conventions in function of the current language
- (such as afterindent, frenchindent, spaces before or after punctuation marks,
- etc.).
-* Redefining the document strings (like “chapter”, “figure”, “bibliography”).
-* Adapting the formatting of dates (for non-gregorian calendars via external
- packages bundled with polyglossia: currently the Hebrew, Islamic and Farsi
- calendars are supported).
-* For languages that have their own numeration system, modifying the formatting
- of numbers appropriately.
-* Ensuring the proper directionality if the document contains languages
- written from right to left (via the packages bidi and luabidi, available
- separately).
+Bug fixes:
-# LICENCE
+ * Remove warning about missing Brazil patterns (#404).
+ * Fix incompatibility with recent babel release (#408).
+ * Fixed some spellings in Marathi (#409).
+ * Fix spacing of geminating dot in Catalan (#410).
+ * Fix incompatibility of Marathi with Beamer.
+ * Correct \partname in Hindi (#416).
+ * Updates and improvements to Kurdish (#418).
+ * Only activate shorthand character if babelshorthands is true (#421).
+ * Fix whitespace issue in Czech and Slovak with vlna=true (#423).
+ * Fix whitespace issue in Danish (#424).
+ * Fix catcode conflicts that might occur in language definition files
+ f. ex. when loaded from a LaTeX3 class (#67, #425).
+ * Robustify font family switches (#428).
+ * Fix whitespace issue in Russian indentfirst option (#433).
+ * In Russian, indentfirst is now again default (#434).
+ * Fix LaTeX error with arabic numbering in Ukrainian (#440).
+ * Fix directionality after Hebrew decimal numbers (#441).
+ * Fix babelname of Latin Serbian (#442).
+ * Fix recording of secondary languages in \xpg@bloaded and \xpg@bcp@loaded
+ lists (#443).
+ * Simplify and robustify section heading modification in Russian
+ and introduce option forceheadingpunctuation (#444).
+ * Fix Cyrillic dash (via babelshorthand "---) when TeX ligatures
+ are disabled (#445)
+ * Fix problem with large character indices in Lua module for punctuation
+ spacing
-Copyright (c) 2008-2010 François Charette, 2013 Élie Roux, 2011-2020 Arthur Reutenauer,
-Copyright (c) 2019-2020 Bastien Roucariès, 2019-2020 Jürgen Spitzmüller
+Interface and defaults changes:
-Except where otherwise noted, Polyglossia is placed under the terms of the MIT licence
-(https://opensource.org/licenses/MIT).
+ * Polyglossia now uses the Harfbuzz renderer by default with LuaTeX
+ output. See new features section.
-# BUGS
+Build fixes:
-If you run into a bug, or suspect you do, or you have a request or comment, please
-use the GitHub issue tracker: http://github.com/reutenauer/polyglossia/issues
+ * Fix a bug in the dtx build script which was the reason for an utterly
+ incomplete polyglossia.dtx file (#420).
-This is more efficient than contacting the maintainer by email as it allows me
-to track the issues and follow progress.
-%</../README.md>
-%<*Changelog>
-1.49 (???)
+Documentation improvements:
+ * Document how to change \lefthyphenmin and \righthyphenmin for a language
+ (#435).
+
+
+1.49 (08-04-2020)
New features:
diff --git a/macros/unicodetex/latex/polyglossia/polyglossia.pdf b/macros/unicodetex/latex/polyglossia/polyglossia.pdf
index 6c1979411b..64a81bfe41 100644
--- a/macros/unicodetex/latex/polyglossia/polyglossia.pdf
+++ b/macros/unicodetex/latex/polyglossia/polyglossia.pdf
Binary files differ